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

Re: rpmInstall()

On Mon, Jan 20, 2003 at 11:21:34AM -0500, Tristan Van Berkom wrote:
> Oops, I forgot to mention;
> 	If your familiar with the 3.x API
> then you'll already know.
> It is nescisary (please correct me if I'm wrong)
> to make a call to:
>     (void) rpmtsSetNotifyCallback(ts, pointerToNotifyFunc, 
> 			  (void *) ((long)INSTALL_LABEL));
> before calling rpmtsRun.

Yup, absolutely necessary to supply a notify function. And,
since the "fileName" (or python object) is totally opaque
to rpmlib, it's impossible to default this behavior.

> also please note:
> when calling
> rpmtsAddInstallElement(ts, h, "fileName", 1, NULL);
> a pointer to the "fileName" is kept in memory and
> succesivly passed to the "notifyCallback" func
> so that the "notifyCallback" can open the file.
> so make sure that the pointer remains valid 
> throughout rpmtsRun().

Yup. Since a pointer to a python object also traverses these
code paths it's impossible to do xstrdup() on the file path.

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] []