Hi,

Sorry to post this here but eventhough I've registered my account in yum track 
system, I'm unable to find a place to post a new ticket, so I'm doing this here.

I'm working on OSCAR Cluster tools and one of its tool called yume is using 
yum. Unfortunately, since CentOS-6, I see a false-positive warning.

I've been able to identify the problem.


yum install -c yum_cmd_file.txt --installroot / my_package

Will result in the following false-positive warning:
Ignored option -c (probably due to merging -yc != -y -c)

1st of all, the -c option is not ignored (otherwize, the oscar specific repos 
would have been ignored and the strace shown that the file is parsed)
2nd, there is no y option sticked to the -c option.....

I know that "--installroot /" is pretty useless, but in fact the / is computed 
(depending on the fact that the package goes on the head or into a systemimager 
image) and, it is a valid syntax with a missleading warning.

The problem is in file /usr/share/yum-cli/cli.py line 267. 
(yum-3.2.29-30.el6.centos.noarch)

        # don't test for this, if we are using --installroot.
        if root == '/' and opts.conffile != pc.fn:
            self.logger.warning("Ignored option -c (probably due to merging -yc 
!= -y -c)")

The test is bad as it assumes that if root == / then the installroot option is 
not used which is wrong in our case.

I'm not python programmer, and I can't help more. I can't tell how to retreive 
the fact that the --installroot option was in the cmdline. Is the info 
available or should a flag be created when parsing cmdline options? I can't 
tell, but I think that my infos are a good start.

Best regards.

PS: I'll look at yume code to see if there is an easy way to avoid the 
'--installroot /' parameter when the install root is / (but that doesn't 
prevent to fix the miss leading warning though ;-)).

Best regards.

-- 
  Olivier.
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to