From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 12 10:30:00 2012 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD4E9410 for ; Wed, 12 Dec 2012 10:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC8A8FC0C for ; Wed, 12 Dec 2012 10:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBCAU0Bx056912 for ; Wed, 12 Dec 2012 10:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBCAU0oG056911; Wed, 12 Dec 2012 10:30:00 GMT (envelope-from gnats) Resent-Date: Wed, 12 Dec 2012 10:30:00 GMT Resent-Message-Id: <201212121030.qBCAU0oG056911@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Emanuel Haupt Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E76452C9 for ; Wed, 12 Dec 2012 10:22:26 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C26238FC0C for ; Wed, 12 Dec 2012 10:22:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBCAMQCT056616 for ; Wed, 12 Dec 2012 10:22:26 GMT (envelope-from ehaupt@freefall.freebsd.org) Received: (from ehaupt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBCAMQqv056615; Wed, 12 Dec 2012 11:22:26 +0100 (CET) (envelope-from ehaupt) Message-Id: <201212121022.qBCAMQqv056615@freefall.freebsd.org> Date: Wed, 12 Dec 2012 11:22:26 +0100 (CET) From: Emanuel Haupt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.114 Subject: ports/174387: [update] sysutils/bsdadminscripts provide a patch to make pkg_libchk work with pkgng/pkg_* vice versa X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Emanuel Haupt List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2012 10:30:00 -0000 >Number: 174387 >Category: ports >Synopsis: [update] sysutils/bsdadminscripts provide a patch to make pkg_libchk work with pkgng/pkg_* vice versa >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Dec 12 10:30:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Emanuel Haupt >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r243869M: Tue Dec 4 21:58:48 UTC 2012 root@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64 >Description: Provide a patch to make pkg_libchk work with pkgng/pkg_* vice versa. >How-To-Repeat: >Fix: --- bsdadminscripts.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 308751) +++ Makefile (working copy) @@ -7,7 +7,7 @@ PORTNAME= bsdadminscripts PORTVERSION= 6.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils ports-mgmt MASTER_SITES= SF/${PORTNAME}/${PORTNAME} Index: files/patch-pkg_libchk =================================================================== --- files/patch-pkg_libchk (working copy) +++ files/patch-pkg_libchk (working copy) @@ -1,14 +1,21 @@ ---- pkg_libchk.orig 2011-07-16 21:42:34.990085774 +0400 -+++ pkg_libchk 2011-07-16 21:45:53.405082081 +0400 -@@ -23,6 +23,7 @@ +--- ./pkg_libchk.orig 2009-04-19 17:57:16.000000000 +0200 ++++ ./pkg_libchk 2012-12-12 11:13:12.000000000 +0100 +@@ -23,6 +23,14 @@ readonly name=pkg_libchk readonly version=1.6.1 +readonly osname=`uname -s` ++ ++pkgng="" ++if [ -f "/var/db/pkg/local.sqlite" ]; then ++ pkgng="yes" ++else ++ pkgng="no" ++fi # Use a line break as delimiter. IFS=' -@@ -206,7 +207,7 @@ +@@ -206,7 +214,7 @@ # We cannot handle non-native binaries, # so assume everything is in order. if ! readelf -e "$1" 2>&1 | \ @@ -17,3 +24,58 @@ > /dev/null then return 2 +@@ -405,10 +413,17 @@ + + # Get the packages to work on. + test -z "$packages" && packages="-a" +-packages="$(pkg_info -E $packages)" +-test -z "$recursive" -a -z "$Recursive" || packages="$packages +-$(pkg_info -q $recursive $Recursive "$packages" 2> /dev/null | \ +-sed -E 's|^@pkgdep[[:space:]]*||1')" ++if [ "$pkgng" = "yes" ]; then ++ packages="$(pkg info -q $packages)" ++ test -z "$recursive" -a -z "$Recursive" || packages="$packages ++ $(pkg info -q $recursive $Recursive "$packages" 2> /dev/null | \ ++ sed -E 's|^@pkgdep[[:space:]]*||1')" ++else ++ packages="$(pkg_info -E $packages)" ++ test -z "$recursive" -a -z "$Recursive" || packages="$packages ++ $(pkg_info -q $recursive $Recursive "$packages" 2> /dev/null | \ ++ sed -E 's|^@pkgdep[[:space:]]*||1')" ++fi + + # Create the regexp to match ldd output + match_expr="$compat=> not found|dependency .+ not found" +@@ -420,9 +435,15 @@ + # Check each selected package. + for package in $packages; { + package_num="$(($package_num + 1))" +- test $origin \ +- && package_name="$(pkg_info -qo "$package")" \ +- || package_name="$package" ++ if [ "$pkgng" = "yes" ]; then ++ test $origin \ ++ && package_name="$(pkg info -qo "$package")" \ ++ || package_name="$package" ++ else ++ test $origin \ ++ && package_name="$(pkg_info -qo "$package")" \ ++ || package_name="$package" ++ fi + + # Print what we're doing. + statusSet "Starting job $package_num of $package_amount: $package_name" +@@ -432,7 +453,12 @@ + # Remember freeing the semaphore. + trap 'semaphoreFree jobs' EXIT + +- files="$(pkg_info -qL "$package")" ++ files="" ++ if [ "$pkgng" = "yes" ]; then ++ files="$(pkg info -lq "$package")" ++ else ++ files="$(pkg_info -qL "$package")" ++ fi + # Get the programs libraries in case it doesn't use the + # operating system to find its libraries. + libraries="$(echo "$files" | grep -E '\.so[\.0-9]*$')" Index: files/patch-src::pkg_libchk =================================================================== --- files/patch-src::pkg_libchk (revision 308751) +++ files/patch-src::pkg_libchk (working copy) @@ -1,19 +0,0 @@ ---- pkg_libchk.orig 2011-07-16 21:42:34.990085774 +0400 -+++ pkg_libchk 2011-07-16 21:45:53.405082081 +0400 -@@ -23,6 +23,7 @@ - - readonly name=pkg_libchk - readonly version=1.6.1 -+readonly osname=`uname -s` - - # Use a line break as delimiter. - IFS=' -@@ -206,7 +207,7 @@ - # We cannot handle non-native binaries, - # so assume everything is in order. - if ! readelf -e "$1" 2>&1 | \ -- grep -E "^[[:space:]]*OS/ABI:[[:space:]]*UNIX - $OSTYPE\$" \ -+ grep -E "^[[:space:]]*OS/ABI:[[:space:]]*UNIX - $osname\$" \ - > /dev/null - then - return 2 --- bsdadminscripts.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: