Bug 1639986 - dnf list fails for non-superuser
Summary: dnf list fails for non-superuser
Keywords:
Status: CLOSED DUPLICATE of bug 1640235
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-17 05:55 UTC by Russel Winder
Modified: 2018-10-19 11:38 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-19 11:38:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Russel Winder 2018-10-17 05:55:05 UTC
I ran "dnf check-update --refresh" as a non superuser which downloads all the meta data separately from that of that when the superuser runs the command. I then ran "dnf list dnf" and got the following error. Furst though as superuser

|> sudo dnf list dnf
Last metadata expiration check: 0:20:07 ago on Wed 17 Oct 2018 06:32:32 BST.
Installed Packages
dnf.noarch                           4.0.4-1.fc30                           @rawhide


|> dnf list dnf
Last metadata expiration check: 0:11:15 ago on Wed 17 Oct 2018 06:42:11 BST.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1055, in run
    return self.command.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/commands/__init__.py", line 232, in run
    self.opts.packages)
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 402, in output_packages
    columns = _list_cmd_calc_columns(self.output, ypl)
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 105, in _list_cmd_calc_columns
    _add_pkg_simple_list_lens(data, pkg)
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 93, in _add_pkg_simple_list_lens
    rid = len(pkg._from_repo)
  File "/usr/lib/python3.7/site-packages/dnf/package.py", line 84, in _from_repo
    pkgrepo = self.base.history.repo(self)
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 362, in repo
    return self.swdb.getRPMRepo(str(pkg))
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 291, in swdb
    self._swdb = libdnf.transaction.Swdb(self.dbpath)
  File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 729, in __init__
    this = _transaction.new_Swdb(*args)
RuntimeError: Exec failed: attempt to write a readonly database

Comment 1 Julius B. 2018-10-18 19:56:19 UTC
This is probably a duplicate of bug#1639863, which will be fixed in libdnf-0.22.0-1.

Comment 2 Julius B. 2018-10-18 19:58:14 UTC
(In reply to Julius B. from comment #1)
> This is probably a duplicate of bug#1639863, which will be fixed in
> libdnf-0.22.0-1.

Sorry, bug#1640235 is the correct one.

Comment 3 Jaroslav Rohel 2018-10-19 11:38:52 UTC

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


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