I'd like to have ExcludeArch and ExclusiveArch information in repodata. This would allow us to do composes based on repodata, without touching actual package headers. These attributes are used for filtering noarch packages from certain architectures, for instance firmware. Tomas made a proof-of-concept createrepo_c build with these fields included, primary.xml.gz size increased by 8kB for 20k packages. Please note these fields would be added to src.rpms only, Fedora end-user repos which are enabled by default (fedora, updates) won't be affected by this change at all. If you're fine with the change, let's work on a format change proposal...
> ExcludeArch and ExclusiveArch information .. These attributes are used for filtering noarch packages from certain architectures, for instance firmware. ExcludeArch probably contains a list of arches that we don't want the src.rpm to build for, but ExclusiveArch is used what for? > Tomas made a proof-of-concept createrepo_c build with these fields included I don't see it in any branch on https://git.fedorahosted.org/git/createrepo_c.git
(In reply to Zdeněk Pavlas from comment #1) > > ExcludeArch and ExclusiveArch information .. These attributes are used for filtering noarch packages from certain architectures, for instance firmware. > > ExcludeArch probably contains a list of arches that we don't want the > src.rpm to build for, but ExclusiveArch is used what for? They're different sides of the same thing: ExcludeArch is (a list of) architectures a package is incompatible with. ExclusiveArch is (a list of) the only architectures a package is compatible with. For example if package A mostly is arch-independent but doesn't work on ppc, you'd want "ExcludeArch: ppc" on that. On the other hand there could be a package which only ever makes sense on ppc, and for that you'd want "ExclusiveArch: ppc"
(In reply to Zdeněk Pavlas from comment #1) > I don't see it in any branch on > https://git.fedorahosted.org/git/createrepo_c.git That's intended. We only wanted to check how much the repodata would grow. Tomas did a hack to enable it, so I think we should rather start from scratch and design the format changes properly.
Ok, fine. I've created a dummy primary.xml with additional tags (and no database), and yum-metadata-parser has processed it happily. As expected, it just skips unknown tags. <package type="rpm"> <name>pkgname</name> <arch>src</arch> <excludeArch>foo,bar,baz</excludeArch> <exclusiveArch>blah,blah,blah</exclusiveArch> <version epoch="1" ver="4.8.7" rel="3.fc17"/> ..
Hello all, my idea is: Add <exlusivearchs> and <exlucdearchs> to the primary.xml: <package type="rpm"> <name>filesystem</name> <arch>i686</arch> <exclusivearchs> <arch>armv7hnl</arch> <arch>armv7hl</arch> <arch>armv7l</arch> <arch>armv6l</arch> </exclusivearchs> ... Analogous for excludearchs. It's a little verbose but it seems to be good approach. Pros: + Potential xml query will be simple. + Data are structured - use e.g. something like: "<exclusivearchs>armv7hnl,armv7hl,armv7l,armv6l</exlusivearchs>" is less verbose but it need additional post/pre-processing (split/concatenation). Moreover, verbosity doesn't have to implies a bigger size - compression ratio of documents with a lot of repeated statements(tags, values) is very good. + Sane old parsers should just skip the unknown tag (and all its descendants) and process the rest of the xml without problems.
I agree with Tomas, but with the only exception - use singular instead of plural. The tag names would match RPM tags then. <exclusivearch> <arch>...</arch> </exclusivearch> <excludearch> <arch>...</arch> </excludearch>