Bug 973169 - RFE: add ExcludeArch and ExclusiveArch to repodata
RFE: add ExcludeArch and ExclusiveArch to repodata
Status: NEW
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 578256
  Show dependency treegraph
 
Reported: 2013-06-11 08:15 EDT by Daniel Mach
Modified: 2016-09-19 22:48 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Mach 2013-06-11 08:15:33 EDT
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...
Comment 1 Zdeněk Pavlas 2013-06-12 05:49:14 EDT
> 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
Comment 2 Panu Matilainen 2013-06-12 06:18:35 EDT
(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"
Comment 3 Daniel Mach 2013-06-12 07:06:18 EDT
(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.
Comment 4 Zdeněk Pavlas 2013-06-12 07:26:19 EDT
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"/>
  ..
Comment 5 Tomas Mlcoch 2013-06-12 07:52:28 EDT
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.
Comment 6 Daniel Mach 2013-06-27 06:05:12 EDT
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>

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