Bug 971167 - published primary.xml has wrong location info
published primary.xml has wrong location info
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: rpm-support (Show other bugs)
2.2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.2.0
Assigned To: Michael Hrivnak
Preethi Thomas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 17:16 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:
Environment:
Last Closed: 2013-09-10 11:43:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Hrivnak 2013-06-05 17:16:44 EDT
When a repo is sync'd from a source where the packages are not stored directly in the root of the repository, Pulp's published repo will be incorrect. The XML snippets that get formed into primary.xml have the original <location/> tags with a relative path like:

<location href="Packages/c/ConsoleKit-0.4.5-3.fc18.x86_64.rpm" />

but Pulp doesn't actually generate that directory structure. Instead Pulp puts everything in ./, which means anyone trying to use the published repo will get 404 errors when downloading RPMs.

For the moment, it's probably easiest for us to strip off the leading part of the path in every location tag.
Comment 1 Michael Hrivnak 2013-06-05 18:04:21 EDT
https://github.com/pulp/pulp_rpm/pull/228
Comment 2 Jeff Ortel 2013-06-11 10:15:58 EDT
build: 2.2.0-0.3.beta
Comment 3 Michael Hrivnak 2013-06-11 10:59:52 EDT
Preethi, this is a bug you found where you got errors trying to sync from a repo that had been published by pulp 2.2. You can verify this by trying that again.
Comment 4 Preethi Thomas 2013-06-12 08:55:19 EDT
verified

[root@hp-dl360g6-01 ~]# rpm -q pulp-server
pulp-server-2.2.0-0.3.beta.fc18.noarch

[root@hp-dl360g6-01 ~]# pulp-admin rpm repo sync run --repo-id f18
+----------------------------------------------------------------------+
                     Synchronizing Repository [f18]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[-]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       4165/4165 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 8/8 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[\]
... completed

Publishing packages...
[==================================================] 100%
Packages: 4165/4165 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 8/8 items
... completed

Generating metadata
[/]
... completed

Publishing repository over HTTPS
[-]
... completed

[root@hp-dl360g6-01 ~]# pulp-admin rpm repo create --repo-id f18-local --feed file:///var/lib/pulp/published/https/repos/f18/
Successfully created repository [f18-local]

[root@hp-dl360g6-01 ~]# pulp-admin rpm repo sync run --repo-id f18-local+----------------------------------------------------------------------+
                  Synchronizing Repository [f18-local]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[/]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       4165/4165 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 8/8 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[-]
... completed

Publishing packages...
[==================================================] 100%
Packages: 4165/4165 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 8/8 items
... completed

Generating metadata
[|]
... completed

Publishing repository over HTTPS
[-]
... completed

[root@hp-dl360g6-01 ~]#
Comment 5 Preethi Thomas 2013-09-10 11:43:41 EDT
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/

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