From owner-svn-ports-all@freebsd.org Mon Jan 29 12:22:05 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25210EC34A9; Mon, 29 Jan 2018 12:22:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD9DE6FE20; Mon, 29 Jan 2018 12:22:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C88F2E2; Mon, 29 Jan 2018 12:22:04 +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 w0TCM4UA016973; Mon, 29 Jan 2018 12:22:04 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0TCM4eB016971; Mon, 29 Jan 2018 12:22:04 GMT (envelope-from se@FreeBSD.org) Message-Id: <201801291222.w0TCM4eB016971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 29 Jan 2018 12:22:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460294 - 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: 460294 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 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, 29 Jan 2018 12:22:05 -0000 Author: se Date: Mon Jan 29 12:22:04 2018 New Revision: 460294 URL: https://svnweb.freebsd.org/changeset/ports/460294 Log: Fix a problem that could result in de-installation of a port that shares a prefix of the package name with a new port to be installed. The cause of this bug was that a pattern was applied without anchor at the end. Testing revealed that "pkg info -x" ignores an anchor at the end of the pattern (which might be a bug in pkg), therefore the output of the query is now additionally filtered with egrep to obtain the desired result. PR: 225496 Reported by: Martin Birgmeier 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 Mon Jan 29 12:20:02 2018 (r460293) +++ head/ports-mgmt/portmaster/Makefile Mon Jan 29 12:22:04 2018 (r460294) @@ -2,7 +2,7 @@ PORTNAME= portmaster PORTVERSION= 3.19 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= ports-mgmt MAINTAINER= se@FreeBSD.org Modified: head/ports-mgmt/portmaster/files/patch-portmaster ============================================================================== --- head/ports-mgmt/portmaster/files/patch-portmaster Mon Jan 29 12:20:02 2018 (r460293) +++ head/ports-mgmt/portmaster/files/patch-portmaster Mon Jan 29 12:22:04 2018 (r460294) @@ -177,7 +177,23 @@ else portdir="${1#$pd/}" ; portdir="${portdir%/}" export_flavor=$(flavor_part $portdir) -@@ -3229,11 +3246,14 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_ONLY" ]; then +@@ -3138,12 +3155,13 @@ if [ -z "$PM_INDEX_ONLY" ] && ! pm_isdir_pd "$portdir" + fi + + iport_from_pkgname () { +- local dir flavor pkgname ++ local dir flavor pkgname pattern + + dir=$(dir_part $1) + flavor=$(flavor_part $1) + pkgname=$(FLAVOR=$flavor make -C "$pd/$dir" -V PKGNAME) || return 1 +- pkg info -x "^${pkgname%-*}"'-[^-]*' 2>/dev/null ++ pattern="^${pkgname%-*}"'-[^-]*$' ++ pkg info -x "$pattern" 2>/dev/null | egrep -- "$pattern" + } + + if [ -z "$upg_port" -a -z "$REPLACE_ORIGIN" ]; then +@@ -3229,11 +3247,14 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_ONLY" ]; then fi fi @@ -193,7 +209,7 @@ # Do these things first time through if [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then # Do not start this in the background until we are sure we are going to proceed -@@ -3639,12 +3659,18 @@ pkg_flavor () { +@@ -3639,12 +3660,18 @@ pkg_flavor () { if [ -n "$HIDE_BUILD" ] && [ -n "$(pm_make -V LICENSE)" ]; then pm_make extract ask-license || fail "make extract ask-license failed for $portdir" fi @@ -212,7 +228,7 @@ else [ -z "$local_package" ] && { fetch_package $latest_pv || fail "Fetch for ${latest_pv}.txz failed"; } -@@ -3876,9 +3902,12 @@ if [ -n "$MAKE_PACKAGE" ]; then +@@ -3876,9 +3903,12 @@ if [ -n "$MAKE_PACKAGE" ]; then fi if [ -z "$use_package" -a -z "$DONT_POST_CLEAN" ]; then