Mailinglist Archive: opensuse-buildservice (189 mails)

< Previous Next >
Re: [opensuse-buildservice] inject local rpm data for buildinfo calculation
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Wed, 25 Feb 2009 17:24:58 +0100
  • Message-id: <20090225162458.GB3165@xxxxxxxxxxxxxxxxxxx>
On 2009-02-25 14:59:38 +0100, Michael Schroeder wrote:
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.

Yes Peter told me the same:)

How about using Build.pm's internal format?

Indeed that's a good idea.

+ # 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.

The problem is that there's no easy way to check for the magic. We can't
use the existing BSServer::read_data() method because it reads directly
from the socket. So if we do something like:
if (BSServer::read_data(6, 1) eq '070701') {
BSServer::read_cpio(...)
}
the read_cpio() will complain because it doesn't find the magic anymore.

The following should work in theory:
BSServer::read_file($fn); # store cpio archive _or_ plain text file in a file
# (it reads all the POSTed data)

Now we can easily check if $fn starts with 070701. The only problem with this
approach is that we would need to outsource parts from BSHTTP::cpio_receiver()
into a more "generic" method (basically we only need to pass a ref to method
which reads the data (either from a file or from a socket)).


Or is there an easy way which I didn't found?:)

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

No I didn't start with the osc implementation yet (but Peter already checked in
a module which can be used to create a cpio archive).


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

< Previous Next >
Follow Ups