ports/103606: [patch] bsd.port.mk: check-already-installed target does not catch old versions of installed packages
Vasil Dimov
vd at FreeBSD.org
Mon Sep 25 07:00:40 UTC 2006
>Number: 103606
>Category: ports
>Synopsis: [patch] bsd.port.mk: check-already-installed target does not catch old versions of installed packages
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Sep 25 07:00:35 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Vasil Dimov
>Release: FreeBSD 6.2-PRERELEASE amd64
>Organization:
N/A
>Environment:
>Description:
bsd.port.mk reads the following:
3783 if [ -n "$${df}" ]; then \
3784 found_package=$${p}; \
3785 break; \
3786 fi; \
3787 fi; \
3788 done; \
3789 fi ; \
3790 if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; the
Notice the shell started at line 3790 is different from the one which
sets $found_package and thus the variable contents is lost for the
test on 3790 line.
This results in new versions of packages being installed although
the old versions are not deinstalled (e.g. a compleat mess).
>How-To-Repeat:
/usr/ports/security/libgpg-error# make -V PKGNAME
libgpg-error-1.4
/usr/ports/security/libgpg-error# ls -ld /var/db/pkg/libgpg-error-1.3
drwxr-xr-x 2 root wheel 512 Sep 23 02:46 /var/db/pkg/libgpg-error-1.3
/usr/ports/security/libgpg-error# make check-already-installed
===> Checking if security/libgpg-error already installed
/usr/ports/security/libgpg-error# echo $?
0
/usr/ports/security/libgpg-error#
>Fix:
--- bsd.port.mk_check-already-installed.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.543
diff -u -r1.543 bsd.port.mk
--- bsd.port.mk 20 Sep 2006 04:04:05 -0000 1.543
+++ bsd.port.mk 25 Sep 2006 06:37:47 -0000
@@ -3786,8 +3786,8 @@
fi; \
fi; \
done; \
- fi
- @if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \
+ fi ; \
+ if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \
if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
if [ -z "${DESTDIR}" ] ; then \
${ECHO_CMD} "===> ${PKGNAME} is already installed"; \
--- bsd.port.mk_check-already-installed.diff ends here ---
--
Vasil Dimov
gro.DSBeerF at dv
%
The man who sets out to carry a cat by its tail learns something that
will always be useful and which never will grow dim or doubtful.
-- Mark Twain
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list