Bug 159925

Summary: RFE: Extend repodata format for PreRequires
Product: [Fedora] Fedora Reporter: Phil Knirsch <pknirsch>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: katzj, rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-10 15:52:05 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:

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:
Always

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:
  https://lists.dulug.duke.edu/mailman/listinfo/rpm-metadata