fix rebuildpacs by giving an error if osc doesn't return XML
This commit is contained in:
parent
3cfad499bd
commit
1cd9e72e9c
@ -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
|
||||
|
@ -202,7 +202,11 @@ sub get_paths($$$) {
|
||||
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};
|
||||
|
Loading…
x
Reference in New Issue
Block a user