From owner-svn-ports-all@FreeBSD.ORG Mon Nov 4 23:05:33 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E9BCD29 for ; Mon, 4 Nov 2013 23:05:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 294452A1D for ; Mon, 4 Nov 2013 23:05:33 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4N5W2w010777 for ; Mon, 4 Nov 2013 23:05:32 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rA4N5WjW010768 for svn-ports-all@freebsd.org; Mon, 4 Nov 2013 23:05:32 GMT (envelope-from bdrewery) Received: (qmail 85963 invoked from network); 4 Nov 2013 17:05:31 -0600 Received: from unknown (HELO roundcube.xk42.net) (10.10.5.5) by sweb.xzibition.com with SMTP; 4 Nov 2013 17:05:31 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Nov 2013 17:05:31 -0600 From: Bryan Drewery To: Veniamin Gvozdikov Subject: Re: svn commit: r332285 - in head/sysutils/py-salt: . files Organization: FreeBSD In-Reply-To: <201310312048.r9VKmmgj052977@svn.freebsd.org> References: <201310312048.r9VKmmgj052977@svn.freebsd.org> Message-ID: X-Sender: bdrewery@FreeBSD.org User-Agent: Roundcube Webmail/0.9.3 Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, owner-ports-committers@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 23:05:33 -0000 On 2013-10-31 15:48, Veniamin Gvozdikov wrote: > Author: vg > Date: Thu Oct 31 20:48:47 2013 > New Revision: 332285 > URL: http://svnweb.freebsd.org/changeset/ports/332285 > > Log: > - Fixed pkgng support with custom path to db > > PR: ports/183492 > Submitted by: myself > Approved by: eadler, osa, rm (mentors, implicit), Christer Edwards > (maintainer) > > Added: > head/sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py > (contents, props changed) > Modified: > head/sysutils/py-salt/Makefile > > Modified: head/sysutils/py-salt/Makefile > ============================================================================== > --- head/sysutils/py-salt/Makefile Thu Oct 31 20:13:54 2013 (r332284) > +++ head/sysutils/py-salt/Makefile Thu Oct 31 20:48:47 2013 (r332285) > @@ -3,6 +3,7 @@ > > PORTNAME= salt > PORTVERSION= 0.17.1 > +PORTREVISION= 1 > CATEGORIES= sysutils python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > > Added: head/sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sysutils/py-salt/files/patch-salt__modules__reebsdpkg.py Thu > Oct 31 20:48:47 2013 (r332285) > @@ -0,0 +1,11 @@ > +--- 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') This is not safe with pkg-1.1 as the /usr/local/etc/pkg.conf file is optional. The best is to execute pkg itself to find out if it is available. This command returning 0 status means pkg is installed and ready for use. 0 is not installed. TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1 > + > + > + @decorators.memoize -- Regards, Bryan Drewery