Bug 973169 - RFE: add ExcludeArch and ExclusiveArch to repodata
Summary: RFE: add ExcludeArch and ExclusiveArch to repodata
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: createrepo_c
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1465408
TreeView+ depends on / blocked
 
Reported: 2013-06-11 12:15 UTC by Daniel Mach
Modified: 2020-02-14 07:30 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Mach 2013-06-11 12:15:33 UTC
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 09:49:14 UTC
> 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 10:18:35 UTC
(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 11:06:18 UTC
(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 11:26:19 UTC
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 11:52:28 UTC
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 10:05:12 UTC
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.