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

Re: Segfault running rpmtsProblems()...

On Thu, Apr 10, 2003 at 01:48:56PM -0400, James Olin Oden wrote:
> I realized I should have been calling it when I had been, but
> I figured a seg fault is something you want to know about anyway.
> Here is the code section:
> 	(void) rpmtsSetNotifyCallback(t, NULL, NULL);
>         RETVAL = rpmtsRun(t, NULL, ignore_probs);
>         printf("Transaction returned:  %d!\n", RETVAL);
>         /* Check out the errors */
>         ps = rpmtsProblems(t);   /* <--dies here */
> My error was that rpmtsRun() was returning -1, and I guess your only 
> supposed to call rpmtsProblems when its return code is greater than
> one.  Anyway I am on rpm 4.2 (the one that shipped with Shrike), and I 
> just wanted to pass this along.

You can't install a package without a notify call back, as the
package is opened (yes, again) in the call back, and you're not
gonna install diddly w/o reading a package.

As I said Baroque'n API ...

Use the "standard" callback from lib/rpminstall.c, prototyped in rpmcli.h

73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC

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