Bug 875029

Summary: Update with --update-md-path keeps baseurl when it should not
Product: [Fedora] Fedora Reporter: Tomas Mlcoch <tmlcoch>
Component: createrepoAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: james.antill, lmacken, packaging-team, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-05 07:15:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Tomas Mlcoch 2012-11-09 11:30:44 UTC
Description of problem:
Update with --update-md-path keeps baseurl - and it is not a good idea

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

1) Prepare first repo which uses baseurl:
$ mkdir a_repo && cd a_repo && wget http://mirrors.kernel.org/fedora/releases/17/Fedora/i386/os/Packages/s/symlinks-1.4-5.fc17.i686.rpm && createrepo . --baseurl http://foo.bar/ && cd ..

2) I want to create another new repo:
$ mkdir b_repo
$ cd b_repo
$ wget http://mirrors.kernel.org/fedora/releases/17/Fedora/i386/os/Packages/s/symlinks-1.4-5.fc17.i686.rpm

3) I want to speed up creation of new repo with usage an existing metadata from some other repository. So I use:
$ createrepo --update-md-path /tmp/createrepo_bug/a_repo/ --update .
Actual results:
b_repo has in metadata this:
<location xml:base="http://foo.bar/" href="symlinks-1.4-5.fc17.i686.rpm"/>

Expected results:
b_repo has in metadata this:
<location href="symlinks-1.4-5.fc17.i686.rpm"/>
because I only want to speed up repo creation, I have all packages locally, I don't want to baseurl in my output metadata.
I suppose that createrepo during update should use and keep only useful data from remote/old repo. As useful I consider all data except the baseurl :)