Date: Wed, 19 Mar 2014 17:52:36 +0900 From: Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp> To: Michael Gmelin <freebsd@grem.de> Cc: ports@freebsd.org Subject: Re: pkg_replace and detecting pkg(ng) Message-ID: <20140319175236.6318b711cbd177569a30af84@sz.tokoha-u.ac.jp> In-Reply-To: <20140318190852.7b093b00@bsd64.grem.de> References: <20140318190852.7b093b00@bsd64.grem.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, I made a patch for your request. Please see, http://www.freebsd.org/cgi/query-pr.cgi?pr=187723 Thank you. > Hi, > > In the past I've been able to use pkg_replace on machine that didn't > have the ports collection installed. > > With the current version of pkg_replace this doesn't seem to be > possible anymore, since pkg(ng) detection breaks in those cases: > > : ${use_pkgng="`/usr/bin/make -f/usr/share/mk/bsd.port.mk -V > WITH_PKGNG`"} > if [ "x${use_pkgng}" = "xdevel" ]; then > use_pkgng="yes" > fi > > bsd.port.mk requires /usr/ports/Mk/... > > One of the main motivations to use pkg_replace for me is to not having > a ports tree on the machines I use it on. > > I would suggest to replace this with a detection mechanism similar to > what ports does: > > If sysctl -n kern.osreldate >= 1000017 > use_pkgng=yes, unless WITHOUT_PKGNG is defined > else if defined(WITH_PKGNG) (any value, not just ==yes) > use_pkgng=yes > else > use_pkgng=no > > Determining WITH_PKGNG/WITHOUT_PKGNG should be done using make -V VAR > (without specifying a Makefile, so /etc/make.conf is read). > > - Michael > > -- > Michael Gmelin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140319175236.6318b711cbd177569a30af84>