#157: conflicts: requested arch not respected
---------------------+------------------------------------------------------
Reporter: kparal | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: tests | Version: 1.0
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by skvidal):
So I took a look at the potential_conflict.py in autoqa and it doesn't
appear to ever DO anything with the --arch. Yum's arch value is never set.
Also I looked at the copy of potential_conflict.py that I originally
uploaded:
http://skvidal.fedorapeople.org/misc/potential_conflict.py
and I didn't include any of the optparsing there.
Here's a patch which should fix the script - but I'm not sure what the
original intention was of whomever added the optparsing.
{{{
--- a/tests/conflicts/potential_conflict.py
+++ b/tests/conflicts/potential_conflict.py
@@ -51,9 +51,8 @@ def parseArgs():
parser = OptionParser(usage=usage)
parser.add_option("-c", "--config",
default='/etc/yum.conf',
help='config file to use (defaults to /etc/yum.conf)')
- parser.add_option("-a", "--arch", default=[],
action='append',
- help='check packages of the given archs, can be specified
multiple ' +
- 'times (default: current arch)')
+ parser.add_option("-a", "--arch", default=None,
+ help='check packages of this basearch.')
parser.add_option("-b", "--builddeps", default=False,
action="store_true",
help='check build dependencies only (needs source repos
enabled)')
parser.add_option("-r", "--repoid", default=[],
action='append',
@@ -151,6 +150,8 @@ def file_conflict(fn, pkglist):
(opts, cruft) = parseArgs()
my = yum.YumBase()
+if opts.arch:
+ my.preconf.arch = opts.arch
my.doConfigSetup(fn = opts.config,init_plugins=False)
my.conf.cachedir = yum.misc.getCacheDir()
my.repos.setCacheDir(my.conf.cachedir)
}}}
--
Ticket URL: <
https://fedorahosted.org/autoqa/ticket/157#comment:1>
AutoQA <
http://autoqa.fedorahosted.org>
Automated QA project