Mandrake Linux Archives: cooker@mandrivalinux.org

Mandrake Linux: cooker@mandrivalinux.org


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

  • From: Gustavo Niemeyer
  • Subject: Re: [Cooker] PreReq -> Requires(foo) -> ? saga
  • Date: 2 Jun 2005 14:01:52 -0000

> > Hmm, maybe because the dependency was satisfied during
> > openldap-server's %post ...

Yes, that's the basic idea. At %post the dependency was satisfied,
so it might be removed afterwards, theoretically.

> > Maybe we need a normal Requires too.

Yes, if the dependency is needed after installation as well, which
is the case many times, another Requires: tag must be used.

> > Since:
> > Requires(pre,post)
> > works, would something like:

This would present the same problem, since both %pre and %post are
executed at installation time.

> > Requires(,pre,post,preun)

No, this doesn't work.

> > work
> > Or, would
> > Requires(pre,post,preun)
> > be sufficient?

Yes, it'd work, but would be wrong, unless you really need the given
package during %preun. Adding the tag just to trick rpm into doing
something else than the proposed meaning is a bit misleading for
maintenance, and thus not advisable.

The correct way for now, if you really want to tell RPM the right
order of installation, is doing something like:

Requires(post): NAME
Requires: NAME

If NAME is required during %post and also after package installation.

> Niemeyer, this is your cue, jump in ;)

Here! Here! :-)

> >From what I understood from Niemeyer's conversation with jbj yesterday,
> it seems Requires(foo) should not be used unless absolutely needed to
> break a dependency loop.

That's how Jeff Johnson envisioned it, yes. Nowadays, Requires are already
used to order package installation by rpm and Smart (which has its
own improved ordering mechanism). The problem arrives when there is
a cycle of Requires with two or more packages. In that case, the old
PreRequires tag, and now Requires(pre,post,etc), are used to tell the
ordering mechanism where it should *not* break that dependency cycle,
enforcing the given order for packages involved in the pre-dependency.
OTOH, Jeff Johnson's idea is to automate the process of dependency
extraction from pre/post scripts, so that one wouldn't need to include
these tags manually.

That's actually an interesting idea, but there's a problem now.
Jeff Johnson is not working for RedHat anymore, and thus won't be able
to finish this stuff until he gets the necessary time and will. In
other words, like many other ideas in RPM, this is unfinished. I confess
I'm a bit worried by the current state of RPM. We have many core
features which need attention (transaction/file coloring and multilib,
PreReq -> Requires(...), etc), and exchanging maintainers now doesn't
help much.

-- 
Gustavo Niemeyer
http://niemeyer.net



Date Index | Thread Index

Search the archive:



To (un)subscribe from/to the lists:

Sympa mailing lists server.





Fund the Mandriva Linux project

Looking for a job?