]> TLD Linux GIT Repositories - packages/ansible.git/blobdiff - poldek.py
- use pip source, install poldek.py, no shebang in poldek.py
[packages/ansible.git] / poldek.py
index 74672f1f4b86c1bc38c3070f087a251e12fca27b..9b44bd500ce6e153a4d80716c4a320d7b391e0e2 100644 (file)
--- a/poldek.py
+++ b/poldek.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
 # -*- coding: utf-8 -*-
 
 # Copyright: (c) 2019, Marcin Krol <hawk@tld-linux.org>
@@ -141,7 +140,7 @@ def update_package_db(module, poldek_path):
 
 def upgrade(module, poldek_path):
     cmdupgrade = "%s -v --noask --upgrade-dist %s" % (poldek_path, module.params["upgrade_extra_args"])
-    cmdupgradeable = "%s -q --shcmd='ls -n --installed --upgradeable' %s" % (poldek_path, module.params["upgrade_extra_args"])
+    cmdupgradeable = "%s -q --shcmd='ls --upgradeable --qf=\"%%{NAME}-%%{VERSION}-%%{RELEASE}\n\"' %s" % (poldek_path, module.params["upgrade_extra_args"])
     rc, stdout, stderr = module.run_command(cmdupgradeable, check_rc=False)
 
     packages = stdout.split('\n')[:-1]