Bug 971167

Summary: published primary.xml has wrong location info
Product: [Retired] Pulp Reporter: Michael Hrivnak <mhrivnak>
Component: rpm-supportAssignee: Michael Hrivnak <mhrivnak>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.2   
Target Milestone: ---   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 15:43:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Hrivnak 2013-06-05 21:16:44 UTC
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 22:04:21 UTC
https://github.com/pulp/pulp_rpm/pull/228

Comment 2 Jeff Ortel 2013-06-11 14:15:58 UTC
build: 2.2.0-0.3.beta

Comment 3 Michael Hrivnak 2013-06-11 14:59:52 UTC
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 12:55:19 UTC
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 15:43:41 UTC
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/