Bug 971167 - published primary.xml has wrong location info
Summary: published primary.xml has wrong location info
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.2.0
Assignee: Michael Hrivnak
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-05 21:16 UTC by Michael Hrivnak
Modified: 2013-09-10 15:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 15:43:41 UTC
Embargoed:


Attachments (Terms of Use)

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/


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