[opensuse-buildservice] My method to disable relsync rebuild on OBS

Hi, everybody Many people who have setup obs-server at localhost would have puzzle about relsync rebuild. Many times we doesn't need rebuild packages. I'm want to share my idea that disable relsync rebuild on OBS. (I'm not use diff, but paste code directly, because who need it known it, :-)) (chinese doc can find on http://jianlee.ylinux.org/Computer/Server/obs_install_1.7.html#sec9) Modified /usr/lib/obs/server/bs_sched . 2 places: 1. ---------------------- 4255 my @diff = diffsortedmd5(0, \@meta, \@new_meta); 4256 # begin modfield : skip rebuild for success packages when meta change 4257 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4258 #print " - $packid ($packtype)\n"; 4259 #print " meta change, but don't rebuild on my obs!"; 4260 $packstatus{$packid} = 'done'; # Import! if doen't set, it would be "unknown"! 4261 next; 4262 }# end modifield 4263 print " - $packid ($packtype)\n"; 4264 print " $_\n" for @diff; 4265 print " meta change, start build\n"; 4266 $reason = { 'explain' => 'meta change', 'packagechange' => sortedmd5toreason(@diff) }; =============================================== 2. ------------------------------- 4076 if (@blocked) { 4077 # start modifield: skip success package when blocked 4078 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4079 #print " - $packid ($packtype)\n"; 4080 #print " $packid already success ,don't blocked\n"; 4081 $packstatus{$packid} = 'done'; 4082 next; 4083 } #end modifield 4084 # print " - $packid ($packtype)\n"; 4085 # print " blocked\n"; 4086 my $useforbuildenabled = enabled($repoid, $pdata-
{'useforbuild'}, $prjuseforbuildenabled); 4087 $notready{$pname} = 1 if $useforbuildenabled; 4088 $unfinished{$pname} = 1; 4089 $packstatus{$packid} = 'blocked'; 4090 $packerror{$packid} = join(', ', @blocked); 4091 next; 4092 } ============================
Thanks, but my suggestion is use relsycn rebuild function on obs, it's a good feature! ---- Jian Lee [ http://jianlee.ylinux.org ] -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On 26.1.2010 11:05, Jian Lee wrote:
Hi, everybody
Many people who have setup obs-server at localhost would have puzzle about relsync rebuild. Many times we doesn't need rebuild packages.
See http://lists.opensuse.org/archive/opensuse-buildservice/2010-01/msg00149.htm... Michal -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Am Dienstag, 26. Januar 2010 11:05:18 schrieb Jian Lee:
Hi, everybody
Many people who have setup obs-server at localhost would have puzzle about relsync rebuild. Many times we doesn't need rebuild packages.
I'm want to share my idea that disable relsync rebuild on OBS.
You can disable this in BSConfig.pm, no need for code hacks. If you do not want to sync i586 and x86_64 change our $relsync_pool = { "local" => "local", "i586" => "i586", "x86_64" => "i586", .... to our $relsync_pool = { "local" => "local", "i586" => "i586", "x86_64" => "x86_64", ...
(I'm not use diff, but paste code directly, because who need it known it, :-))
(chinese doc can find on http://jianlee.ylinux.org/Computer/Server/obs_install_1.7.html#sec9)
Modified /usr/lib/obs/server/bs_sched . 2 places:
1.
---------------------- 4255 my @diff = diffsortedmd5(0, \@meta, \@new_meta);
4256 # begin modfield : skip rebuild for success packages when meta change 4257 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4258 #print " - $packid ($packtype)\n"; 4259 #print " meta change, but don't rebuild on my obs!"; 4260 $packstatus{$packid} = 'done'; # Import! if doen't set, it would be "unknown"! 4261 next; 4262 }# end modifield
4263 print " - $packid ($packtype)\n"; 4264 print " $_\n" for @diff; 4265 print " meta change, start build\n"; 4266 $reason = { 'explain' => 'meta change', 'packagechange' => sortedmd5toreason(@diff) }; ===============================================
2.
------------------------------- 4076 if (@blocked) {
4077 # start modifield: skip success package when blocked 4078 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4079 #print " - $packid ($packtype)\n"; 4080 #print " $packid already success ,don't blocked\n"; 4081 $packstatus{$packid} = 'done'; 4082 next; 4083 } #end modifield
4084 # print " - $packid ($packtype)\n"; 4085 # print " blocked\n"; 4086 my $useforbuildenabled = enabled($repoid, $pdata-
{'useforbuild'}, $prjuseforbuildenabled); 4087 $notready{$pname} = 1 if $useforbuildenabled; 4088 $unfinished{$pname} = 1; 4089 $packstatus{$packid} = 'blocked'; 4090 $packerror{$packid} = join(', ', @blocked); 4091 next; 4092 } ============================
Thanks, but my suggestion is use relsycn rebuild function on obs, it's a good feature!
----
Jian Lee [ http://jianlee.ylinux.org ]
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Thanks, Adrian I've looked the code abou relsync_pool in /usr/lib/obs/server/bs_srcserver just now, in "sub postrelsync" , there is following code: ------------------------------------------- next if $BSConfig::relsync_pool && ($BSConfig::relsync_pool->{$arch} || '') ne ($BSConfig::relsync_pool->{$a} || ''); ================================================= when set "x86_64" => "x86_64", the 'next' would exec and the update for relsync data would not exec. I'll test it later. Thanks, Adrian Schröter <adrian@suse.de> write:
Am Dienstag, 26. Januar 2010 11:05:18 schrieb Jian Lee:
Hi, everybody
Many people who have setup obs-server at localhost would have puzzle about relsync rebuild. Many times we doesn't need rebuild packages.
I'm want to share my idea that disable relsync rebuild on OBS.
You can disable this in BSConfig.pm, no need for code hacks.
If you do not want to sync i586 and x86_64 change
our $relsync_pool = { "local" => "local", "i586" => "i586", "x86_64" => "i586", ....
to
our $relsync_pool = { "local" => "local", "i586" => "i586", "x86_64" => "x86_64", ...
(I'm not use diff, but paste code directly, because who need it known it, :-))
(chinese doc can find on http://jianlee.ylinux.org/Computer/Server/obs_install_1.7.html#sec9)
Modified /usr/lib/obs/server/bs_sched . 2 places:
1.
---------------------- 4255 my @diff = diffsortedmd5(0, \@meta, \@new_meta);
4256 # begin modfield : skip rebuild for success packages when meta change 4257 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4258 #print " - $packid ($packtype)\n"; 4259 #print " meta change, but don't rebuild on my obs!"; 4260 $packstatus{$packid} = 'done'; # Import! if doen't set, it would be "unknown"! 4261 next; 4262 }# end modifield
4263 print " - $packid ($packtype)\n"; 4264 print " $_\n" for @diff; 4265 print " meta change, start build\n"; 4266 $reason = { 'explain' => 'meta change', 'packagechange' => sortedmd5toreason(@diff) }; ===============================================
2.
------------------------------- 4076 if (@blocked) {
4077 # start modifield: skip success package when blocked 4078 if (grep {$packid eq $_} ls("$reporoot/$prp/$myarch/:logfiles.success")) { 4079 #print " - $packid ($packtype)\n"; 4080 #print " $packid already success ,don't blocked\n"; 4081 $packstatus{$packid} = 'done'; 4082 next; 4083 } #end modifield
4084 # print " - $packid ($packtype)\n"; 4085 # print " blocked\n"; 4086 my $useforbuildenabled = enabled($repoid, $pdata-
{'useforbuild'}, $prjuseforbuildenabled);
4087 $notready{$pname} = 1 if $useforbuildenabled; 4088 $unfinished{$pname} = 1; 4089 $packstatus{$packid} = 'blocked'; 4090 $packerror{$packid} = join(', ', @blocked); 4091 next; 4092 } ============================
Thanks, but my suggestion is use relsycn rebuild function on obs, it's a good feature!
----
Jian Lee [ http://jianlee.ylinux.org ]
---- Jian Lee [ http://jianlee.ylinux.org ] -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Adrian Schröter
-
Jian Lee
-
Michal Marek