diff --git a/cmd/linux.go b/cmd/linux.go index 00d33e6b5..4d3cace7a 100644 --- a/cmd/linux.go +++ b/cmd/linux.go @@ -61,6 +61,8 @@ const ( ArchLabs // PopOS distribution PopOS + // Solus distribution + Solus ) // DistroInfo contains all the information relating to a linux distribution @@ -163,6 +165,8 @@ func parseOsRelease(osRelease string) *DistroInfo { result.Distribution = Leap case "pop": result.Distribution = PopOS + case "solus": + result.Distribution = Solus default: result.Distribution = Unknown } @@ -199,6 +203,17 @@ func DpkgInstalled(packageName string) (bool, error) { return exitCode == 0, nil } +// EOpkgInstalled uses dpkg to see if a package is installed +func EOpkgInstalled(packageName string) (bool, error) { + program := NewProgramHelper() + eopkg := program.FindProgram("eopkg") + if eopkg == nil { + return false, fmt.Errorf("cannot check dependencies: eopkg not found") + } + _, _, exitCode, _ := eopkg.Run("li", "|", "grep", "-w", packageName) + return exitCode == 0, nil +} + // PacmanInstalled uses pacman to see if a package is installed. func PacmanInstalled(packageName string) (bool, error) { program := NewProgramHelper() diff --git a/cmd/linuxdb.yaml b/cmd/linuxdb.yaml index 9d82b5f56..c3b69fdb6 100644 --- a/cmd/linuxdb.yaml +++ b/cmd/linuxdb.yaml @@ -241,6 +241,25 @@ distributions: gccversioncommand: *gccdumpfullversion programs: *debiandefaultprograms libraries: *debiandefaultlibraries + solus: + id: solus + releases: + default: + version: default + name: Solus + gccversioncommand: *gccdumpfullversion + programs: &solusdefaultprograms + - name: gcc + help: Please install with `sudo eopkg it -c system.devel` and try again + - name: pkg-config + help: Please install with `sudo eopkg it -c system.devel` and try again + - name: npm + help: Please install with `sudo eopkg it nodejs` and try again + libraries: &opensusedefaultlibraries + - name: gtk3-devel + help: Please install with `sudo eopkg it libgtk-3-devel` and try again + - name: webkit2gtk3-devel + help: Please install with `sudo eopkg it libwebkit-gtk-devel` and try again opensuse-tumbleweed: id: opensuse-tumbleweed diff --git a/cmd/system.go b/cmd/system.go index 3f8a7a0b4..00644e4e1 100644 --- a/cmd/system.go +++ b/cmd/system.go @@ -284,6 +284,8 @@ func CheckDependencies(logger *Logger) (bool, error) { libraryChecker = EqueryInstalled case VoidLinux: libraryChecker = XbpsInstalled + case Solus: + libraryChecker = EOpkgInstalled default: return false, RequestSupportForDistribution(distroInfo) }