Skip to content

Commit

Permalink
fix rebuildpacs by giving an error if osc doesn't return XML
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Jul 29, 2014
1 parent 3cfad49 commit 1cd9e72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion create_test_dvds.sh
Expand Up @@ -73,7 +73,7 @@ for l in B C D E F G H I J; do
regenerate_pl "openSUSE:Factory:Staging:$l" 1 "staging_$l-bc" staging_$l
done

projects=$(osc api /search/project/id?match='starts-with(@name,"openSUSE:Factory:Staging")' | grep :DVD | cut -d\" -f2)
projects=$(osc api /search/project/id?match='starts-with(@name,"openSUSE:Factory:Staging")' | grep :DVD | cut -d\' -f2)
for prj in openSUSE:Factory:Rings:2-TestDVD $projects; do
perl $SCRIPTDIR/rebuildpacs.pl $prj standard x86_64
done
Expand Down
6 changes: 5 additions & 1 deletion rebuildpacs.pl
Expand Up @@ -202,7 +202,11 @@ ($$$)
my $package = find_package_in_project($project);

open(OSC, "osc api /build/$project/$repo/$arch/$package/_buildinfo|");
my $xml = XMLin(join('', <OSC>), ForceArray => 1);
my $xml = join('', <OSC>);
if ($xml !~ m/^</) {
die "failed to open /build/$project/$repo/$arch/$package/_buildinfo";
}
$xml = XMLin($xml, ForceArray => 1);
close(OSC);

return $xml->{path};
Expand Down

0 comments on commit 1cd9e72

Please sign in to comment.