Bug 602705 - --includepkgs doesn't seem to work
--includepkgs doesn't seem to work
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Anaconda Maintenance Team
Release Test Team
:
Depends On:
Blocks: 582286
  Show dependency treegraph
 
Reported: 2010-06-10 10:26 EDT by Alexander Todorov
Modified: 2014-01-21 01:18 EST (History)
0 users

See Also:
Fixed In Version: anaconda-13.21.57-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 14:47:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 12:07 EDT, David Cantrell
no flags Details

  None (edit)
Description Alexander Todorov 2010-06-10 10:26:12 EDT
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):
anaconda-13.21.50-2.el6.x86_64

How reproducible:
always

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.16.70.254 - - [10/Jun/2010:10:13:43 -0400] "GET /ks.cfg HTTP/1.1" 200 501 "-" "anaconda/13.21.50"
10.16.70.254 - - [10/Jun/2010:10:14:01 -0400] "GET /myrepo/.treeinfo HTTP/1.1" 404 319 "-" "urlgrabber/3.9.1"
10.16.70.254 - - [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.16.70.254 - - [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 10:26:58 EDT
Additional info: 
The resulting anaconda-ks.cfg doesn't contain the --includepkgs option.
Comment 2 Chris Lumens 2010-06-21 14:39:33 EDT
Does updates=http://clumens.fedorapeople.org/602705.img fix this?
Comment 3 Alexander Todorov 2010-06-24 10:34:56 EDT
The updates.img resulted in bug #607664
Comment 5 Alexander Todorov 2010-07-06 07:25:48 EDT
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:
/ks.cfg
/myrepo/.treeinfo
/myrepo/repodata/repomd.xml
/myrepo/repodata/primary.xml.gz

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 11:03:59 EDT
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 11:26:39 EDT
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 11:32:59 EDT
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 12:11:21 EDT
                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 16:11:55 EDT
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 02:32:23 EDT
Comment #5 is with anaconda-13.21.56-1 which is in the 0701.3 tree.
Comment 12 David Cantrell 2010-07-13 16:16:34 EDT
Looks like this is working in RHEL6.0-20100712.  At least, I'm unable to reproduce it.
Comment 18 David Cantrell 2010-07-22 12:07:12 EDT
Created attachment 433746 [details]
602705.cfg
Comment 19 seth vidal 2010-07-22 13:31:35 EDT
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 07:17:54 EDT
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 15:21:16 EDT
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 05:59:59 EDT
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 14:47:34 EST
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.