Bug 602705 - --includepkgs doesn't seem to work
Summary: --includepkgs doesn't seem to work
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
Depends On:
Blocks: 582286
TreeView+ depends on / blocked
Reported: 2010-06-10 14:26 UTC by Alexander Todorov
Modified: 2014-01-21 06:18 UTC (History)
0 users

Fixed In Version: anaconda-13.21.57-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 19:47:34 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
602705.cfg (1.31 KB, text/plain)
2010-07-22 16:07 UTC, David Cantrell
no flags Details

Description Alexander Todorov 2010-06-10 14:26:12 UTC
Description of problem:
I've performed install with latest RHEL6 snapshot. The ks.cfg file has:

repo --name="myrepo"  --baseurl=http://server/myrepo --includepkgs=dracut

"myrepo" contains both kernel and dracut packages. httpd log didn't indicate that dracut was downloaded from this repo.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a local repository including kernel and dracut packages (export over http or other protocol).
2. Install with a ks.cfg containing:
repo --name="myrepo"  --baseurl=http://server/myrepo --includepkgs=dracut

Actual results:
On the server I was observing /var/log/httpd/access_log and it didn't show that dracut was downloaded. Last lines are: - - [10/Jun/2010:10:13:43 -0400] "GET /ks.cfg HTTP/1.1" 200 501 "-" "anaconda/13.21.50" - - [10/Jun/2010:10:14:01 -0400] "GET /myrepo/.treeinfo HTTP/1.1" 404 319 "-" "urlgrabber/3.9.1" - - [10/Jun/2010:10:14:02 -0400] "GET /myrepo/repodata/repomd.xml HTTP/1.1" 200 1365 "-" "Red Hat Enterprise Linux (anaconda)/6.0" - - [10/Jun/2010:10:14:02 -0400] "GET /myrepo/repodata/primary.xml.gz HTTP/1.1" 200 125192 "-" "Red Hat Enterprise Linux (anaconda)/6.0"

Expected results:
Dracut will be downloaded from this repo. 

Additional info:

Comment 1 Alexander Todorov 2010-06-10 14:26:58 UTC
Additional info: 
The resulting anaconda-ks.cfg doesn't contain the --includepkgs option.

Comment 2 Chris Lumens 2010-06-21 18:39:33 UTC
Does updates=http://clumens.fedorapeople.org/602705.img fix this?

Comment 3 Alexander Todorov 2010-06-24 14:34:56 UTC
The updates.img resulted in bug #607664

Comment 5 Alexander Todorov 2010-07-06 11:25:48 UTC
I've tested with snap #7 (0701.3 tree) and the ks.cfg line from comment #0 and I still don't see dracut package downloaded from the myrepo/ repository. access_log on the server shows that last files which were downloaded were:

Anaconda log files don't make much sense for me. Let me know which file do you need. 

Moving back to ASSIGNED.

Comment 6 Chris Lumens 2010-07-06 15:03:59 UTC
Hm, does it help if you also --excludepkgs= on the repo you don't want the package to come from?

Comment 7 Alexander Todorov 2010-07-06 15:26:39 UTC
I don't define this explicitly in the ks.cfg. This is the base repository which anaconda picks up when method=http://.

If I boot from the boot.iso with fully automated ks.cfg that has: 

repo --name="myrepo"  --baseurl=http://tyan-gt24-09.rhts.eng.bos.redhat.com/myrepo --includepkgs=dracut
repo --name=basic --baseurl=http://qafiler.bos.redhat.com/redhat/rel-eng/RHEL6.0-20100701.3/6/Server/x86_64/os/ --excludepkgs=dracut

i.e. define the base repostory then dracut is pulled from myrepo. 

A side question: How are --excludepkgs/--includepkgs supposed to work exactly?

Comment 8 Chris Lumens 2010-07-06 15:32:59 UTC
This is starting to sound like something funny going on with yum, or at least something we need to be doing but aren't aware of.

Comment 9 James Antill 2010-07-06 16:11:21 UTC
                if ksrepo.excludepkgs:
                    repo.exclude = ksrepo.excludepkgs

                if ksrepo.includepkgs:
                    repo.include = ksrepo.includepkgs

...yes! We win the API confusion war!;).
 The internal API follows the yum config. names, so you have:

 [config]exclude     | --exclude | repo.exclode
 [config]includepkgs | N/A       | repo.includepkgs

Comment 10 Chris Lumens 2010-07-06 20:11:55 UTC
James - but that should be fixed up in anaconda-13.21.55-1.

Alexander - can you please verify what version of anaconda you are testing?

Comment 11 Alexander Todorov 2010-07-07 06:32:23 UTC
Comment #5 is with anaconda-13.21.56-1 which is in the 0701.3 tree.

Comment 12 David Cantrell 2010-07-13 20:16:34 UTC
Looks like this is working in RHEL6.0-20100712.  At least, I'm unable to reproduce it.

Comment 18 David Cantrell 2010-07-22 16:07:12 UTC
Created attachment 433746 [details]

Comment 19 seth vidal 2010-07-22 17:31:35 UTC
so there are 2 repos with the exact same pkg in the repodata
yum won't treat them like mirrors - it will use ONE of the pkgs or the other.

so in the above case the failure to download it seems exactly correct, if it had chosen the pkg from the repodata that did not actually have the pkg FILE.

Comment 20 Alexander Todorov 2010-07-28 11:17:54 UTC
What's the status on this? Looks like anaconda and yum are doing the right thing but the feature still doesn't work in the way an end user will expect. 

How do we want this to work so QE can say this has been fixed or not?

Comment 21 Chris Lumens 2010-08-02 19:21:16 UTC
The idea here is that you have multiple repos with some same package in them, and that you can use --includepkgs and --excludepkgs to tell kickstart/yum which repo should be used for those duplicate packages.  It's not intended to act as a mirror.

anaconda is just setting up some lists in repo objects, so I would assume that whatever's not happening here is in yum.  However if everything there looks fine and it's still not working, I am inclined to just close this one.  I expect that almost no one will care about these options in RHEL6.  This isn't worth the time being put into it.

Comment 22 Alexander Todorov 2010-08-11 09:59:59 UTC
Moving to VERIFIED per comment #21. We need to use --includepkgs and --excludepkgs on two separate repositories.

Comment 23 releng-rhel@redhat.com 2010-11-10 19:47:34 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.