Re: --force in addInstall

Tsai Li Ming <[email protected]> Mon, 07 Feb 2005 08:55:44 +0800
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
Thanks Paul.

I think you are almost right. From the man page, it is
"Same as using --replacepkgs, --replacefiles, and --oldpackage."

I guess this will be the right combination:
rpm.RPMPROB_FILTER_REPLACEPKG |
rpm.RPMPROB_FILTER_REPLACENEWFILES |
rpm.RPMPROB_FILTER_OLDPACKAGE

Liming

Paul Nasrat wrote:
> On Sun, Feb 06, 2005 at 11:22:43PM +0800, Tsai Li Ming wrote:
> 
>>Dear all,
>>
>>How do I do a force install(rpm --force) via addInstall? Is there a ts 
>>flag that I can set?
> 
> 
> Yes you do this by setting the problem filter on the transaction set.
> Off the top of my head IIRC --force is:
> 
> ts.setProbFilter(rpm.RPMPROB_FILTER_REPLACEPKG | 
>                  rpm.RPMPROB_FILTER_REPLACEOLDFILES | 
>                  rpm.RPMPROB_FILTER_REPLACENEWFILES)
> 
> Paul