Re: Externally-imposed transaction dependencies?

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

 



On Tue, 8 Jun 2004, Greg Hudson wrote:

> Context: I have a C program which builds up an RPM transaction set
> with the rpmtsAdd* functions and then executes it.  I use this program
> with Red Hat and locally-built packages.
> 
> Usually I rely on the dependency information in the Red Hat packages
> and rpmlib's ordering to do the right thing.  However, sometimes that
> turns out to be inadequate.  For instance, if an RHEL machine relies
> on a module in the kernel-unsupported RPM for its initrd, then it is
> important that kernel-unsupported be upgraded before kernel, but
> kernel doesn't require kernel-unsupported for obvious reasons.
> 
> So I'd like a way of imposing dependency information externally.
> What's the path of least resistance here?
> 
>   * Is there any way to add a dependency to the transaction set via
>     the library API?

I would guess yes but haven't tried it so I'm afraid I'm not going to 
much help in telling you how :) 

> 
>   * Does the order of my rpmtsAddInstallElement() calls have any
>     reliable effect on the install order?  (I have no idea how
>     dependency ordering is implemented; I imagine it could (a) totally
>     disregard the order of AddInstallElement requests by building a
>     hash table or something; (b) begin with the order of
>     AddInstallElement requests, and then pull packages towards the
>     beginning to satisfy requirements; (c) begin with the order of
>     AddInstallElement requests, and then pull packages towards the end
>     to where their requirements are satisfied.  If (b), then putting
>     things like kernel-unsupported *first* in the set, before anything
>     that might pull kernel towards the beginning, would seem to do
>     what I want.)

If you don't call rpmtsOrder() before committing the transaction the 
packages will be installed in the order you added them to the transaction 
set. The caveat is, then you'll have to do your own install ordering.
That's what apt-rpm does by default: it has it's own ordering mechanism 
which is for most purposes just fine, sometimes not (for example FC1 -> 
FC2 dist-upgrade produces various nasty problems if apt's internal 
ordering is used)

	- Panu -


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux