Skip to content

Commit

Permalink
[backend] now that the reposerver can access redirected published bin…
Browse files Browse the repository at this point in the history
…aries, we can put them in the database
  • Loading branch information
mlschroe committed Mar 28, 2012
1 parent 3e4aaad commit c0ff6c7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/backend/bs_publish
Original file line number Diff line number Diff line change
Expand Up @@ -959,10 +959,9 @@ sub publish {

if ($BSConfig::publishredirect && exists($BSConfig::publishredirect->{$prp})) {
$extrep = $BSConfig::publishredirect->{$prp};
$prp_ext = undef;
}
$extrep .= $dbgsplit if $dbgsplit;
$prp_ext .= $dbgsplit if $prp_ext && $dbgsplit;
$prp_ext .= $dbgsplit;

# we now know that $reporoot/$prp/*/:repo will not change.
# Build repo by mixing all architectures.
Expand Down Expand Up @@ -1353,10 +1352,10 @@ sub publish {

# put in published database
my $binarydb = db_open('binary');
updatebinaryindex($binarydb, [ map {"$prp_ext/$_"} @db_deleted ], [ map {"$prp_ext/$_"} @db_changed ]) if $binarydb && defined($prp_ext);
updatebinaryindex($binarydb, [ map {"$prp_ext/$_"} @db_deleted ], [ map {"$prp_ext/$_"} @db_changed ]) if $binarydb;

# mark file origins so we can gather per package statistics
if ($BSConfig::markfileorigins && defined($prp_ext)) {
if ($BSConfig::markfileorigins) {
print " marking file origins\n";
for my $f (sort @db_changed) {
my $origin = $binaryorigins->{$f};
Expand Down Expand Up @@ -1473,7 +1472,7 @@ publishprog_done:
}

# push the repo (unless there's a redirect)
if (defined($prp_ext) && !($BSConfig::publishredirect && $BSConfig::publishredirect->{$prp})) {
if (!($BSConfig::publishredirect && $BSConfig::publishredirect->{$prp})) {
# push to stageserver
if ($BSConfig::stageserver && $BSConfig::stageserver =~ /^rsync:\/\/([^\/]+)\/(.*)$/) {
print " running rsync to $1 at ".localtime(time)."\n";
Expand Down

0 comments on commit c0ff6c7

Please sign in to comment.