Bug 983323 - pulp on python 2.6 generates invalid primary.xml
pulp on python 2.6 generates invalid primary.xml
Product: Pulp
Classification: Community
Component: rpm-support (Show other bugs)
2.2 Beta
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.2.0
Assigned To: Michael Hrivnak
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-07-10 20:49 EDT by Michael Hrivnak
Modified: 2013-09-10 11:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-10 11:43:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Hrivnak 2013-07-10 20:49:41 EDT
When run on python 2.6, pulp's published yum repos have invalid primary.xml files. The XML generator improperly defines a default namespace, resulting in XML that looks like this:

<:package type="rpm" xmlns:="http://linux.duke.edu/metadata/common">
  <:version epoch="0" rel="1" ver="4.1" />
  <:checksum pkgid="YES" type="sha256">7a831f9f90bf4d21027572cb503d20b702de8e8785b02c0397445c2e481d81b3</:checksum>
  <:summary>A dummy package of bear</:summary>
  <:description>A dummy package of bear</:description>
  <:packager />
  <:time build="1331831374" file="1331832453" />
  <:size archive="296" installed="42" package="2438" />
<:location href="bear-4.1-1.noarch.rpm" />
    <rpm:license xmlns:rpm="http://linux.duke.edu/metadata/rpm">GPLv2</rpm:license>
    <rpm:vendor xmlns:rpm="http://linux.duke.edu/metadata/rpm" />
    <rpm:group xmlns:rpm="http://linux.duke.edu/metadata/rpm">Internet/Applications</rpm:group>
    <rpm:buildhost xmlns:rpm="http://linux.duke.edu/metadata/rpm">smqe-ws15</rpm:buildhost>
    <rpm:sourcerpm xmlns:rpm="http://linux.duke.edu/metadata/rpm">bear-4.1-1.src.rpm</rpm:sourcerpm>
    <rpm:header-range end="2289" start="872" xmlns:rpm="http://linux.duke.edu/metadata/rpm" />
    <rpm:provides xmlns:rpm="http://linux.duke.edu/metadata/rpm">
      <rpm:entry epoch="0" flags="EQ" name="bear" rel="1" ver="4.1" />

There should not be a colon at the beginning of any tag. Nor should there be any "xmlns" declarations within a <package> tag or its children.
Comment 1 Michael Hrivnak 2013-07-12 12:03:34 EDT
Comment 2 Michael Hrivnak 2013-08-02 10:24:07 EDT
build: 2.2.0-0.23.beta
Comment 3 Preethi Thomas 2013-08-07 14:19:28 EDT
[root@cloud-qe-14 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@cloud-qe-14 ~]# rpm -q python
[root@cloud-qe-14 ~]# 

[root@cloud-qe-14 ~]# pulp-admin rpm consumer bind --repo-id rhel6-64 --consumer-id consumer1
This command may be exited via ctrl+c without affecting the request.

-- Updating Pulp Server --
Waiting to begin...


Task Succeeded

-- Notifying the Consumer --
Waiting to begin...


Task Succeeded

[root@cloud-qe-14 ~]# pulp-admin consumer list

Id:            node1
Display Name:  node1
Description:   None
  Confirmed:   pulp, zoo, pulp_unittest

Id:            consumer1
Display Name:  consumer1
Description:   None
  Confirmed:   rhel6-64, zoo

[root@cloud-qe-14 ~]# 

Install on the consumer 

[root@ibm-x3550m3-09 ~]# yum install zsh
Loaded plugins: product-id, pulp-profile-update, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rhel6-64                                                 | 4.2 kB     00:00     
rhel6-64/primary_db                                      |  22 MB     00:26     
zoo                                                      | 3.7 kB     00:00     
zoo/primary_db                                           | 6.4 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zsh.x86_64 0:4.3.10-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package       Arch             Version                Repository          Size
 zsh           x86_64           4.3.10-5.el6           rhel6-64           2.1 M

Transaction Summary
Install       1 Package(s)

Total download size: 2.1 M
Installed size: 4.8 M
Is this ok [y/N]: y
Downloading Packages:
zsh-4.3.10-5.el6.x86_64.rpm                              | 2.1 MB     00:07     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : zsh-4.3.10-5.el6.x86_64                                      1/1 
rhel6-64/productid                                       | 2.1 kB     00:00     
pulp: profile sent, status=201
  Verifying  : zsh-4.3.10-5.el6.x86_64                                      1/1 

  zsh.x86_64 0:4.3.10-5.el6                                                     

[root@ibm-x3550m3-09 ~]#
Comment 4 Preethi Thomas 2013-09-10 11:43:40 EDT
2.2 released

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