On Wed, 2004-08-11 at 14:08, James Olin Oden wrote: > On Wed, 11 Aug 2004, Panu Matilainen wrote: > > <snip> > > It should be rpmtsSetRootDir(), not rpmtsRoot() which is for *getting* the > > current root :) > Sorry, I knew that (not that I realized I had oopsed though (-;). Fixed. > > > Also setting rpmtsSetVSFlags() isn't mandatory for the > > transaction to succeed, if not called the defaults will be used. IIRC that > > is. > > > I changed it to list that as something you may want to do. I did look > under rpmtsCreate and it does not actually set the vsflags, but I know > other places in the code (and defintately not always), things like this > will be initialized to a default if they have not been set. When I get > a moment I try to create a simple c file that runs a transaction and see > (no pun intended) if what happens when I omit this. Doesn't seem to hurt anything if you leave it out, doesn't hurt to set it I suppose ... :) > > > Hmm.. would be nice if we had some *tiny* examples of using rpmlib from C, > > along the lines what's in Paul's excellent rpm-python slides. Sure the > > information can be dug out from rpm's or apt-rpm's sources but neither are > > the easiest reading there is in the OSS world :) I'll try to come up with > > something one of these days unless of course somebody beats me to it. > > > In the sources there is the examples directory which last I checked had > some broken examples (-; Though they may have been fixed by now (I > checked in 4.2). I don't think there was a simple upgrade, install, erase > type example. If you have one Panu, I'll be happy to put it into the > HEAD. One of these days I am going to get back to rollback stuff, but > till then I can be of service in small ways like that. Didn't have anything better to do ... here's a "trivial rpm" implementation which allows simultaneous install/upgrade/erase from the command line but nothing else: http://laiskiainen.org/rpm/examples/ , eg # ./minirpm -e telnet -U foo-1.2-2.i386.rpm -i kernel-2.6-1.i686.rpm Feel free to include to rpm's examples, fix if you notice silly errors or whatever. Should build + work on any rpm >= 4.1 systems. - Panu - _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list