Requires(pre) support?

Ville Skyttä vskytta at gmail.com
Sat Jul 8 02:31:30 PDT 2006


On Fri, 2006-07-07 at 16:00 -0600, Vincent Danen wrote:

> Requires(pre):  setup >= 2.5-5735avx
> 
> in a few spec files because that setup package provides some new groups
> that are required by other packages.  apt-get dist-upgrade gets all the
> required files, but setup is being installed after the files that
> require it:

A bit off topic, but note that if the setup package contains those new
groups only in the new groups file (ie. no groupadd in %post), that's
not a good idea, as witnessed by the log you posted:

>   30:setup                  warning: /etc/group created as /etc/group.rpmnew

Oops.

Another slightly off topic note, Requires(pre) in practice means
"required until the %pre scriptlet is run".  After the transaction has
completed, that dependency no longer affects anything, and the package
pulled in with Requires(pre) can be removed.  That's probably a
non-issue with the "setup" package if it's similarly required by many
essential system packages in Annvix like it is with distros I'm familiar
with.  But I thought I'd mention it because many packagers tend to make
the erroneous assumption that Requires(pre) alone can be always used as
a drop-in substitute for the old PreReq tag.  For more info, see
http://rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html#S3-RPM-DEPEND-FINE-GRAINED




More information about the Apt-Rpm mailing list