use Build;
use File::Basename;
-my ($dist, $rpmdeps, $archs, $configdir, $useusedforbuild, $installonly, $noinstall, $usehigherdeps);
+my ($dist, $rpmdeps, $archs, $configdir, $useusedforbuild, $installonly, $noinstall, $usehigherdeps, $isvm);
$configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs';
$usehigherdeps = 1;
next;
}
+ if ($ARGV[0] eq '--vm') {
+ shift @ARGV;
+ $isvm = 1;
+ next;
+ }
last;
}
#######################################################################
+if ($isvm) {
+ push @packdeps, @{$cf->{'vminstall'}};
+}
my @bdeps = Build::get_build($cf, $subpacks, @packdeps, @extradeps);
if (!shift @bdeps) {
# make sure all preinstalls are in bdeps;
# XXX: also add vmdeps?
@bdeps = Build::unify(@bdeps, Build::get_preinstalls($cf));
+if ($isvm) {
+ @bdeps = Build::unify(@bdeps, Build::get_vminstalls($cf));
+}
print_rpmlist(@bdeps);
#
RPMLIST=$BUILD_ROOT/.init_b_cache/rpmlist
test -z "$LIST_STATE" && echo "expanding package dependencies..."
- if ! $BUILD_DIR/expanddeps $USEUSEDFORBUILD $USEHIGHERDEPS "${definesnstuff[@]}" --dist "$BUILD_DIST" --depfile "$CACHE_FILE" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR "${PKGS[@]}" > $RPMLIST ; then
+ VMOPT=
+ test -z "$PREPARE_VM" || VMOPT=--vm
+ if ! $BUILD_DIR/expanddeps $USEUSEDFORBUILD $VMOPT $USEHIGHERDEPS "${definesnstuff[@]}" --dist "$BUILD_DIST" --depfile "$CACHE_FILE" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR "${PKGS[@]}" > $RPMLIST ; then
rm -f $BUILD_IS_RUNNING
cleanup_and_exit 1
fi
# register the QEMU emulator if needed
# (we do not need this for the prepare step, as we do not run scripts in this case)
#
+ copy_qemu
if test -z "$PREPARE_VM" ; then
if check_use_emulator ; then
- copy_qemu
echo "registering binfmt handlers for cross build"
"$BUILD_DIR/$INITVM_NAME"
echo 0 > /proc/sys/vm/mmap_min_addr