Externally-imposed transaction dependencies?

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

 



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?

  * 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.)

  * I could, of course, rebuild the relevant Red Hat RPMs with
    additional requires directives.  I'd really rather avoid doing
    that, though.

Thanks.


_______________________________________________
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