Mailinglist Archive: opensuse-buildservice (189 mails)

< Previous Next >
Re: [opensuse-buildservice] inject local rpm data for buildinfo calculation
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Wed, 25 Feb 2009 14:59:38 +0100
  • Message-id: <20090225135938.GA8587@xxxxxxx>
On Mon, Feb 23, 2009 at 01:54:12AM +0100, Marcus Hüwe wrote:
I wrote a small patch to inject rpm/deb/whatever data to the buildinfo
calculation. This means one can collect the rpm/deb provides and requires
of local packages and send them to the obs which uses them to calculate
the buildinfo for local builds.

Heh, this is a feature that was actually already discussed with Peter
but never reached the implementation phase.

* you submitted a new package to the obs: before you can build a local package
which depends on this new package you have to wait until the obs has built
(now you could simply do sth. like "osc build ... -p /path/to/local/pkgs"
and it'll directly start the local build).

How it works:
A client like osc collects the requires and provides of some local packages,
stores these information in a xml file and finally creates a cpio archive
which contains the xml + a spec/dsc file and sends it to the obs.
(Note: I decided to store the data in a xml because I didn't want to introduce
yet another metadata format - this results in less additional code)

How about using's internal format?

Example xml:
<package name="foobar" version="3.0.1" release="0" arch="i586">
<provides>foobar = 3.0.1-0</provides>
<requires>libfoo-devel >= 2.0</requires>
@@ -1370,6 +1372,7 @@
if (!$cgi->{'internal'}) {
for (@bdeps) {
my $p = $dep2rpm{$_}->{'path'};
+ next unless $p;
push @bdepsp, "$reporoot/$dep2prp{$_}/$arch/:full/$p";
@bdepsp = getbinarydata(@bdepsp);
@@ -1381,6 +1384,7 @@
($_->{'project'}, $_->{'repository'}) = split('/', $dep2prp{$_->{'name'}}
, 2);
my $r = $bdepsp{$_->{'name'}};
+ $r = $ldeps->{$_->{'name'}} if (defined($ldeps) && !defined($r));
if ($r) {
$_->{'version'} = $r->{'version'};
$_->{'release'} = $r->{'release'} if exists $r->{'release'};
+ my %localdeps;
+ # FIXME: is there a to check for the cpio magic?

Of course there is, it must start with "070701". You can use this
for autodetection, i.e. no need for the "cpio" switch.

Have you already patched osc so that it sends the extra data?


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 >