RPM building section of RHL's developer guide
Jeff Johnson
jbj at redhat.com
Mon Jul 28 18:41:34 UTC 2003
On Sun, Jul 27, 2003 at 07:43:54PM +0300, Ville Skyttä wrote:
> On Thu, 2003-07-24 at 17:00, Jeff Johnson wrote:
>
> > Current behavior in rpm-4.2.1 (and all future versions of rpm) is
> > A missing (i.e. unsepcified) Epoch: is exactly equivalent to Epoch: 0.
> >
> > Whether you choose to make the Epoch: explicit is a matter of style, the
> > version comparison in rpm is now deterministic, the same answer is returned
> > every time.
>
> Let's consider a specfile without an explicit Epoch that produces
> packages foo and foo-devel. Does this work in foo-devel with rpm-4.2.1?
>
> Requires: foo = %{epoch}:%{version}
>
> IIRC it doesn't work in rpm-4.2 and earlier. It'd be nice if it worked,
You do not recall correctly. Without "doesn't work" definition no further
analysis is possible.
There are 3 behaviors wrto epoch in rpm (well 4 or 5, but early one's don't
really matter any more):
a) Ignore Epoch: if either value is missing. This was the behavior
from rpm-3.0.2 (when versioned dependencies were implemented) until
rpm-4.1. The packageing rule that was mandated at the time rpm-3.0.2
was released was
If foo has explicit epoch, then foo-devel must have
Requires: foo = E:V
Well that worked fine, until Red Hat released a package that was not
upgradeable, libogg or vorbis. This became a MUSTFIX for Red Hat 8.0
and the constraint on the problem ws "No package upgrades.". So the only
solution that I could devise was
b) For added packages, use behavior a), otherwise treat missing
Epoch: as Epoch: 0.
This is seriously confusing as two answers for rpm version comparison become
possible.
So, to give absolutely deterministic behavior in the future, rpm-4.2.1 is
going forward with
c) A missing (unspecified) Epoch: is exactly equivalent to Epoch: 0.
> in the case of an Epoch bump later the inter-subpackage dependencies
> would automagically follow if one doesn't fancy putting the explicit
> "Epoch: 0"'s in specfiles.
>
> Also, outputting the 0 in cases of a missing Epoch would be nice too, I
> remember trying out rpm-4.2.1 on RHL 9, and trying to install glib and
> glib-devel (Epoch: 1, but a buggy requires in -devel; fixed in Severn).
> The error message IIRC was:
>
> glib = x.x.x is required by glib-devel
>
> ...whereas a less confusing one IMHO would have been:
>
> glib = 0:x.x.x is required by glib-devel
>
> Ditto for "rpm -q --qf '%{epoch}:%{version}-%{release}' foo", does/could
> 4.2.1 print out "0:x.y-z" instead of "(none):x.y-z" if foo doesn't have
> an explicit Epoch?
>
Please apply the rule:
A missing (unspecified) Epoch: is exactly equivalent to Epoch: 0.
*Please*.
73 de Jeff
--
Jeff Johnson ARS N3NPQ
jbj at redhat.com (jbj at jbj.org)
Chapel Hill, NC
More information about the fedora-devel-list
mailing list