Bug 882484

Summary: [abrt] yum-3.4.3-30.fc17: cli.py:1081:erasePkgs:AssertionError: autoremove
Product: [Fedora] Fedora Reporter: hyun4120
Component: yumAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: admiller, ali.sherif10, bitlord0xff, ffesti, james.antill, lsatenstein, mizdebsk, packaging-team, red, semberal, tim.lauridsen, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:adb826d5408f08aa7e1718c0bf92fb08138d9800
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 18:48:06 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:
Attachments:
Description Flags
File: event_log
none
File: core_backtrace
none
File: executable
none
File: smolt_data
none
File: environ none

Description hyun4120 2012-12-01 10:35:38 UTC
Version-Release number of selected component:
yum-3.4.3-30.fc17

Additional info:
libreport version: 2.0.18
abrt_version:   2.0.18
cmdline:        /usr/bin/python /usr/bin/yum autoremove libreoffice
kernel:         3.6.7-4.fc17.x86_64

backtrace:
:cli.py:1081:erasePkgs:AssertionError: autoremove
:
:Traceback (most recent call last):
:  File "/usr/bin/yum", line 29, in <module>
:    yummain.user_main(sys.argv[1:], exit_code=True)
:  File "/usr/share/yum-cli/yummain.py", line 319, in user_main
:    errcode = main(args)
:  File "/usr/share/yum-cli/yummain.py", line 144, in main
:    result, resultmsgs = base.doCommands()
:  File "/usr/share/yum-cli/cli.py", line 485, in doCommands
:    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
:  File "/usr/share/yum-cli/yumcommands.py", line 750, in doCommand
:    ret = base.erasePkgs(extcmds, pos=pos, basecmd=basecmd)
:  File "/usr/share/yum-cli/cli.py", line 1081, in erasePkgs
:    assert basecmd in ('erase', 'remove'), basecmd
:AssertionError: autoremove
:
:Local variables in innermost frame:
:all_rms: []
:self: <cli.YumBaseCli object at 0x145d550>
:pos: False
:userlist: ['libreoffice']
:arg: 'libreoffice'
:basecmd: 'autoremove'

Comment 1 hyun4120 2012-12-01 10:35:42 UTC
Created attachment 655483 [details]
File: event_log

Comment 2 hyun4120 2012-12-01 10:35:44 UTC
Created attachment 655484 [details]
File: core_backtrace

Comment 3 hyun4120 2012-12-01 10:35:46 UTC
Created attachment 655485 [details]
File: executable

Comment 4 hyun4120 2012-12-01 10:35:48 UTC
Created attachment 655486 [details]
File: smolt_data

Comment 5 hyun4120 2012-12-01 10:35:50 UTC
Created attachment 655487 [details]
File: environ

Comment 6 ali.sherif10 2013-01-16 10:06:31 UTC
I used autoremove.

Package: yum-3.4.3-30.fc17
OS Release: Fedora release 17 (Beefy Miracle)

Comment 7 James Antill 2013-02-19 20:15:34 UTC
*** Bug 910072 has been marked as a duplicate of this bug. ***

Comment 8 James Antill 2013-02-19 20:16:47 UTC
This got fixed upstream, should be getting a new yum any day now. But you can work around it by using:

yum --setopt=clean_requirements_on_remove=true remove blah

Comment 9 Leslie Satenstein 2013-03-13 17:39:45 UTC
When reviewing YUM for next update (or DNF), please modify the SQL to include a usage counter for libraries, and other installed pre-co requisites.
Every prerequisite needs a use-reference counter. Two unrelated applications referring to the same library would indicate that this library is used by two applications. 

Currently when erasing an installed application/module, Yum blindly pulls in and includes all the prerequisites, to the erase list. But many prerequisites have other applications that cannot function if full removal is performed.

By maintaining a use-reference counter, the erase logic will decrement the use-reference counter by one, and if the result is zero, only then will it add the actual library to the erase list.   

This is the better way than using btfrs to allow safe evaluation of applications, other than via virtual machines.

Comment 10 Davide Repetto 2013-05-12 11:00:00 UTC
The bug is present again in yum-3.4.3-54.fc18.noarch

Comment 11 Fedora End Of Life 2013-07-04 07:04:15 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2013-08-01 18:48:12 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Zdeněk Pavlas 2013-11-14 08:56:20 UTC
*** Bug 1030032 has been marked as a duplicate of this bug. ***