On 2008-05-09 20:15:25 +0100, Carlos Goncalves wrote:
Hi,
As requested by darix, I'm emailing oS-buildservice to ask for a new osc feature - capability to build a whole project (eg. KDE:KDE4:UNSTABLE:Desktop) with one single command.
Currently there is only possible to do things like $ osc build PLATFORM ARCH BUILD_DESCR
Which restricts builds to a given PRJCT:PGK so if one wants to build a whole project the following won't work: $ osc build PLATFORM ARCH PROJECT
With my osc feature request something like it would be possible.
For what I have understood, darix pointed out that to do that some API changes/exposing would be needed or so, which seems to concern him a little.
Hmm I think we need one additional api call to retrieve the buildorder of a project. This new call could look like this: 'POST:/build/$project/$repository/$arch/_buildorder' Then we could upload all spec files to the backend, the backend parses all specs and calculates the buildorder. Calculating the buildorder isn't too hard but the real problem is how to transfer all the spec files to the backend? I attached a potential method to calculate the buildorder (it retrieves the spec files and other needed data in one big xml file) (note: this method isn't complete, it should just show that the whole thing shouldn't be too hard to implement). So once the backend generates a buildorder xml file we can start to tweak the clients to build a complete project. Any opinions?:)
- Build service/osc team, what do you thing about this request? Do you thing it's possible to implement? Any limitations?
- Users, please let developers know if you also like this idea!
The discussion has just began...! ;-)
Marcus sub getbuildorder_post { my ($cgi, $projid, $repoid, $arch) = @_; # TODO: error checking, expand links, handle dsc's etc. my $fn = "$uploaddir/$$"; die("upload failed\n") unless BSServer::read_file($fn); # BSXML::specs dtd: (<data /> contains the complete spec file) # our $specs = [ # 'specs' => # 'project', # [[ 'package' => # 'name', # 'data' => (), # ]], # ]; my %deps; my %map; my %cycles; my @pacs; my $config = BSRPC::rpc("$BSConfig::srcserver/getconfig", undef, "project=$projid", "repository=$repoid"); my $bconf = Build::read_config($arch, [split("\n", $config)]); # parse the xml file which contains several specfiles and build # needed data structures for BSSort::sortpacks() my $specs = readxml($fn, $BSXML::specs, 1); if ($specs) { foreach (@{$specs->{'package'}}) { my $pac = $_->{'name'}; push @pacs, $pac; # Build::Rpm::parse should also parse "Provides:" my $spec = Build::Rpm::parse($bconf, [split('\n', $_->{'data'})] ); $deps{$pac} = $spec->{'deps'}; foreach (@{$spec->{'subpacks'}}) { $map{$_} = $pac; } } } # calculate buildorder of our project # moved sortpacks() from bs_sched into a new module my @ret = BSSort::sortpacks( %deps, %map, undef, undef, %cycles, @pacs); my $ret; if (%cycles) { $ret->{'error'} = 'cycling deps'; } $ret->{'package'} = @ret; # BSXML::buildorder dtd: # our $buildorder = [ # 'buildorder' => # 'error', # [], # [ 'package' ] # ]; return ($ret, $BSXML::buildorder); } --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org