Re: rpmlib installation qualms

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

 



On 11/22/06, R. Tyler Ballance <tyler@xxxxxxxxxxxxx> wrote:

Just out of curiosity, is the
int rpmInstall(rpmts ts, struct rpmInstallArguments_s *ia, const char
**fileArgv);

function just there to tease me? :)

I'm calling it with a valid transaction, NULL rpmInstallArguments, and then
a valid string (current working directory, or is an actual full path
necessary?) and it SIGSEGVs every time.


There are 2 problems there. You need to pass non-NULL rpmInstallArguments,
and the 3rd argument is an array of string ptrs, not a string.

   struct rpmInstallArguments_s *ia = alloca(sizeof(*ia));

   memset(ia, 0, sizeof(*ia));

    ia->installInterfaceFlags = INSTALL_INSTALL|INSTALL_HASH;

is equivalent to -ih from the CLI, and is likely the minimal necessary
for calling rpmInstall.

Are the install arguments necessary? where else might the SIGSEGV be
stemming from? what is the flying weight of an unladen sparrow?


Necessary, yes.

Unladen sparrows dissipate waste energy through segmentaion fault droppings.



I've seen references to old mailing lists questions that seem to be from
before rpmInstall() was created, and have relatively complicated sample code
for installation in the thread, but rpmInstall (and rpmInstallSource()) seem
to be what is needed, if they'd just work :)

Also, how are conflicts handled, or dependencies, etc? I want to make sure
my code accommodating of some of the error cases rpmlib might present.


Almost all bits to control transaction operations passed to rpmInstall() are in
   ia->interfaceFlags
   ia->transFlags

73 de Jeff

_______________________________________________
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