Bug 111092 - Dependency failure when provider has epoch and requirer has not
Summary: Dependency failure when provider has epoch and requirer has not
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-27 12:19 UTC by Julian Blake
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-11-30 14:46:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
provides-epoch.spec (717 bytes, text/plain)
2003-11-27 12:25 UTC, Julian Blake
no flags Details
requires-epoch.spec (749 bytes, text/plain)
2003-11-27 12:26 UTC, Julian Blake
no flags Details
requires-noepoch.spec (889 bytes, text/plain)
2003-11-27 12:27 UTC, Julian Blake
no flags Details

Description Julian Blake 2003-11-27 12:19:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031003

Description of problem:
When a package provides an explicit epoch, and another package
requires the provider's package version with epoch unspecified, the
dependency check fails.

According to /usr/share/doc/rpm-4.2.1/dependencies, an unspecified
epoch in a Requires line should match any provided epoch. 

I will submit spec files for three test packages which demonstrate 
the dependency treatment of a package which provides an epoch:

provides-epoch-1.4.1-17.i386.rpm
which provides provides-epoch-37:1.4.1-17
where 37 is the epoch

requires-epoch-1.4.2_01-2.cern.i386.rpm
which requires provides-epoch = 37:1.4.1

requires-noepoch-1.4.2_01-2.cern.i386.rpm
which requires provides-epoch = 1.4.1


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

How reproducible:
Always

Steps to Reproduce:
1. Copy provides-epoch.spec, requires-epoch.spec and
requires-noepoch.spec into .../rpm/SPECS/.
2. Create packages:
cd .../rpm/SPECS
rpmbuild -ba provides-epoch.spec
rpmbuild -ba requires-epoch.spec
rpmbuild -ba requires-noepoch.spec
3. Install packages (as root):
cd .../rpm/RPMS/i386
rpm -iv provides-epoch-*.i386.rpm
rpm -iv requires-epoch-*.i386.rpm
rpm -iv requires-noepoch-*.i386.rpm

Actual Results:  The first and second packages are installed. 
Installation of the third package fails with:

error: Failed dependencies:
  provides-epoch = 1.4.1 is needed by requires-noepoch-1.4.2_01-2.cern

Expected Results:  All three packages should have been installed.

Additional info:  None.

Comment 1 Julian Blake 2003-11-27 12:25:08 UTC
Created attachment 96223 [details]
provides-epoch.spec

Comment 2 Julian Blake 2003-11-27 12:26:24 UTC
Created attachment 96224 [details]
requires-epoch.spec

Comment 3 Julian Blake 2003-11-27 12:27:28 UTC
Created attachment 96225 [details]
requires-noepoch.spec

Comment 4 Michael Young 2003-11-27 22:21:26 UTC
Not specifying an epoch is broken behaviour. RHL 9 complained about
it, and I believe Fedora treats no epoch as epoch=0, so I believe this
is not a bug.

Comment 5 Julian Blake 2003-12-01 09:30:15 UTC
Here is the relevant paragraph in the RPM documentation file
/usr/share/doc/rpm-4.2.1/dependencies:

"The epoch (if present) is a monotonically inceasing integer, neither
the version or the release can contain the '-' hyphen character, and
the dependency parser does not permit white space within a definition.
 Unspecified epoch and releases are assumed to be zero, and are
interpreted as "providing all" or "requiring any" value."

It is the second sentence that makes me believe than an unspecified
epoch in a Requires line should match any provided epoch.  I feel that
the behaviour described in this sentence is logical.  Do you want to
change the Requires line in every dependent package, at the moment
when you are forced to introduce, or to change, an epoch in a
providing package?


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