Skip to content

Commit

Permalink
replace dnf enumeration by pull request falkTX#122
Browse files Browse the repository at this point in the history
  • Loading branch information
ycollet committed Jun 22, 2017
1 parent 6f15448 commit 95a1f65
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/claudia_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,25 +690,18 @@ def refreshAll(self):
for package in pkg_out:
pkglist.append(package)

elif os.path.exists("/usr/bin/dnf"):
pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dnf list installed 2>/dev/null").split("\n")
for pkg_info in pkg_out[2:]:
package = pkg_info.split(" ")[0].split(".")[0]
pkglist.append(package.strip())

elif os.path.exists("/usr/bin/yum"):
pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/yum list installed 2>/dev/null").split("\n")
for package in pkg_out[2:]:
package = pkg_info.split(" ")[0].split(".")[0]
pkglist.append(package.strip())

elif os.path.exists("/usr/bin/dpkg"):
pkg_out = getoutput("env LANG=C LC_ALL=C /usr/bin/dpkg --get-selections 2>/dev/null").split("\n")
for pkg_info in pkg_out:
package, installed = pkg_info.rsplit("\t", 1)
if installed == "install":
pkglist.append(package.strip())

elif os.path.exists("/bin/rpm"):
pkg_out = getoutput("env LANG=C /bin/rpm -qa --qf \"%{NAME}\n\" 2>/dev/null").split("\n")
for package in pkg_out:
pkglist.append(package)

if not "bristol" in pkglist:
self.tabWidget.setTabEnabled(iTabBristol, False)

Expand Down

0 comments on commit 95a1f65

Please sign in to comment.