From 92d3785e02c0118b06811cf875cead4c8cf8af63 Mon Sep 17 00:00:00 2001 From: Yann Collette Date: Thu, 22 Jun 2017 21:08:18 +0200 Subject: [PATCH] replace dnf enumeration by pull request #122 --- src/claudia_launcher.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/claudia_launcher.py b/src/claudia_launcher.py index 8e3aad7..27a5789 100755 --- a/src/claudia_launcher.py +++ b/src/claudia_launcher.py @@ -700,18 +700,6 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): 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: @@ -719,6 +707,11 @@ class ClaudiaLauncher(QWidget, ui_claudia_launcher.Ui_ClaudiaLauncherW): 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)