Description of problem: When syncing an RPM from an upstream repo the URL for the feed is used instead of the base url specified in the location tag specified for the package in the primary xml. For example, if the repo feed is http://server1.foo.com/myrepo The primary.xml should contain a package with a location tag as follows: <location xml:base="http://server2.foo.com:8081/some/other/location" href="Foo/Bar/Baz/Bar-Baz.rpm"/> The download request done as part of the sync fails because it is attempting to download http://server1.foo.com/myrepo/Foo/Bar/Baz/Bar-Baz.rpm instead of http://server2.foo.com:8081/some/other/location/Foo/Bar/Baz/Bar-Baz.rpm Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Create a repository with a single package (outside of pulp) 2. Serve a copy of that package on a different server or a different port 3. Update the primary.xml to point to the package specified in step 2 4. Remove the package rpm from the original repository (manually if necessary) 5. Create a pulp repo to sync the repo. The sync will fail because it can't find the package
PR: https://github.com/pulp/pulp_rpm/pull/549
Updated PR to target 2.4.2 https://github.com/pulp/pulp_rpm/pull/551
build: 2.5.0-0.6.beta
verified [root@cloud-qe-22 ~]# rpm -qa pulp-server pulp-server-2.5.0-0.10.beta.el6.noarch [root@cloud-qe-22 ~]# 1: create & publish pulp_unittest repo on server A. 2) Create & publish the pulp_unittest repo on server B 3) Removed all the rpms except for 1 in both the repos 4) Edit the primary.xml from the published repo on server A to point to one of the RPMS on server B on Server A added <location xml:base="http://cloud-qe-1-vm-1.idmqe.lab.eng.bos.redhat.com/pulp/repos/repos/pulp/pulp/demo_repos/pulp_unittest/" href="pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm"/> 5. On server Remove the RPMS from Server A 6. On server C create a repo with the feed to server A pulp-admin rpm repo create --repo-id pulp --feed http://cloud-qe-22.idm.lab.bos.redhat.com/pulp/repos/repos/pulp/pulp/demo_repos/pulp_unittest/ 7. Sync the repo