Bug 106647

Summary: transactions created with adds and removes dont seem to work
Product: Red Hat Enterprise Linux 2.1 Reporter: Adrian Likins <alikins>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: msw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-13 19:30:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106632    

Description Adrian Likins 2003-10-09 02:46:48 UTC
Description of problem:

transaction created that remove a package, and try to install
a new one, seem to cause errors about attempting to install
an older package even though the newer is being removed
in the transaction set. 

live.[root@i386-21as root]# rpm -q rpm
rpm-4.0.4-7x.20
                                                                               
                                                                                 
.live.[root@i386-21as root]# /usr/share/rhn/actions/packages.py
removing: amanda-devel-2.4.2p2-4
removing: apel-10.6-1
removing: openssh-2.9p2-7
removing: openssh-askpass-2.9p2-7
removing: openssh-askpass-gnome-2.9p2-7
removing: openssh-clients-2.9p2-7
removing: openssh-server-2.9p2-7
removing: rdate-1.3-3
removing: xsnow-1.42-11
adding: abiword-0.7.14-7
adding: apel-10.3-2
adding: openssh-3.1p1-8
adding: openssh-askpass-3.1p1-8
adding: openssh-askpass-gnome-3.1p1-8
adding: openssh-clients-3.1p1-8
adding: openssh-server-3.1p1-8
adding: rdate-1.0-8
adding: xsnow-1.40-14
gh0
gh1
rc: [('package apel-10.6-1 (which is newer than apel-10.3-2) is already
installed', (8, None, 0L)), ('package rdate-1.3-3 (which is newer than
rdate-1.0-8) is
+already installed', (8, None, 0L)), ('package xsnow-1.42-11 (which is newer
than xsnow-1.40-14) is already installed', (8, None, 0L))]
(0, 'packages.transaction ran successfully', {})


This is seen in the runTransaction code being backported to AS2.1

Comment 1 Jeff Johnson 2003-10-09 13:42:34 UTC
Hmmm, you can disable that check if you want to continue
trying to avoid an errata for AS2.1.

I'd rather fix with an errata however.

So what is needed?

Comment 2 Adrian Likins 2003-10-09 19:09:11 UTC
>so what is needed? 

eh? needed for what? 

a fix or a workaround is what I'm looking for. 

How would I disable the check?

Comment 3 Jeff Johnson 2003-10-10 13:23:47 UTC
The check is disabled by ignoring this problem:
    case RPMPROB_OLDPACKAGE:
        rc = snprintf(buf, nb,
                _("package %s (which is newer than %s) is already installed"),
                altNEVR, pkgNEVR);
        break;

Note that there are other consequences of disabling this check,
I recommend errata still.

Comment 4 Adrian Likins 2003-10-13 17:59:20 UTC
what consequences?



Comment 5 Adrian Likins 2003-10-13 18:46:19 UTC
adding ~rpm.RPMPROB_FILTER_OLDPACKAGE
to the ts doesnt seem to help, aka

rc = ts.run(transflag, ~rpm.RPMPROB_FILTER_OLDPACKAGE , rpmCallback,
cfg.readEntry("storageDir"))

Am I adding this at the wrong place, or the wrong flag?

Comment 6 Jeff Johnson 2003-10-13 19:30:10 UTC
The consequences are that you are disabling a sanity check,
so all consequences of disabling belong to you/up2date.

Hm, I think it's an enable, not a disable, to ignore
so negating with twiddle ain't the right thing to do.

Checking rpm-4.2.1 ... yes, it's enable to ignore, so
take the twiddle off. Assuming rpm-4.0.x is similar.

BTW, in rpm-4.1 and later the call is a seperate method.

From python/rpmts-py.c:

 * - ts.setProbFilter(ignoreSet) Set transaction set problem filter.
 * @param problemSetFilter - control bit(s) to ignore classes of problems,
 *              a logical or of one or more of the following bit(s):
 *      - rpm.RPMPROB_FILTER_IGNOREOS -
 *      - rpm.RPMPROB_FILTER_IGNOREARCH -
 *      - rpm.RPMPROB_FILTER_REPLACEPKG -
 *      - rpm.RPMPROB_FILTER_FORCERELOCATE -
 *      - rpm.RPMPROB_FILTER_REPLACENEWFILES -
 *      - rpm.RPMPROB_FILTER_REPLACEOLDFILES -
 *      - rpm.RPMPROB_FILTER_OLDPACKAGE -
 *      - rpm.RPMPROB_FILTER_DISKSPACE -
 * @return      previous ignoreSet

 

Comment 7 Adrian Likins 2003-10-15 00:04:34 UTC
okay, no twiddle seems to work.

I could of sworn I tried that though, amongst a dozen other
things. Seems to at least get past this hurdle.