Bug 910072 - yum: assertion error: assert basecmd in ('erase', 'remove'), basecmd
Summary: yum: assertion error: assert basecmd in ('erase', 'remove'), basecmd
Keywords:
Status: CLOSED DUPLICATE of bug 882484
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-11 17:53 UTC by Mikolaj Izdebski
Modified: 2013-02-19 20:15 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-19 20:15:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mikolaj Izdebski 2013-02-11 17:53:49 UTC
Assertion error

# yum -y --nogpgcheck --noplugins --releasever rawhide --installroot /chroot autoremove systemd
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

# rpm -q yum
yum-3.4.3-49.fc18.noarch

Comment 1 Zdeněk Pavlas 2013-02-18 10:58:59 UTC
"yum autoremove" is mostly used with no arguments.  When provided with some, code defaults to "yum remove" path, and then this assert fails.  There are three options:

1) Relax the assert. "yum autoremove foo" is an alias to "yum remove foo".

2) Barf an error that "autoremove" expects no args.

3) Remove only a subset of packages "yum autoremove" would remove.  Probably closest to the expected behavior.

Comment 2 James Antill 2013-02-19 20:15:34 UTC

*** This bug has been marked as a duplicate of bug 882484 ***


Note You need to log in before you can comment on or make changes to this bug.