s/=$// for @{$config->{'substitute'}->{$l}};
}
init_helper_hashes($config);
- if ( ! $config->{'type'}) {
+ if (!$config->{'type'}) {
# Fallback to old guessing method if no type (spec, dsc or kiwi) is defined
if (grep {$_ eq 'rpm'} @{$config->{'preinstall'} || []}) {
$config->{'type'} = 'spec';
} elsif (grep {$_ eq 'debianutils'} @{$config->{'preinstall'} || []}) {
$config->{'type'} = 'dsc';
+ } elsif (grep {$_ eq 'pacman'} @{$config->{'preinstall'} || []}) {
+ $config->{'type'} = 'arch';
} else {
$config->{'type'} = 'UNDEFINED';
}
cp $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb $BUILD_ROOT/.init_b_cache/dpkg.deb || cleanup_and_exit 1
fi
chroot $BUILD_ROOT dpkg -i --force all .init_b_cache/dpkg.deb >/dev/null 2>&1
+ elif test $PSUF = arch ; then
+ mkdir -p $BUILD_ROOT/var/lib/pacman/sync
+ touch $BUILD_ROOT/var/lib/pacman/sync/core.db
+ touch $BUILD_ROOT/var/lib/pacman/sync/extra.db
+ touch $BUILD_ROOT/var/lib/pacman/sync/community.db
fi
}
echo "installing ${PKGID%_*}"
# -d -d disables deps checking
( chroot $BUILD_ROOT pacman -Uf -d -d --noconfirm .init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \
- perl -ne '$|=1;/^(warning: could not get filesystem information for |loading packages|looking for inter-conflicts|Targets |Total Installed Size: |Net Upgrade Size: |Proceed with installation|checking package integrity|loading package files|checking available disk space|installing |upgrading |warning: database file for |warning:.*is up to date -- reinstalling|Optional dependencies for| )/||/^$/||print'
+ perl -ne '$|=1;/^(warning: could not get filesystem information for |loading packages|looking for inter-conflicts|Targets |Total Installed Size: |Net Upgrade Size: |Proceed with installation|checking package integrity|loading package files|checking available disk space|installing |upgrading |warning:.*is up to date -- reinstalling|Optional dependencies for| )/||/^$/||print'
check_exit
echo "$PKGID $PSUF" > $BUILD_ROOT/installed-pkg/$PKG
continue