umask package policy

Ville Skyttä ville.skytta at iki.fi
Tue May 24 13:23:37 UTC 2005


On Tue, 2005-05-24 at 10:50 +0200, Enrico Scholz wrote:
> ville.skytta at iki.fi (Ville Skyttä) writes:
> 
> >> > Using context marked dependencies like Requires(pre) to "solve" this is
> >> > abuse, please don't do that.
> >> 
> >> Why abuse? There is no other way to say 'I require directory /foo before
> >> my files will be installed' for a package.
> >
> > "Requires(pre): /foo" does not say that.  It says "directory /foo is
> > required until my %pre script has completed".  See the description in
> > the max-rpm snapshot (link in my previous mail).
> 
> ok; then a third 'Requires:' should be added. But that's implicated by
> 'Requires(...)' in the current tools.

Note that after the %pre script of a package "bar" containing "Requires
(pre): foo" has finished, as far as "bar" is concerned, "foo" can be
erased, and rpm happily lets one do that.  The effects of this in the
current case at hand (dir ownership) is not really noticeable, but it
may very well be in other cases, which is why it's best to stay away
from depending on such side effects.  Otherwise they _will_ eventually
find their way into situations where it matters and bites.

As a side note and a potential example case, it would make perfect sense
to me if rpm would just bypass all Requires(foo) dependencies when a
package is being installed, upgraded or erased with --noscripts.  This
is not the case today though.

> > You are using side effects of tools not meant to enforce what you're
> > trying to achieve.  In other words, abusing them.  What's wrong with
> > plain Requires or PreReq?
> 
> 'Requires:' does not guarantee that the directory exists when the package
> is installed.

How not?  rpm does order normal dependencies too.  Do you have an
example where this would not hold for normal Requires (or PreReq within
simple dependency loops using FC4's rpm)?  See also below.

>  Semantic of 'PreReq' is not clear to me and afaik, it is
> deprecated and should be replaced by 'Requires(...):'.

Deprecated perhaps, but again, it's different from Requires(foo) and
cannot be blindly just replaced like that everywhere.

All this is documented in the max-rpm snapshot, here's the link again:
http://rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html#S3-RPM-DEPEND-FINE-GRAINED

If something's wrong in that section, please let me know.  And note that
I wrote this section before the PreReq magic was added back to FC4's
rpm, that's why the slightly dubious tone regarding it.  I believe it's
still correct though.




More information about the Fedora-maintainers mailing list