Mailinglist Archive: opensuse-buildservice (148 mails)

< Previous Next >
Re: [opensuse-buildservice] Moving a package to another project maintaining history (and Release.Build)

On 2011-01-05, at 4:26 PM, Michael Schroeder wrote:

On Wed, Jan 05, 2011 at 12:03:03PM +0000, Anas Nashif wrote:
any comments on this? Or is it so bad and not work commenting on? :)

No, but it's the first week in the new year and we're not running
at our usual speed ;-)

Aha, thought so :)

+++ /usr/lib/obs/server/bs_srcserver 2010-12-22 17:24:38.339160313 -0800
@@ -3657,7 +3657,14 @@
copyfiles($projid, $packid, $oprojid, $opackid, $files);

$files = keeplink($cgi, $projid, $packid, $files) if $cgi->{'keeplink'};
- my $rev = addrev($projid, $packid, $files, $cgi->{'user'},
$cgi->{'comment'}, $cgi->{'rev'}, $cgi->{'requestid'});
+ my $rev;
+ if ( $cgi->{'keephist'} && !getrev($projid, $packid, 'latest')->{'rev'})
+ my @res =
BSFileDB::fdb_getall("$projectsdir/$oprojid.pkg/$opackid.rev", $srcrevlay );
+ BSFileDB::fdb_add_multiple("$projectsdir/$projid.pkg/$packid.rev",
$srcrevlay, @res);
+ $rev = $orev;
+ } else {
+ $rev = addrev($projid, $packid, $files, $cgi->{'user'},
$cgi->{'comment'}, $cgi->{'rev'}, $cgi->{'requestid'});
+ }

There are two reasons why it makes sense to do the addrev()
also in the keephist case:

- to document the action in the source history
- to make sure the checkin count is increased, so that packages
built with the copied source get a higher revision.
(That's because you can't copy the rebuild counters on
the repo servers)

Ok, I agree, I will add that and will submit a proper patch :)



Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >