On Mon, 19 Jan 2004, Ram Prakash. R wrote: > Hello, > I have written an application in C which upgrades already running > package. I do the following: > > rpmtsCreate() > rpmtsAddInstallElement () /* with the upgrade flag set to 1 */ > rpmtsCheck() > rpmtsOrder() > rpmtsRun() > > The rpmtsRun function fails saying the package is already installed. How do I > specify that I want to do a forced upgrade of the package in the C API? The equivalent of --force in the C API is setting the right rpm problem filter flags, basically: int probFilter = 0; ... probFilter |= RPMPROB_FILTER_REPLACEPKG; probFilter |= RPMPROB_FILTER_REPLACEOLDFILES; probFilter |= RPMPROB_FILTER_REPLACENEWFILES; ... rpmtsRun(TS, NULL, (rpmprobFilterFlags)probFilter); - Panu - _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list