From owner-svn-ports-head@freebsd.org Wed Jan 3 11:10:35 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EEDBEB9D3C; Wed, 3 Jan 2018 11:10:35 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A4D6F3AD; Wed, 3 Jan 2018 11:10:34 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03BAXr7013970; Wed, 3 Jan 2018 11:10:33 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03BAX6b013968; Wed, 3 Jan 2018 11:10:33 GMT (envelope-from se@FreeBSD.org) Message-Id: <201801031110.w03BAX6b013968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Wed, 3 Jan 2018 11:10:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457952 - in head/ports-mgmt/portmaster: . files X-SVN-Group: ports-head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/ports-mgmt/portmaster: . files X-SVN-Commit-Revision: 457952 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 11:10:35 -0000 Author: se Date: Wed Jan 3 11:10:33 2018 New Revision: 457952 URL: https://svnweb.freebsd.org/changeset/ports/457952 Log: Fix pm_islocked function, which could lead to a spurious error message if used for a port that is not found in the package database. Reported by: Tatsuki Makino Approved by: antoine (implicit) Modified: head/ports-mgmt/portmaster/Makefile head/ports-mgmt/portmaster/files/patch-portmaster Modified: head/ports-mgmt/portmaster/Makefile ============================================================================== --- head/ports-mgmt/portmaster/Makefile Wed Jan 3 10:54:19 2018 (r457951) +++ head/ports-mgmt/portmaster/Makefile Wed Jan 3 11:10:33 2018 (r457952) @@ -2,7 +2,7 @@ PORTNAME= portmaster PORTVERSION= 3.18 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= ports-mgmt MAINTAINER= se@FreeBSD.org Modified: head/ports-mgmt/portmaster/files/patch-portmaster ============================================================================== --- head/ports-mgmt/portmaster/files/patch-portmaster Wed Jan 3 10:54:19 2018 (r457951) +++ head/ports-mgmt/portmaster/files/patch-portmaster Wed Jan 3 11:10:33 2018 (r457952) @@ -27,7 +27,19 @@ *'make -DBATCH checksum'*|*'/fetch '*|\[sh\]) pm_kill $pid ;; esac ;; esac -@@ -412,7 +411,7 @@ usage () { +@@ -333,9 +332,8 @@ pm_mktemp () { + fail "mktemp for $1 failed:\n ${pm_mktemp_file#mktemp: }" + } + pm_unlink () { [ -e "$1" ] && /bin/unlink $1; } +-pm_islocked () { [ -n "$1" ] || return 1; +- [ -e "$pdb/$1/+IGNOREME" ] && pkg info -e "$1" || +- [ `pkg query %k "$1"` -eq "1" ]; } ++pm_islocked () { local locked; [ -n "$1" ] && locked=`pkg query %k "$1"` && ++ [ "$locked" = 1 -o -e "$pdb/$1/+IGNOREME" ]; } + + # Superuser versions for commands that need root privileges + +@@ -412,7 +410,7 @@ usage () { echo " [[[--packages|-P]|[--packages-only|-PP]] | [--packages-build]]" echo " [--packages-if-newer] [--delete-build-only] [--always-fetch]" echo " [--local-packagedir=] [--packages-local] [--delete-packages]" @@ -36,7 +48,7 @@ echo " [--index|--index-first|--index-only] [-m ]" echo " [-x ]" echo "$progname [Common flags] " -@@ -653,6 +652,10 @@ for var in "$@" ; do +@@ -653,6 +651,10 @@ for var in "$@" ; do export LOCAL_PACKAGEDIR ;; --delete-packages) PM_DELETE_PACKAGES=pm_delete_packages export PM_DELETE_PACKAGES ;; @@ -47,7 +59,7 @@ # --flavor=*) PM_FLAVOR=${var#--flavor=} ;; --update-if-newer) PM_UPDATE_IF_NEWER=pm_update_if_newer export PM_UPDATE_IF_NEWER ;; -@@ -1589,25 +1592,30 @@ init_packages () { +@@ -1589,25 +1591,30 @@ init_packages () { } pm_pkg_create () { @@ -80,7 +92,7 @@ if [ "$1" = "$pbu" ]; then if [ -n "$BACKUP" ]; then echo " ===>>> Package saved to $1" ; echo '' -@@ -1616,15 +1624,14 @@ pm_pkg_create () { +@@ -1616,15 +1623,14 @@ pm_pkg_create () { NB_DELETE="${NB_DELETE}${pkg} " fi elif [ "$1" = "$PACKAGES" ]; then @@ -100,7 +112,7 @@ fi cd ${1}/${portdir%/*} -@@ -1665,7 +1672,7 @@ find_dl_distfiles () { +@@ -1665,7 +1671,7 @@ find_dl_distfiles () { else # Old method, for now if pm_cd $pd/$1; then @@ -109,7 +121,7 @@ dist_list="${dist_list%options}distfiles" else # The port might have moved, etc.; so take a stab at it, -@@ -1803,6 +1810,7 @@ set_distfiles_and_subdir () { +@@ -1803,6 +1809,7 @@ set_distfiles_and_subdir () { } delete_stale_distfiles () { @@ -117,7 +129,7 @@ # Global: distfiles_checked local file answer -@@ -1849,6 +1857,7 @@ delete_stale_distfiles () { +@@ -1849,6 +1856,7 @@ delete_stale_distfiles () { } delete_all_distfiles () { @@ -125,7 +137,7 @@ # Global: delete_all DISTDIR local origin rc delete_current -@@ -2264,12 +2273,14 @@ make_dep_list () { +@@ -2264,12 +2272,14 @@ make_dep_list () { for dep_type in $*; do case $dep_type in @@ -145,7 +157,7 @@ *) fail "make_dep_list: Unsupported option '$dep_type'" esac -@@ -3302,7 +3313,7 @@ pm_cd_pd $portdir +@@ -3302,7 +3312,7 @@ pm_cd_pd $portdir if [ -n "$PM_BUILD_ONLY_LIST" ]; then case "$build_only_dl_g" in @@ -154,7 +166,7 @@ [ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=doing_build_only_dep [ -n "$PM_DEL_BUILD_ONLY" ] && PM_DEL_BUILD_ONLY=doing_build_only_dep ;; *) [ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=pmp_build -@@ -3402,31 +3413,19 @@ fetch_package () { +@@ -3402,31 +3412,19 @@ fetch_package () { } if [ -z "$PACKAGESITE" -a -z "$PM_PACKAGES_LOCAL" ]; then release=`uname -r` @@ -191,7 +203,7 @@ echo "===>>> Checking package repository for latest available version" -@@ -3437,11 +3436,12 @@ fetch_package () { +@@ -3437,11 +3435,12 @@ fetch_package () { latest_pv=${local_package##*/} fi if [ -z "$latest_pv" -a -z "$PM_INDEX_ONLY" ]; then @@ -209,7 +221,7 @@ latest_pv=${latest_pv##*/} else pm_v "===>>> No local package for ${new_port}, attempting fetch" -@@ -3850,7 +3850,7 @@ fi +@@ -3850,7 +3849,7 @@ fi if [ -n "$MAKE_PACKAGE" ]; then if [ -z "$use_package" ]; then echo "===>>> Creating a package for new version $new_port"