#157: conflicts: requested arch not respected --------------------+------------------------------------------------------- Reporter: kparal | Owner: Type: defect | Status: new Priority: major | Milestone: Component: tests | Version: 1.0 Keywords: | --------------------+------------------------------------------------------- This is a bug in the potential_conflict.py script in tests/conflicts/. Usage suggests using --arch options for specifying requested architecture to be tested. But if you look at the attached log, the first and second output match (that's correct), but the third doesn't match, even though it should. Everything was tested on x86_64 machine.
Also from the usage line it is not clear whether --arch is related only to particular yum repository selection (replacing $basearch keyword), or whether it also relates to packages built for one architecture but being in different repo (e.g. i686 packages are very often in x86_64 repo).
I have looked into the source code of the script and it seems that the --arch option is not used at all, just printed out in the usage help??
Seth, you're listed as script author. Any comments on that? Thanks.
#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) }}}
#157: conflicts: requested arch not respected ---------------------+------------------------------------------------------ Reporter: kparal | Owner: Type: defect | Status: new Priority: major | Milestone: Component: tests | Version: 1.0 Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by kparal):
* cc: wwoods (added)
Comment:
I have just seen the --help output of repoclosure and there are the exactly same statements (related to --arch option). So I think it was just copy&pasted from repoclosure usage documentation, but never implemented.
Will, do you know what the original intention was?
#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 wwoods):
Probably it was supposed to set preconf.arch so we could conceivably test (e.g.) i686 on x86_64, or vice-versa. But I don't think that ever worked the way we wanted, so the option was never wired up.
If the test is currently running as expected we can just decide that the test will just use the host arch and remove the option flag to avoid confusion.
If you want to make the option actually work like you might expect, that's fine too, but I think trying to do cross-arch testing is more trouble than it's worth.
#157: conflicts: requested arch not respected ---------------------+------------------------------------------------------ Reporter: kparal | Owner: Type: defect | Status: new Priority: trivial | Milestone: Future tasks Component: tests | Resolution: Keywords: | ---------------------+------------------------------------------------------ Changes (by kparal):
* priority: major => trivial * milestone: => Future tasks
#157: conflicts: requested arch not respected ---------------------+--------------------------- Reporter: kparal | Owner: Type: defect | Status: new Priority: trivial | Milestone: Future tasks Component: tests | Resolution: Keywords: | Blocked By: Blocking: | ---------------------+---------------------------
Comment (by mkrizek):
I took a look at optparsing in potential_conflict.py and it seems to be completely broken. There are several options in addition to --arch that are not implemented and description of the script is incorrect as well. I propose [http://git.fedorahosted.org/cgit/autoqa.git/commit/?h=t157&id=ea01082b62... this]
Thoughts?
#157: conflicts: requested arch not respected ---------------------+--------------------------- Reporter: kparal | Owner: Type: defect | Status: new Priority: trivial | Milestone: Future tasks Component: tests | Resolution: Keywords: | Blocked By: Blocking: | ---------------------+---------------------------
Comment (by kparal):
Go ahead.
#157: conflicts: requested arch not respected ---------------------+--------------------- Reporter: kparal | Owner: Type: defect | Status: closed Priority: trivial | Milestone: 0.9.0 Component: tests | Resolution: fixed Keywords: | Blocked By: Blocking: | ---------------------+--------------------- Changes (by mkrizek):
* status: new => closed * resolution: => fixed * milestone: Future tasks => 0.9.0
Comment:
Pushed to master: ea01082b62ebfb27fb005faa16fbba162ed33bd1
autoqa-devel@lists.fedorahosted.org