Skip to content

Commit

Permalink
- support "drop repository" switch for product builds
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Feb 11, 2014
1 parent 3e8c1f6 commit 083ebfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Build/Kiwi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ sub kiwiparse {
if ($instsource->{'productoptions'}) {
my $productoptions = $instsource->{'productoptions'}->[0] || {};
for my $po (@{$productoptions->{'productvar'} || []}) {
$ret->{'drop_repository'} = $po->{'_content'} if $po->{'name'} eq 'DROP_REPOSITORY';
$ret->{'version'} = $po->{'_content'} if $po->{'name'} eq 'VERSION';
}
for my $po (@{$productoptions->{'productoption'} || []}) {
Expand Down
3 changes: 2 additions & 1 deletion build_kiwi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ run_kiwi()
imagetype=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE imagetype)
imagename=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE filename)
imageversion=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE version)
drop_repo=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE Ddrop_repository)
# prepare rpms as source and createrepo on the repositories
ln -sf $TOPDIR/SOURCES/repos $BUILD_ROOT/repos
cd $BUILD_ROOT/$TOPDIR/SOURCES/repos
Expand Down Expand Up @@ -102,7 +103,7 @@ run_kiwi()
*.packages) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. ;;
scripts) ;;
*0) ;;
*) test -d $i && mv $i $BUILD_ROOT/$TOPDIR/KIWI/. ;;
*) test -d $i && [ "$drop_repo" != "true" ] && mv $i $BUILD_ROOT/$TOPDIR/KIWI/. ;;
esac
done
else
Expand Down

0 comments on commit 083ebfb

Please sign in to comment.