$root = '' if !defined($root) || $root eq '/';
local *F;
- my $dochroot = $root ne '' && !$opts{'nochroot'} && !$< && (-x "$root/usr/bin/rpm" || -x "$root/bin/rpm") ? 1 : 0;
+ my $dochroot = $root ne '' && !$opts{'nochroot'} && !$< ? 1 : 0;
my $pid = open(F, '-|');
die("fork: $!\n") unless defined $pid;
if (!$pid) {
}
pkg_install_rpm() {
- export ADDITIONAL_PARAMS=
- if test "$USE_FORCE" = true ; then
- export ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --force"
- fi
- # work around for cross-build installs, we must not overwrite the running rpm
- if test "$PKG" = rpm ; then
- for i in $BUILD_ROOT/.init_b_cache/preinstalls/rpm-x86-* ; do
- test -e "$i" && ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --justdb"
- done
- fi
( cd $BUILD_ROOT && chroot $BUILD_ROOT rpm --ignorearch --nodeps -U --oldpackage --ignoresize $RPMCHECKOPTS \
$ADDITIONAL_PARAMS .init_b_cache/$PKG.rpm 2>&1 || \
touch $BUILD_ROOT/exit ) | \
fi
check_exit
fi
-
+
+ export ADDITIONAL_PARAMS=
+ if test "$USE_FORCE" = true ; then
+ export ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --force"
+ fi
+ # work around for cross-build installs, we must not overwrite the running rpm
+ if test "$PKG" = rpm ; then
+ for i in $BUILD_ROOT/.init_b_cache/preinstalls/rpm-x86-* ; do
+ test -e "$i" && ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --justdb"
+ done
+ fi
+
if pkg_cumulate ; then
echo "cumulate ${PKGID%% *}"
continue
fi
-
+
# install the package
echo "installing ${PKGID%% *}"
if ! test "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" -ef "$BUILD_ROOT/.init_b_cache/$PKG.$PSUF" ; then