From ce9a6d0f46cbea49285520683029052d3eb96508 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Thu, 14 Apr 2016 16:25:48 +0200 Subject: [PATCH] Fixed "osc buildinfo --prefer-pkgs..." Was broken since ages (literally!)... (see commit d5b795a02bf30c3e2e2213481bfc0ff584c52418). --- osc/commandline.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 7a05e7f2..646cccb0 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5490,10 +5490,14 @@ Please submit there instead, or use --nodevelproject to force direct submission. raise oscerr.WrongArgs('error: a build description is needed if \'--prefer-pkgs\' is used') elif opts.prefer_pkgs: from .build import get_prefer_pkgs + from .util import cpio print('Scanning the following dirs for local packages: %s' % ', '.join(opts.prefer_pkgs)) - prefer_pkgs, cpio = get_prefer_pkgs(opts.prefer_pkgs, arch, os.path.splitext(build_descr)[1]) - cpio.add(os.path.basename(build_descr), build_descr_data) - build_descr_data = cpio.get() + cpiodata = cpio.CpioWrite() + prefer_pkgs, cpio = get_prefer_pkgs(opts.prefer_pkgs, arch, + os.path.splitext(build_descr)[1], + cpiodata) + cpiodata.add(os.path.basename(build_descr), build_descr_data) + build_descr_data = cpiodata.get() print(''.join(get_buildinfo(apiurl, project, package, repository, arch,