Mailinglist Archive: opensuse-buildservice (258 mails)

< Previous Next >
RE: [opensuse-buildservice] --prefer-pkgs option for osc build
  • From: "Zhang, Vivian" <vivian.zhang@xxxxxxxxx>
  • Date: Mon, 30 Aug 2010 16:35:29 +0800
  • Message-id: <625BA99ED14B2D499DC4E29D8138F15044114FE635@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi:

build-2010-0804
obs-server-2.0.6
Thank you for your confirm. And I do want to enable --prefer-pkgs for my use
case. :) And the interesting thing is that although I commented out the 2
lines, it works as I expected, the prefer-pkgs are installed to create the
build-root. I guess rpmlist_prefers[] works.
Anyway, I will do more debug and try to root cause this issue.

Thanks
vivian

-----Original Message-----
From: Marcus Hüwe [mailto:suse-tux@xxxxxx]
Sent: Monday, August 30, 2010 4:11 PM
To: opensuse-buildservice@xxxxxxxxxxxx
Subject: Re: [opensuse-buildservice] --prefer-pkgs option for osc build

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
at-spi.spec
Scanning the following dirs for local packages: /var/tmp/buildcheck-atk/RPM
Getting buildinfo from server and store to
/var/tmp/buildcheck-atk/Trunk:Testing/at-spi/.osc/_buildinfo-standard-i586.xml
Server returned an error: HTTP Error 400: Bad Request
Remote error: Can't use an undefined value as a HASH reference at
build/Build.pm 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' % ',
'.join(opts.prefer_pkgs)
prefer_pkgs, cpio = get_prefer_pkgs(opts.prefer_pkgs, arch,
build_type)
cpio.add(os.path.basename(build_descr), build_descr_data)
build_descr_data = cpio.get()
#print build_descr_data
<SNIP>

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
option:)


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

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

< Previous Next >
Follow Ups