Skip to content

Commit

Permalink
[backend] bugfix: make sure addrepo_alien does not mess with %prpnotr…
Browse files Browse the repository at this point in the history
…eady
  • Loading branch information
mlschroe committed Feb 19, 2013
1 parent 0e74f30 commit 7d9bdfb
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/backend/bs_sched
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,6 @@ sub addrepo {
return addrepo_scan($pool, $prp);
}

# add repo belonging to a different architecture
sub addrepo_alien {
my ($pool, $prp, $arch) = @_;

$repodatas_alien{"$prp/$arch"}->{'dontwrite'} = 1;
my $oldrepodata = $repodatas{$prp};
$repodatas{$prp} = $repodatas_alien{"$prp/$arch"};
my $savemyarch = $myarch;
$myarch = $arch;
my $r = addrepo($pool, $prp);
$myarch = $savemyarch;
$repodatas_alien{"$prp/$arch"} = $repodatas{$prp};
delete $repodatas{$prp};
$repodatas{$prp} = $oldrepodata if $oldrepodata;
return $r;
}

# add :full repo to pool, make sure repo is up-to-data by
# scanning the directory
sub addrepo_scan {
Expand Down Expand Up @@ -2776,6 +2759,27 @@ sub addrepo_remote {
return $r;
}

# add repo belonging to a different architecture
sub addrepo_alien {
my ($pool, $prp, $arch) = @_;

$repodatas_alien{"$prp/$arch"}->{'dontwrite'} = 1;
my $oldrepodata = $repodatas{$prp};
my $oldprpnotready = $prpnotready{$prp};
delete $prpnotready{$prp};
$repodatas{$prp} = $repodatas_alien{"$prp/$arch"};
my $savemyarch = $myarch;
$myarch = $arch;
my $r = addrepo($pool, $prp);
$myarch = $savemyarch;
$repodatas_alien{"$prp/$arch"} = $repodatas{$prp};
delete $repodatas{$prp};
$repodatas{$prp} = $oldrepodata if $oldrepodata;
delete $prpnotready{$prp};
$prpnotready{$prp} = $oldprpnotready if $oldprpnotready;
return $r;
}

sub read_gbininfo_remote {
my ($prpa, $remoteproj, $retryprpa, $packstatus) = @_;

Expand Down

0 comments on commit 7d9bdfb

Please sign in to comment.