Skip to content

Commit

Permalink
Also pass arch and buildflavor when creating the containerinfo
Browse files Browse the repository at this point in the history
Otherwise the tags will not be there or not match the container.
  • Loading branch information
mlschroe committed Jun 13, 2018
1 parent 4be1109 commit 1fd7c9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Build/Kiwi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,16 @@ sub show {
}

sub showcontainerinfo {
my $disturl;
my ($disturl, $arch, $buildflavor);
(undef, $disturl) = splice(@ARGV, 0, 2) if @ARGV > 2 && $ARGV[0] eq '--disturl';
(undef, $arch) = splice(@ARGV, 0, 2) if @ARGV > 2 && $ARGV[0] eq '--arch';
(undef, $buildflavor) = splice(@ARGV, 0, 2) if @ARGV > 2 && $ARGV[0] eq '--buildflavor';
my ($fn, $image) = @ARGV;
local $urlmapper = sub { return $_[0] };
my $d = parse({}, $fn);
my $cf = {};
$cf->{'arch'} = $arch if defined $arch;
$cf->{'buildflavor'} = $buildflavor if defined $buildflavor;
my $d = parse($cf, $fn);
die("$d->{'error'}\n") if $d->{'error'};
$image =~ s/.*\/// if defined $image;
my $release;
Expand Down
2 changes: 1 addition & 1 deletion build-recipe-kiwi
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ postprocess_kiwi_containers() {
disturlarg=()
test -n "$DISTURL" && disturlarg=("--disturl" "$DISTURL")
for r in $BUILD_ROOT/$TOPDIR/KIWI/*.tar ; do
test -e "$r" && perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::showcontainerinfo -- "${disturlarg[@]}" $BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE "$r" > "${r%.tar}.containerinfo"
test -e "$r" && perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::showcontainerinfo -- "${disturlarg[@]}" --arch "${BUILD_ARCH%%:*}" --buildflavor "$BUILD_FLAVOR" $BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE "$r" > "${r%.tar}.containerinfo"
done
}

Expand Down

0 comments on commit 1fd7c9f

Please sign in to comment.