pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg_rolling-replace infinite loop?
On Sat, 21 Aug 2010, Ian D. Leroux wrote:
> In my case, the packages in $REPLACE_TODO were py26-gnupg
> and py26-setuptools, while $TSORTED contained py25-gnupg and
> py25-setuptools, so the last package in my $TSORTED list (wl-snapshot)
> just got repeatedly reinstalled
You may be encountering an old bug, in which the attempt to build
py25-something actually ends up building py26-something, simply because
of PYTHON_VERSION_DEFAULT=26. Then, next time round the loop, pkg_rr
notices that py25-something is not installed, so it tries again, with
the same bad result.
Please try the appended patch, which I have been using for some time.
--apb (Alan Barrett)
--- pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh 11 Feb
2010 12:54:27 -0000 1.28
+++ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh 19 Apr
2010 20:06:21 -0000
@@ -445,13 +539,20 @@ while [ -n "$REPLACE_TODO" ]; do
# tsorted order and run 'make install' on it. This seems like
# such a rare case that the added complexity isn't worth it.
+ # Set PKGNAME_REQD to give underlying make processes a chance to
+ # set options derived from the package name. For example,
+ # the appropriate version of Python can be derived from the
+ # package name (so, when building py25-foo, use python-2.5,
+ # not python-2.6).
+ MAKE_SET_VARS='PKGNAME_REQD=${pkg}-*'
+
if ! is_member $pkg $DEPENDS_CHECKED; then
echo "${OPI} Checking if $pkg has new depends..."
OLD_DEPENDS=$(${PKG_INFO} -Nq $pkg | sed 's/-[0-9][^-]*$//')
NEW_DEPENDS=
cd "$PKGSRCDIR/$pkgdir"
- bdeps=$(${MAKE} show-depends VARNAME=BUILD_DEPENDS)
- rdeps=$(${MAKE} show-depends)
+ bdeps=$(${MAKE} ${MAKE_SET_VARS} show-depends VARNAME=BUILD_DEPENDS)
+ rdeps=$(${MAKE} ${MAKE_SET_VARS} show-depends)
for depver in $bdeps $rdeps; do
dep=$(echo $depver | sed -e 's/[:[].*$/0/' -e 's/[<>]=/-/' \
-e 's/-[0-9][^-]*$//')
@@ -491,7 +592,7 @@ while [ -n "$REPLACE_TODO" ]; do
if [ -z "$fail" ]; then
if [ -z "$opt_F" ]; then
echo "${OPI} Replacing $pkgname"
- cmd="${MAKE} clean || fail=1"
+ cmd="${MAKE} ${MAKE_SET_VARS} clean || fail=1"
if [ -n "$opt_n" ]; then
echo "${OPI} Would run: $cmd"
else
@@ -505,10 +606,10 @@ while [ -n "$REPLACE_TODO" ]; do
error "'make clean' failed for package $pkg."
fi
fi
- cmd="${MAKE} replace || fail=1" # XXX OLDNAME= support? xmlrpc-c ->
xmlrpc-c-ss
+ cmd="${MAKE} ${MAKE_SET_VARS} replace || fail=1" # XXX OLDNAME=
support? xmlrpc-c -> xmlrpc-c-ss
else
echo "${OPI} Fetching $pkgname"
- cmd="${MAKE} fetch depends-fetch || fail=1"
+ cmd="${MAKE} ${MAKE_SET_VARS} fetch depends-fetch || fail=1"
fi
fi
@@ -536,7 +637,7 @@ while [ -n "$REPLACE_TODO" ]; do
# If -r not given, make a binary package.
if [ -z "$opt_r" -a -z "$fail" -a -z "$opt_F" ]; then
echo "${OPI} Packaging $(${PKG_INFO} -e $pkg)"
- cmd="${MAKE} package || fail=1"
+ cmd="${MAKE} ${MAKE_SET_VARS} package || fail=1"
if [ -n "$opt_n" -a -z "$fail" ]; then
echo "${OPI} Would run: $cmd"
elif [ -z "$fail" ]; then
@@ -553,7 +654,7 @@ while [ -n "$REPLACE_TODO" ]; do
fi
# Clean
if [ -z "$opt_n" -a -z "$fail" -a -z "$opt_F" ]; then
- cmd="${MAKE} clean || fail=1"
+ cmd="${MAKE} ${MAKE_SET_VARS} clean || fail=1"
if [ -n "$logfile" ]; then
eval "$cmd" >&3 2>&3
else
Home |
Main Index |
Thread Index |
Old Index