delete $config->{'save_expanded'};
$config->{'preinstall'} = [];
$config->{'vminstall'} = [];
+ $config->{'cbpreinstall'} = [];
+ $config->{'cbinstall'} = [];
$config->{'runscripts'} = [];
$config->{'required'} = [];
$config->{'support'} = [];
}
next;
}
- if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 'runscripts:') {
+ if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'cbpreinstall:' || $l0 eq 'cbinstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 'runscripts:') {
my $t = substr($l0, 0, -1);
for my $l (@l) {
if ($l eq '!*') {
warn("unknown keyword in config: $l0\n");
}
}
- for my $l (qw{preinstall vminstall required support keep runscripts repotype patterntype}) {
+ for my $l (qw{preinstall vminstall cbpreinstall cbinstall required support keep runscripts repotype patterntype}) {
$config->{$l} = [ unify(@{$config->{$l}}) ];
}
for my $l (keys %{$config->{'substitute'}}) {
return @{$config->{'vminstall'}};
}
+sub get_cbpreinstalls {
+ my ($config) = @_;
+ return @{$config->{'cbpreinstall'}};
+}
+
+sub get_cbinstalls {
+ my ($config) = @_;
+ return @{$config->{'cbinstall'}};
+}
+
sub get_runscripts {
my ($config) = @_;
return @{$config->{'runscripts'}};
while read PKG SRC ; do
test "$PKG" = "preinstall:" && continue
test "$PKG" = "runscripts:" && continue
+ test "$PKG" = "cbpreinstall:" && continue
test "$PKG" = "vminstall:" && continue
test "$PKG" = "dist:" && continue
test "$PKG" = "rpmid:" && continue
PACKAGES_TO_PREINSTALL=
PACKAGES_TO_RUNSCRIPTS=
PACKAGES_TO_VMINSTALL=
+ PACKAGES_TO_CBPREINSTALL=
+ PACKAGES_TO_CBINSTALL=
RUNSCRIPTS_SEEN=
GUESSED_DIST=unknown
mkdir -p $BUILD_ROOT/.init_b_cache/rpms
PACKAGES_TO_VMINSTALL=$SRC
continue
fi
+ # these additional preinstall / install values are only set for
+ # emulated "CrossBuild" setups - thus CB(pre)install
+ if test "$PKG" = "cbpreinstall:" ; then
+ if is_emulator_arch ; then
+ PACKAGES_TO_CBPREINSTALL=$SRC
+ fi
+ continue
+ fi
+ if test "$PKG" = "cbinstall:" ; then
+ if is_emulator_arch ; then
+ PACKAGES_TO_CBINSTALL=$SRC
+ fi
+ continue
+ fi
if test "$PKG" = "runscripts:" ; then
RUNSCRIPTS_SEEN=true
PACKAGES_TO_RUNSCRIPTS=$SRC
PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $PKG"
done < $RPMLIST
+ test -n "$PACKAGES_TO_CBPREINSTALL" && echo "cbpreinstall: $PACKAGES_TO_CBPREINSTALL"
+ test -n "$PACKAGES_TO_CBINSTALL" && echo "cbinstall : $PACKAGES_TO_CBINSTALL"
# compatibility...
test -z "$RUNSCRIPTS_SEEN" && PACKAGES_TO_RUNSCRIPTS="$PACKAGES_TO_PREINSTALL"
preinstall ${PKG##*/}
done
fi
+ # add cbpreinstall if cross HOST != TARGET
+ for PKG in $PACKAGES_TO_CBPREINSTALL ; do
+ preinstall ${PKG##*/}
+ done
if [ -w /root ]; then
test -c $BUILD_ROOT/dev/null || create_devs
fi
test "$PKG" = "*" && continue
ln $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG $BUILD_ROOT/.init_b_cache/todelete/$PKG
done
-for PKG in $PACKAGES_TO_INSTALL_FIRST $PACKAGES_TO_INSTALL ; do
+for PKG in $PACKAGES_TO_INSTALL_FIRST $PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL ; do
rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG
done
for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do
rm -rf $BUILD_ROOT/.init_b_cache/preinstalls
mkdir -p $BUILD_ROOT/.init_b_cache/preinstalls
-for PKG in $PACKAGES_TO_PREINSTALL ; do
+for PKG in $PACKAGES_TO_PREINSTALL $PACKAGES_TO_CBPREINSTALL; do
touch "$BUILD_ROOT/.init_b_cache/preinstalls/$PKG"
done
test -x $BUILD_ROOT/usr/bin/rpmsign && RPMCHECKOPTS="--nodigest --nosignature"
test -x /usr/bin/rpmsign && RPMCHECKOPTS_HOST="--nodigest --nosignature"
-for PKG in $PACKAGES_TO_INSTALL_FIRST RUN_LDCONFIG $PACKAGES_TO_INSTALL ; do
+for PKG in $PACKAGES_TO_INSTALL_FIRST RUN_LDCONFIG $PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL; do
case $PKG in
RUN_LDCONFIG)
fi
if test -e "$BUILD_ROOT/.init_b_cache/preinstalls/$PKG" ; then
preinstall "$PKG"
- test rpm = "$PKG" && chroot $BUILD_ROOT rpm --rebuilddb
+ # call for rpm-4.x and not rpm-devel
+ test -z "${PKG##rpm-[0-9]*}" && chroot $BUILD_ROOT rpm --rebuilddb
+ # also exec for exchanged rpm ! naming is rpm-x86-<target>-<ver>
+ test -z "${PKG##rpm-x86-*[0-9]*}" && chroot $BUILD_ROOT rpm --rebuilddb
fi
fi
export ADDITIONAL_PARAMS=