Bug 950722 - [abrt] dnf-0.3.2-1.gitf3818b4.fc20: queries.py:179:_construct_result:AttributeError: 'NoneType' object has no attribute 'query'
[abrt] dnf-0.3.2-1.gitf3818b4.fc20: queries.py:179:_construct_result:Attribut...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
abrt_hash:74cfd21d89fa3d940a02d622d51...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-10 14:20 EDT by Clyde E. Kunkel
Modified: 2014-09-30 19:41 EDT (History)
2 users (show)

See Also:
Fixed In Version: dnf-0.3.9-1.giteff4c49.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 02:09:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.63 KB, text/plain)
2013-04-10 14:20 EDT, Clyde E. Kunkel
no flags Details
File: core_backtrace (1.04 KB, text/plain)
2013-04-10 14:20 EDT, Clyde E. Kunkel
no flags Details
File: environ (2.06 KB, text/plain)
2013-04-10 14:20 EDT, Clyde E. Kunkel
no flags Details

  None (edit)
Description Clyde E. Kunkel 2013-04-10 14:20:45 EDT
Description of problem:
dnf update of rawhide 20130410 failed on:
  Cleanup    : lvm2-2.02.98-5.fc19.x86_64                                             101/157 
^CNon-fatal POSTUN scriptlet failure in rpm package lvm2-2.02.98-5.fc19.x86_64

^C was mine as cleanup frozen over 30 minutes.  No dnf-complete-transaction available it seems, so looked around and tried dnf history folled by dnf history info 37 and then traceback (copied here just in case).

[kunkelc@P5K-EWIFI <20> ~]$ sudo dnf history info 37
Transaction ID : 37
Begin time     : Wed Apr 10 13:53:10 2013
Begin rpmdb    : 2233:a15bce5e2290e1126f1e81f190362dcfeaff8ee6
User           : Clyde E. Kunkel <kunkelc>
Return-Code    : ** Aborted **
Command Line   : update
Transaction performed with:
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 304, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 132, in main
    result, resultmsgs = cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1386, in run
    return self.command.doCommand(self.base.basecmd, self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2236, in doCommand
    ret = self.base.historyInfoCmd(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2042, in historyInfoCmd
    self._historyInfoCmd(tid, pats)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2178, in _historyInfoCmd
    _simple_pkg(hpkg, 4, was_installed=True, pkg_max_len=pkg_max_len)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2075, in _simple_pkg
    ipkgs = dnf.queries.installed_by_name(self.sack, hpkg.name)
  File "/usr/lib/python2.7/site-packages/dnf/queries.py", line 205, in installed_by_name
    get_query=get_query)
  File "/usr/lib/python2.7/site-packages/dnf/queries.py", line 179, in _construct_result
    q = sack.query()
AttributeError: 'NoneType' object has no attribute 'query'

Version-Release number of selected component:
dnf-0.3.2-1.gitf3818b4.fc20

Additional info:
cmdline:        /usr/bin/python /bin/dnf history info 37
executable:     /bin/dnf
kernel:         3.9.0-0.rc6.git0.1.fc20.x86_64
runlevel:       N 5
uid:            0
ureports_counter: 1

Truncated backtrace:
queries.py:179:_construct_result:AttributeError: 'NoneType' object has no attribute 'query'

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 304, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 132, in main
    result, resultmsgs = cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1386, in run
    return self.command.doCommand(self.base.basecmd, self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2236, in doCommand
    ret = self.base.historyInfoCmd(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2042, in historyInfoCmd
    self._historyInfoCmd(tid, pats)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2178, in _historyInfoCmd
    _simple_pkg(hpkg, 4, was_installed=True, pkg_max_len=pkg_max_len)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2075, in _simple_pkg
    ipkgs = dnf.queries.installed_by_name(self.sack, hpkg.name)
  File "/usr/lib/python2.7/site-packages/dnf/queries.py", line 205, in installed_by_name
    get_query=get_query)
  File "/usr/lib/python2.7/site-packages/dnf/queries.py", line 179, in _construct_result
    q = sack.query()
AttributeError: 'NoneType' object has no attribute 'query'

Local variables in innermost frame:
ignore_case: False
patterns: [u'dnf']
latest_only: False
glob: False
get_query: False
sack: None
include_repo: '@System'
exclude_repo: None
flags: []
downgrades_only: False
updates_only: False
Comment 1 Clyde E. Kunkel 2013-04-10 14:20:50 EDT
Created attachment 733825 [details]
File: backtrace
Comment 2 Clyde E. Kunkel 2013-04-10 14:20:52 EDT
Created attachment 733826 [details]
File: core_backtrace
Comment 3 Clyde E. Kunkel 2013-04-10 14:20:55 EDT
Created attachment 733827 [details]
File: environ
Comment 4 Ales Kozumplik 2013-04-12 03:00:50 EDT
Hi Clyde,

thanks for reporting this. I accidentally stumbled upon this traceback on Wednesday and can confirm this is already fixed on master: https://github.com/akozumpl/dnf/commit/15a04cacad1d1b939c6e566120fd4d837338354e

Please just wait for the next dnf build (0.3.3).
Comment 5 Clyde E. Kunkel 2013-04-12 11:06:50 EDT
Thanks for the fix.  A couple of questions:

1) On which mail list is dnf discussed?
2) Is there a dnf-complete-transaction?

TIA
Comment 6 Ales Kozumplik 2013-04-12 11:16:01 EDT
(In reply to comment #5)
> Thanks for the fix.  A couple of questions:
> 
> 1) On which mail list is dnf discussed?

http://lists.baseurl.org/mailman/listinfo/yum-devel

and it's best to use "[dnf]" prefix in the message subject.

> 2) Is there a dnf-complete-transaction?

Not yet, if you want to have some impact on the speed of reintroduction please open an RFE bugzilla.

This is the complete list of the known and currently unsolved DNF issues:
https://bugzilla.redhat.com/buglist.cgi?classification=Fedora&query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&component=dnf&product=Fedora&list_id=1274196
Comment 7 Fedora Update System 2013-04-17 11:22:40 EDT
dnf-0.3.3-3.git91ba5e0.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dnf-0.3.3-3.git91ba5e0.fc19
Comment 8 Fedora Update System 2013-04-18 13:28:58 EDT
Package dnf-0.3.3-3.git91ba5e0.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.3.3-3.git91ba5e0.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6012/dnf-0.3.3-3.git91ba5e0.fc19
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2013-07-08 04:15:01 EDT
dnf-0.3.9-1.giteff4c49.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dnf-0.3.9-1.giteff4c49.fc19
Comment 10 Fedora Update System 2013-07-18 02:09:01 EDT
dnf-0.3.9-1.giteff4c49.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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