Date: Mon, 3 Feb 2014 01:38:46 GMT From: Michele Carlson <mike@bayphoto.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186397: py-salt patch breaks salt Message-ID: <201402030138.s131ck7t094626@oldred.freebsd.org> Resent-Message-ID: <201402030140.s131e0uJ076855@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186397 >Category: ports >Synopsis: py-salt patch breaks salt >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 03 01:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Michele Carlson >Release: 10.0-RELEASE >Organization: Bay Photo Lab >Environment: FreeBSD fbsd-qa.discdrive.bayphoto.com 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: the patch file in sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py breaks pkg support on FreeBSD 10 FreeBSD 10 does not have /usr/local/etc/pkg.conf, but the original freebsdpkg.py checks for /var/db/pkg/local.sqlite, which seems to be accurate across 9.x and 10.0 systems >How-To-Repeat: Install Salt: pkg install -y py27-salt Accept that systems key, and use the pkg.list_pkgs module: root@fbsd-qa:/usr/ports/sysutils/py-salt # salt-call pkg.list_pkgs [INFO ] Executing command '/sbin/zfs help || :' in directory '/root' [INFO ] Executing command 'None' in directory '/root' [ERROR ] An un-handled exception was caught by salt's global exception handler: ValueError: need more than 1 value to unpack Traceback (most recent call last): File "/usr/local/bin/salt-call", line 9, in <module> load_entry_point('salt==0.17.4', 'console_scripts', 'salt-call')() File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 77, in salt_call client.run() File "/usr/local/lib/python2.7/site-packages/salt/cli/__init__.py", line 303, in run caller.run() File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 135, in run ret = self.call() File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 78, in call ret['return'] = func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/salt/modules/freebsdpkg.py", line 187, in list_pkgs pkg, ver = line.split(' ')[0].rsplit('-', 1) ValueError: need more than 1 value to unpack Traceback (most recent call last): File "/usr/local/bin/salt-call", line 9, in <module> load_entry_point('salt==0.17.4', 'console_scripts', 'salt-call')() File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 77, in salt_call client.run() File "/usr/local/lib/python2.7/site-packages/salt/cli/__init__.py", line 303, in run caller.run() File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 135, in run ret = self.call() File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 78, in call ret['return'] = func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/salt/modules/freebsdpkg.py", line 187, in list_pkgs pkg, ver = line.split(' ')[0].rsplit('-', 1) ValueError: need more than 1 value to unpack >Fix: Index: sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py =================================================================== --- sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py (revision 342371) +++ sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py (working copy) @@ -1,11 +0,0 @@ ---- salt/modules/freebsdpkg.py.orig 2013-10-30 16:16:31.850225522 +0000 -+++ salt/modules/freebsdpkg.py 2013-10-30 16:16:47.868224728 +0000 -@@ -27,7 +27,7 @@ - ''' - Looks to see if pkgng is being used by checking if database exists - ''' -- return os.path.isfile('/var/db/pkg/local.sqlite') -+ return os.path.isfile('/usr/local/etc/pkg.conf') - - - @decorators.memoize >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402030138.s131ck7t094626>