Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 159925 - RFE: Extend repodata format for PreRequires
Summary: RFE: Extend repodata format for PreRequires
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-09 10:53 UTC by Phil Knirsch
Modified: 2015-03-05 01:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2005-06-10 15:52:05 UTC
Type: ---

Attachments (Terms of Use)

Description Phil Knirsch 2005-06-09 10:53:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
The current repodata format limits the PreRequires to the "legacy" pre-requires which are written like this in a spec file:

PreReq: foo

Autodetected install or erase requires (Requires(post) and Requires(pre)) are completely ignored.

The following extention to the repodata format would allow those prerequires to be honred and used as well:

Add a 'type' property to the rpm:entry for requires which can have the following values:

  'legacy': The ones that are currently supported
  'pre': The Requires(pre) prereqs
  'post': The Requires(post) prereqs
  'preun': The Requires(preun) prereqs
  'postun': The Requires(postun) prereqs

If 'type' is missing but 'pre' is set to '1' then 'legacy' is assumed which would allow 100% compatibility with the old repodata format.

The general benefit would be that by including these prereqs the repodata could be used to do complete depresolving and ordering without any real rpm headers.

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

How reproducible:

Steps to Reproduce:
1. Grab all requires form current rpms. 
2. Detect all forms of prereqs and install and erase loops
3. Try to break those loops without the pre, post, preun and postun prereqs can result in wrong ordering

Additional info:

Comment 1 Phil Knirsch 2005-06-09 10:55:23 UTC
Ah, forgot in the upper part:

Not only autodetected install and erase prereqs are a problem but the ones you
write like this:

  Requires(pre): foo
  Requires(post): foo
  Requires(preun): foo
  Requires(postun): foo

Read ya, Phil

Comment 2 Jeremy Katz 2005-06-10 15:52:05 UTC
This should be discussed on the metadata mailing list:

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