fi
if test "$BUILDTYPE" = kiwi ; then
- chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT" - $BUILD_USER < /dev/null && BUILD_SUCCEDED=true
- chroot $BUILD_ROOT su -c "kiwi --create $TOPDIR/KIWIROOT --logfile terminal -d $TOPDIR/KIWI --type iso" - $BUILD_USER < /dev/null && BUILD_SUCCEDED=true
+ # run createrepo on the repositories
+ if test -d $BUILD_ROOT/$TOPDIR/SOURCES/repos ; then
+ (
+ cd $BUILD_ROOT/$TOPDIR/SOURCES/repos
+ find . | sed -n -e 's/^\.\///' -e '/.*:\/[^\/]*[^\/:]\/[^\/]*[^\/:]$/p' | while read d ; do
+ test -d $BUILD_ROOT/$TOPDIR/SOURCES/repos/$d/repodata && continue
+ echo "creating repodata for $d"
+ chroot $BUILD_ROOT createrepo "$TOPDIR/SOURCES/repos/$d"
+ done
+ )
+ fi
+ # unpack tar files in image directories
+ if test -d $BUILD_ROOT/$TOPDIR/SOURCES/images ; then
+ (
+ cd $BUILD_ROOT/$TOPDIR/SOURCES/images
+ find . | sed -n -e 's/^\.\///' -e '/.*:\/[^\/]*[^\/:]\/[^\/]*[^\/:]$/p' | while read d ; do
+ for t in $BUILDROOT/$TOPDIR/SOURCES/images/$d/root.tar* ; do
+ test -f $t || continue
+ mkdir -p $BUILDROOT/$TOPDIR/SOURCES/images/$d/root
+ chroot $BUILD_ROOT tar -C $TOPDIR/SOURCES/images/$d/root -xf "$TOPDIR/SOURCES/images/$d/$t{##*/}"
+ done
+ done
+ )
+ fi
+ if chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT" - $BUILD_USER < /dev/null ; then
+ chroot $BUILD_ROOT su -c "kiwi --create $TOPDIR/KIWIROOT --logfile terminal -d $TOPDIR/KIWI --type iso" - $BUILD_USER < /dev/null && BUILD_SUCCEDED=true
+ fi
fi
test "$BUILD_SUCCEDED" = true || cleanup_and_exit 1
my $topdir = '/.build.packages';
if (-l $topdir) {
- $topdir = '/'.readlink $topdir || die "readlink: $!";
+ $topdir = '/'.readlink($topdir) || die("readlink: $!");
}
my @dirs = map {"$topdir/RPMS/$_"} ls("$topdir/RPMS");
unshift @dirs, "$topdir/SRPMS";
my @packs;
for my $dir (@dirs) {
- push @packs, map {"$dir/$_"} grep {/\.(rpm|deb|iso|desktopfiles)$/} ls($dir);
+ push @packs, map {"$dir/$_"} grep {-f "$dir/$_"} ls($dir);
}
#unshift @packs, '/.build.log';