mkbaselibs may fail on an excessive number of packages (bnc#761977)
create_baselibs()
{
local pkgs=()
+ local line
BASELIBS_CFG=
fi
fi
echo "... creating baselibs$whichone"
- chroot $BUILD_ROOT su -c "$mkbaselibs $BASELIBS_GLOBAL $BASELIBS_CFG ${pkgs[*]#$BUILD_ROOT}" - $BUILD_USER || cleanup_and_exit 1
+ while read line
+ do
+ chroot $BUILD_ROOT su -c "$mkbaselibs $BASELIBS_GLOBAL $BASELIBS_CFG $line" - $BUILD_USER || cleanup_and_exit 1
+ done < <(IFS=$'\n'; echo "${pkgs[*]#$BUILD_ROOT}" | xargs -n 1024)
rm -rf $BUILD_ROOT/.mkbaselibs
}
# Tidy up the various control files.
# the md5sums are regenerated by dpkg-deb when building
- foreach my $c_file qw(conffiles postinst postrm preinst prerm) {
+ foreach my $c_file ( qw(conffiles postins postrm preinst prerm) ) {
unlink "${baseTarget}/DEBIAN/$c_file";
}
# Create them if needed