Mailinglist Archive: opensuse-buildservice (140 mails)

< Previous Next >
[opensuse-buildservice] [gsoc] osc2 client - summary of week 8

here's a small summary of the 8th (coding) week. The last days I
was working on getting build support into the osc2 library. I just
checked in a BuildInfo and Builder class (+ testcases). Here's a
brief example how they can be used:
# example how to use the Builder class
builder = Builder(su_cmd=Builder.SUDO, root='/var/tmp/build-root')
builder.rpmlist = '/path/to/rpmlist'
builder.dist = '/path/to/buildconfig'
builder.without = 'feature1'
builder.without += 'feature2'
builder.arch = 'x86_64'
# run the build:'/path/to/osc.spec')
# this executes:
sudo /usr/bin/build --arch x86_64 --dist /path/to/buildconfig \
--root /var/tmp/build-root --rpmlist /path/to/rpmlist \
--without feature1 --without feature2 /path/to/osc.spec

Basically Builder is just a wrapper around the build script
(all options will be passed to the build script; if an option contains
a "-" character like "vm-type" it can be set like this:
"binfo.vm_type = 'xen'" (a "_" will be replaced with "-")).

Additionally here's a small example how to utilize the BuildInfo
# fname is a path to a spec file
binfo = BuildInfo('openSUSE:Tools', 'osc', 'openSUSE_Factory', 'x86_64',
# print preinstall packages
for bdep in binfo.preinstall():
print bdep.get('name'), bdep.get('version')
# save binfo xml in a file

The next thing on my TODO is the fetcher and cachemanager code.

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages