On 12/10/2015 02:57 PM, Neal Gompa wrote:
On Thu, Dec 10, 2015 at 7:52 AM, Michael Schroeder
<mls(a)suse.de> wrote:
> On Thu, Dec 10, 2015 at 12:58:41PM +0100, Reindl Harald wrote:
>> Am 10.12.2015 um 12:53 schrieb Rex Dieter:
>>> Florian Weimer wrote:
>>>
>>>> When a %post scriptlet runs, is it guaranteed that the Requires:
>>>> dependencies have been unpacked? I understand that for cycle-breaking
>>>> purposes, it may not be true that the scriptlets for dependencies have
>>>> run. But are the files already there?
>>>
>>> I think the answer in general is no, you cannot be guaranteed that
> Requires:
>>> get installed before %post runs. That's one reason why Requires(post)
>>> exists
>>
>> sounds terrible
>>
>> what's with the "Require" of a "Requires(post)" to
guarantee that
>> the "Requires(post)" *really* work sucessful? sounds fragile
>
> Relax, the difference between Requires and Requires(post) is rather
> small. It only makes a difference when breaking dependency cycles,
> and in that case there's no correct solution anyway.
>
> I.e. if package A has "Requires: B" and package B has
> "Requires(post): A", there's really no correct order.
>
> "First A then B" is incorrect because "A Requires B" may mean
that
> B must by 100% installed (with postinstall scriptlets) for A to work,
> thus A may still not work in B's post script.
>
> Cheers,
> Michael.
>
> --
> Michael Schroeder mls(a)suse.de
> SUSE LINUX GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
> main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
>
>
As I recall, I believe there was a way in RPM at some point to declare a
dependency that *must* be unpacked and installed prior to starting to do
anything with a package, but I don't remember what is was. Debian has the
equivalent as "Pre-Depends", which essentially guarantees that it is
unpacked prior to starting the installation (and running associated
scriptlets). I think it was called "PreReq", but I vaguely remember hearing
at one point that this doesn't actually work anymore?
PreReq is/was only a less clearly defined version of
Requires(pre/post/interp) etc, its not any "stronger" than the newer
variants.
The only Right Thing to do on "balanced" dependency loops would be to
error out, but rpm never did that. In many cases delayed script
execution would help, but rpm doesn't support that.
- Panu -