Skip to content

Commit

Permalink
[backend] put timestamp in generated servicemark
Browse files Browse the repository at this point in the history
Fixes issue #852.

Also sets the xsrcmd5 for failed service runs, this breaks very old
osc versions, but hey...
  • Loading branch information
mlschroe committed Jan 30, 2015
1 parent 2fc4b09 commit f309113
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ sub genservicemark {
# argh, somewhat racy. luckily we just need something unique...
# (files is not unique enough because we want a different id
# for each commit, even if it has the same srcmd5)
my $smd5 = "sourceservice/$projid/$packid";
# (maybe we should use the same time as in the upcoming rev)
my $smd5 = "sourceservice/$projid/$packid/".time()."\n";
eval {
my $rev_old = getrev($projid, $packid);
$smd5 .= "$rev_old->{'rev'}" if $rev_old->{'rev'};
Expand Down Expand Up @@ -4710,6 +4711,7 @@ sub getfilelist {
$serviceinfo->{'code'} = 'running';
} else {
$serviceinfo->{'code'} = 'failed';
$serviceinfo->{'xsrcmd5'} = $li->{'xservicemd5'};
$serviceinfo->{'error'} = $error;
}
}
Expand Down

0 comments on commit f309113

Please sign in to comment.