Requires(pre) support?

Vincent Danen vdanen at annvix.org
Sat Jul 8 14:56:58 PDT 2006


* Ville Skytt? <vskytta at gmail.com> [2006-07-08 12:31:30 +0300]:

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

I'm not a complete idiot.  I have a check in the %post script to see if
the new groups I added exist on the system; if not, they're manually
added.  The group.rpmnew bit is, unfortunately, annoying, but for clean
installs, the groups are there.

The log doesn't witness anything... all it witnesses is that the file
got changed and wasn't replaced, nothing about groups being added or
not.

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

This is useful.  Does rpm actually remove a program that is no longer
required by anything else at the end of executing the %pre script?  That
seems... wrong.  But ok, good to know.

And no, setup is pretty much required by a lot of things, so I'm not
worried about setup off and disappearing.

What I am worried about is why it apt ignored Requires(pre) since,
obviously, those %pre scripts were run *without* the specified version
of setup.

-- 
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
mysql> SELECT * FROM users WHERE clue > 0;
Empty set (0.00sec)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20060708/5ee55618/attachment-0003.pgp>


More information about the Apt-Rpm mailing list