Mailinglist Archive: opensuse-buildservice (258 mails)

< Previous Next >
Re: [opensuse-buildservice] --prefer-pkgs option for osc build
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Mon, 30 Aug 2010 10:11:03 +0200
  • Message-id: <20100830081103.GB4244@xxxxxxxxxxxxx>
On 2010-08-30 15:30:09 +0800, Zhang, Vivian wrote:
Hi, all
I tried to use -prefer-pkgs options for osc build but failed:
#osc build -p /var/tmp/buildcheck-atk/RPM --no-verify --clean standard i586
Scanning the following dirs for local packages: /var/tmp/buildcheck-atk/RPM
Getting buildinfo from server and store to
Server returned an error: HTTP Error 400: Bad Request
Remote error: Can't use an undefined value as a HASH reference at
build/ line 392.

Which build and obs-server version are you using? Some old versions don't
support this feature.

I checked the code and found that issue might be the wrong build_descr_data.
if opts.prefer_pkgs:
print 'Scanning the following dirs for local packages: %s' % ',
prefer_pkgs, cpio = get_prefer_pkgs(opts.prefer_pkgs, arch,
cpio.add(os.path.basename(build_descr), build_descr_data)
build_descr_data = cpio.get()
#print build_descr_data

Then I make a workaround to comment out these two lines and it works ok.
#cpio.add(os.path.basename(build_descr), build_descr_data)
#build_descr_data = cpio.get()
Does the output of build_descr_data above is expected and is it safe to
comment out the code to not adding/checking the deps info

Yes that's the expected output. If you use the --prefer-pkgs <dir> option
osc reads the provides/requires from all packages in <dir> and sends them
to the server (so that they can be used for the buildinfo calculation).
Instead of commenting out the 2 lines just don't use the --prefer-pkgs

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

< Previous Next >
Follow Ups