Date: Fri, 5 Sep 2014 07:47:04 +0000 (UTC) From: Dirk Meyer <dinoex@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r367326 - in head/ports-mgmt/pkg_jail: . files Message-ID: <201409050747.s857l4xl054979@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dinoex Date: Fri Sep 5 07:47:03 2014 New Revision: 367326 URL: http://svnweb.freebsd.org/changeset/ports/367326 QAT: https://qat.redports.org/buildarchive/r367326/ Log: - update to 1.78 - defaults to pkg Modified: head/ports-mgmt/pkg_jail/Makefile head/ports-mgmt/pkg_jail/files/README head/ports-mgmt/pkg_jail/files/pkg_update Modified: head/ports-mgmt/pkg_jail/Makefile ============================================================================== --- head/ports-mgmt/pkg_jail/Makefile Fri Sep 5 03:39:47 2014 (r367325) +++ head/ports-mgmt/pkg_jail/Makefile Fri Sep 5 07:47:03 2014 (r367326) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= pkg_jail -PORTVERSION= 1.77 +PORTVERSION= 1.78 CATEGORIES= ports-mgmt MASTER_SITES= # empty DISTFILES= # empty Modified: head/ports-mgmt/pkg_jail/files/README ============================================================================== --- head/ports-mgmt/pkg_jail/files/README Fri Sep 5 03:39:47 2014 (r367325) +++ head/ports-mgmt/pkg_jail/files/README Fri Sep 5 07:47:03 2014 (r367326) @@ -11,9 +11,8 @@ # --------------------------------------- # # -# pkg_update cvsup -# Installs a copy of cvsup-without-gui package and start -# "make update" for the ports tree. +# pkg_update update-ports +# Starts "make update" for the ports tree. # # # pkg_update make-packages @@ -57,14 +56,14 @@ # # pkg_update full-update-jail # do full update cycle -# 1) "cvsup" to update the ports tree +# 1) "update-ports" to update the ports tree # 2) "clean-distfiles" to keep only current distfiles # 3) "clean-packages" to keep only good packages # 4) remove all old error logs # 5) "make-packages" to rebuild missing packages # # pkg_update full-update-jail retry -# Skip "cvsup" and procced as above. +# Skip "update-ports" and procced as above. # # # clean-usr-lib.sh: @@ -84,7 +83,7 @@ # Fetch distfiles for list of ports and their dependecies. # # pkg_update show-extra-files -# list files in portsdir that are not updated by cvsup +# list files in portsdir that are not updated by update-ports # # # Modified: head/ports-mgmt/pkg_jail/files/pkg_update ============================================================================== --- head/ports-mgmt/pkg_jail/files/pkg_update Fri Sep 5 03:39:47 2014 (r367325) +++ head/ports-mgmt/pkg_jail/files/pkg_update Fri Sep 5 07:47:03 2014 (r367326) @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: pkg_update,v 1.77 2014/05/16 09:08:12 cvs Exp $ +# $Id: pkg_update,v 1.78 2014/09/05 07:42:04 cvs Exp $ # $FreeBSD$ # # Copyright (c) 2001-2006 @@ -151,7 +151,7 @@ read_env_local() { if test -f "${fulldir}/Env.local" then echo "=== Reading ${fulldir}/Env.local" - local_env="env "`tr '\n' ' ' < "${fulldir}/Env.local"` + local_env=`tr '\n' ' ' < "${fulldir}/Env.local"` fi } @@ -375,7 +375,7 @@ port_uptodate() { esac # # creates dependency - make checksum >&2 + env ${pkg_env} make checksum >&2 # if test ! -e "${depends}" then @@ -384,7 +384,7 @@ port_uptodate() { fi # for fulldir in ` - make all-depends-list | + env ${pkg_env} make all-depends-list | sed -f "${depends}"` do dir="${fulldir##${portsdir}/}" @@ -495,17 +495,17 @@ port_uptodate() { if test -f "${base}/Env.local" then echo "=== Reading ${base}/Env.local" - local_env="env "`tr '\n' ' ' < "${base}/Env.local"` + local_env=`tr '\n' ' ' < "${base}/Env.local"` fi prefix="/usr/local" if test ! -d "${prefix}" then mkdir -p "${prefix}" fi - echo "cd ${base} && ${local_env} make package > ${logdir}/err,${log} 2>&1" + echo "cd ${base} && env ${pkg_env} ${local_env} make package > ${logdir}/err,${log} 2>&1" case "$1" in make*) - ( cd "${base}" && ${local_env} make package </dev/null >> "${logdir}/err,${log}" 2>&1 ) + ( cd "${base}" && env ${pkg_env} ${local_env} make package </dev/null >> "${logdir}/err,${log}" 2>&1 ) pkgfile=`cd "${base}" && make -V PKGFILE` if test -e "${pkgfile}" then @@ -514,7 +514,7 @@ port_uptodate() { mv -f "${logdir}/build,${log}" "${logdir}/last,${log}" fi mv -f "${logdir}/err,${log}" "${logdir}/build,${log}" - ( cd ${base} && make clean NOCLEANDEPENDS=yes ) + ( cd ${base} && env ${pkg_env} make clean NOCLEANDEPENDS=yes ) if run_pkg_installed then return 0 @@ -558,7 +558,7 @@ port_uptodate() { mv -f "${logdir}/build,${log}" "${logdir}/last,${log}" fi mv -f "${logdir}/err,${log}" "${logdir}/build,${log}" - ( cd ${base} && make clean NOCLEANDEPENDS=yes ) + ( cd ${base} && env ${pkg_env} make clean NOCLEANDEPENDS=yes ) else echo "=====================================" >&2 echo "=== package ${pkgname} was not build" >&2 @@ -633,7 +633,7 @@ make_packages_in_dir() { echo "port_uptodate: aborted!" fi - make deinstall + env ${pkg_env} make deinstall run_pkg_delete_all if test -f ${localdir}/data/badfiles then @@ -1317,7 +1317,7 @@ dependency_update() { then continue fi - ( cd "${portsdir}/${dir}" && make run-depends-list ) | + ( cd "${portsdir}/${dir}" && env ${pkg_env} make run-depends-list ) | while read depdir do if test ! -d "${depdir}" @@ -1983,6 +1983,29 @@ next_target() { exec /bin/sh "${0}" "${@}" } # +# make sure /etc/make.conf is set up +validate_make_conf() { + + use_packges=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V USE_PACKAGE_DEPENDS` + if test "${use_packges}" = "" + then + echo "### Please add to your /etc/make.conf ####" >&2 + echo "USE_PACKAGE_DEPENDS=yes" >&2 + exit 65 + fi + + depends_target=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V DEPENDS_TARGET` + case "${depends_target}" in + 'package install') + ;; + *) + echo "### Please add to your /etc/make.conf ####" >&2 + echo "DEPENDS_TARGET=package install" >&2 + exit 65 + ;; + esac +} +# # inform usage usage() { echo "Usage:" >&2 @@ -2012,7 +2035,7 @@ usage() { echo " ${0##*/} replace-package [port] [...]" >&2 echo " ${0##*/} clean ..." >&2 echo " ${0##*/} check-installed-ports [port]" >&2 - echo " ${0##*/} cvsup ..." >&2 + echo " ${0##*/} update-ports ..." >&2 echo " ${0##*/} full-update-jail [retry] ..." >&2 echo " ${0##*/} show-extra-files" >&2 echo " ${0##*/} check-update ..." >&2 @@ -2040,17 +2063,19 @@ inrequired="/tmp/inrequired-seen" failed="/tmp/easy-failed" failcount="/tmp/easy-failecount.txt" pkginfo_cache="/var/tmp/pkginfo_cache" +pkg_prefix="/usr/pkgng" +pkg_env="PKG_DEPENDS= PKG_PREFIX=${pkg_prefix} PKG_BIN=${pkg_prefix}/sbin/pkg-static" # # get all path information from /etc/make.conf nowarn="COMMENT=0 CATEGORIES=0 PORTVERSION=0" portsdir=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PORTSDIR` pkg_dbdir=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PKG_DBDIR` packages=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V PACKAGES` -if test -f /usr/sbin/pkg_add +if test -e /usr/sbin/pkg then - pkgng="" -else pkgng="yes" +else + pkgng="" fi quiet_mkdir "${pkginfo_cache}" # @@ -2067,6 +2092,7 @@ make-packages) exit 64 fi shift + validate_make_conf parse_default "${#}" quiet_mkdir "${localdir}/data" "${logdir}" for i in "${@}" @@ -2455,7 +2481,7 @@ check-installed-ports) fi rm -f "${tmp1}" "${tmp2}" ;; -cvsup) +update-ports|cvsup) sup=`cd ${portsdir} && make -V SUP` if test -f "${cvsupscript}" then @@ -2515,6 +2541,14 @@ check-update) /bin/sh "${0}" show-missing-installed next_target "${@}" ;; +update-pkg) + cd "${portsdir}/ports-mgmt/pkg" && make clean deinstall PREFIX=/usr/pkgng package install + if test ! -h /usr/sbin/pkg + then + mv -f /usr/sbin/pkg /usr/sbin/pkg.orig + ln -s "${pkg_prefix}/sbin/pkg" /usr/sbin/pkg + fi + ;; *) usage esac
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409050747.s857l4xl054979>