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@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org