Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 655128 - [RFE] Add support for group/category yum metadata in a pulp repo with no packages
Summary: [RFE] Add support for group/category yum metadata in a pulp repo with no pack...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: Sprint 26
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 673012
TreeView+ depends on / blocked
 
Reported: 2010-11-19 17:03 UTC by John Matthews
Modified: 2012-02-24 20:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description John Matthews 2010-11-19 17:03:28 UTC
Description of problem:

Currently pulp relies on createrepo generating the initial repo metadata files, repomd.xml, etc.  Createrepo is typically run after a package is uploaded, or packages are synced to a repo.

This bug is to note the work we need to perform to support a repo remaining free of packages, yet it will contain group and category information.  For that to occur pulp needs to generate the initial metadata.

FOR QA:
The test for this bug is:
1) Create a repo with no feed
2) Do not upload any packages
3) Create a package group
4) Create a category
5) Create a consumer and bind to the new repo
6) On consumer verify with a grouplist you can see the created group

Look at the file comps.xml or comps.xml.gz and verify that you see the category info (this will be cached under /var/yum/cache on the client)

Comment 1 John Matthews 2011-08-05 18:09:48 UTC
QE:  I followed below steps to verify this has been fixed in pulp.
Fix was committed previously, unsure of exact commit.  Probably around time we added support of running createrepo on an empty repo, this was working.

sudo pulp-admin repo create --id grouprepo
sudo pulp-admin packagegroup create --repoid grouprepo --id testgroup1 -n testgroup1name
sudo pulp-admin packagegroup create_category -r grouprepo -n catname1 --categoryid cat1
sudo pulp-admin packagegroup add_group --categoryid cat1 --id testgroup1 -r grouprepo
sudo pulp-admin packagegroup add_package --repoid grouprepo --id testgroup1 -n zsh
sudo pulp-admin consumer bind --repoid grouprepo --id jwm_test
sudo pulp-admin consumer bind --repoid grouprepo --id jwm_test



$ sudo yum --disablerepo=* --enablerepo="grouprepo" grouplist
Installed Groups:
   testgroup1name
Available Groups:
   testgroup2name
Done



$ sudo yum --disablerepo=* --enablerepo="grouprepo" groupinfo testgroup1name
Group: testgroup1name
 Default Packages:
   zsh

Comment 2 Preethi Thomas 2011-08-31 17:03:01 UTC
[root@preethi]~# rpm -q pulp
pulp-0.0.228-1.fc15.noarch

[root@preethi ~]# pulp-admin repo create --id grouprepo
Successfully created repository [ grouprepo ]

[root@preethi ~]# pulp-admin packagegroup create --repoid grouprepo --id testgroup1 -n testgroup1name
Package group [testgroup1] created in repository [grouprepo]

[root@preethi ~]# pulp-admin packagegroup create_category -r grouprepo -n catname1 --categoryid cat1
Package group category [cat1] created in repository [grouprepo]


[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin packagegroup add_group --categoryid cat1 --id testgroup1 -r grouprepo
Package group [testgroup1] added to category [cat1] in repository [grouprepo]

[root@preethi]~# pulp-admin packagegroup add_package --repoid grouprepo --id testgroup1  -n zsh
Following packages added to group [testgroup1] in repository [grouprepo]: 
 ['zsh']

[root@preethi]~# pulp-admin consumer bind --repoid grouprepo --id pulp-client
Successfully subscribed consumer [pulp-client] to repo [grouprepo]

[root@preethi]~# pulp-admin consumer bind --repoid grouprepo --id pulp-client
Repo [grouprepo] already bound to the consumer

[root@preethi]~# 

From the client

[root@pulp-client ~]# yum --disablerepo=* --enablerepo="grouprepo" grouplist
Loaded plugins: pulp-profile-update
Setting up Group Process
grouprepo                                                | 3.1 kB     00:00     
grouprepo/primary_db                                     | 1.1 kB     00:00     
grouprepo/group                                          |  648 B     00:00     
Installed Groups:
   testgroup1name
Done
[root@pulp-client ~]# yum --disablerepo=* --enablerepo="grouprepo" groupinfo testgroup1name
Loaded plugins: pulp-profile-update
Setting up Group Process

Group: testgroup1name
 Default Packages:
   zsh
[root@pulp-client ~]#

Comment 3 Preethi Thomas 2012-02-24 20:18:46 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 4 Preethi Thomas 2012-02-24 20:19:39 UTC
Pulp v1.0 is released.


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