pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/34830: "make update" fails for packages with dependent packages



>Number:         34830
>Category:       pkg
>Synopsis:       "make update" fails for packages with dependent packages
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 15 19:50:00 +0000 2006
>Originator:     Kaspar Brand
>Release:        pkgsrc-2006Q3
>Organization:
>Environment:
System: NetBSD 3.0
Architecture: i386
Machine: i386
>Description:

Executing "make update" fails for packages which have dependent
packages - because DEINSTALLDEPENDS is not picked up correctly by
"su-target" in bsd.pkg.mk. Due to the missing "-r" switch, pkg_delete
will not remove the old package (and its dependent packages), and
therefore pkg_install for the new one will fail.

>How-To-Repeat:
Install security/audit-packages (pulls in pkgtools/digest), then
try updating pkgtools/digest:

$ make update
===> Deinstalling for digest-20060826
=> Becoming ``root'' to make su-deinstall (/usr/bin/su)
Password:
Running /usr/bin/env  /usr/sbin/pkg_delete -K /var/db/pkg  digest-20060826
pkg_delete: package `digest-20060826' is required by other packages:
        audit-packages-1.43
=> Dropping ``root'' privileges.
===> Checking for vulnerabilities in digest-20060826
===> Installing dependencies for digest-20060826
===> Overriding tools for digest-20060826
===> Extracting for digest-20060826
===> Patching for digest-20060826
===> Creating toolchain wrappers for digest-20060826
===> Configuring for digest-20060826
...
==> Installing for digest-20060826
=> Becoming ``root'' to make su-install-all (/usr/bin/su)
Password:
ERROR: digest-20060826 is already installed - perhaps an older version?
ERROR: If so, you may use either of:
ERROR:     - "pkg_delete digest-20060826" and "/usr/bin/make reinstall"
ERROR:       to upgrade properly
ERROR:     - "/usr/bin/make update" to rebuild the package and all
ERROR:       of its dependencies
ERROR:     - "/usr/bin/make replace" to replace only the package without
ERROR:       re-linking dependencies, risking various problems.
*** Error code 1

Stop.
make: stopped in /home/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
make: stopped in /home/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/pkgtools/digest

>Fix:
Apply the fix below (diff against pkgsrc-current)

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1888
diff -u -r1.1888 bsd.pkg.mk
--- bsd.pkg.mk  15 Oct 2006 16:20:34 -0000      1.1888
+++ bsd.pkg.mk  15 Oct 2006 18:02:06 -0000
@@ -691,7 +691,7 @@
                        PATH="$${PATH}:"${SU_CMD_PATH_APPEND:Q}         \
                ${MAKE} ${MAKEFLAGS}                                    \
                        PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL:Q}            \
-                       su-${.TARGET} ${MAKEFLAGS.${.TARGET}}
+                       su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}

 .PHONY: su-target
 su-target: .USE




Home | Main Index | Thread Index | Old Index