Bug 197271

Summary: createrepo creates arch="i386" for src.rpm files
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: createrepoAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-06-30 12:45:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch none

Description Robert Scheck 2006-06-29 19:14:10 UTC
Description of problem:
createrepo creates arch="i386" for src.rpm files. At least the following (taken 
from filelists.xml.gz) created by createrepo looks very broken to me:

<package pkgid="c3442e30a9ca21f9875809d4891e4d4dbc7dcada" name="tk" 
arch="i386"><version epoch="0" ver="8.4.13" rel="1"/><file>tk-8.3.5-tclm4-
soname.patch</file><file>tk-8.4-no_rpath.patch</file><file>tk-8.4.13-autoconf.
patch</file><file>tk-8.4.4-lib-perm.patch</file><file>tk.spec</file><file>tk8.4.
13-src.tar.gz</file></package>

Ever tried to upgrade from i386.rpm to a src.rpm? :)

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

How reproducible:
Everytime, just run createrepo when you've got src.rpms and i386.rpms within a 
(sub-)directory accessed by createrepo. After removing src.rpms and re-executing 
of createrepo the repodata stuff seems to be correct.

Actual results:
createrepo creates broken repodata.

Expected results:
Working repodata again - even when src.rpm and i386.rpm files are in the same 
(sub-)directory.

Comment 1 Paul Nasrat 2006-06-29 21:31:46 UTC
Technically the src.rpm has RPMTAG_ARCH set - try it:

rpm -qp --qf '%{arch}\n' dummy-1.0-1.src.rpm
i386

This is why the convention has been to keep src.rpm repos seperate for fedora. 
The way to identify a src.rpm is the absence of sourcerpm filed.

rpm -qp --qf '%{sourcerpm}\n' dummy-1.0-1.src.rpm
(none)




Comment 2 Robert Scheck 2006-06-29 21:34:43 UTC
But the stuff worked with older versions of createrepo...

Comment 3 Paul Nasrat 2006-06-30 01:33:28 UTC
If you let me know which version we regress from I'll look into. Particularly
with xml fragment, etc.

Comment 4 Paul Nasrat 2006-06-30 01:42:19 UTC
Created attachment 131777 [details]
Proposed patch

Hmm are you using rpm >= 4.4.6? If so see CHANGES for why this broke - attached
createrepo patch will work around.  Please in future if you are using
non-standard core packages mention this in the bug report.

Please test this and I'll commit upstream (it looks logically correct to me).

Comment 5 Robert Scheck 2006-06-30 08:47:42 UTC
Oops...yes I am - sorry. And yes your patch works, of course and looks sane, 
too. Thank you very much for resolving it anyway :)

Comment 6 Paul Nasrat 2006-06-30 12:45:48 UTC
Commited to upstream createrepo.