abrt 1.0.8 detected a crash. architecture: i686 cmdline: /usr/bin/python /usr/bin/yum history component: yum executable: /usr/bin/yum kernel: 2.6.33-1.fc13.i686 package: yum-3.2.26-6.fc13 reason: history.py:217:_get_cursor:OperationalError: unable to open database file release: Fedora release 13 (Rawhide) backtrace ----- history.py:217:_get_cursor:OperationalError: unable to open database file 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 254, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 109, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 356, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 1314, in doCommand ret = base.historyListCmd(extcmds) File "/usr/share/yum-cli/output.py", line 1297, in historyListCmd for old in self.history.old(tids, limit=limit): File "/usr/lib/python2.6/site-packages/yum/history.py", line 446, in old cur = self._get_cursor() File "/usr/lib/python2.6/site-packages/yum/history.py", line 217, in _get_cursor self._conn = sqlite.connect(self._db_file) OperationalError: unable to open database file Local variables in innermost frame: self: <yum.history.YumHistory instance at 0x97d848c> How to reproduce ----- 1. I just tried to do a 'yum history' on a Fedora 13 test system 2. 3.
Created attachment 401831 [details] File: backtrace
Looking at the permissions on the .sqlite file in /var/lib/yum/history/ I see that only root has rw for the file. Running 'yum history' as root allows me to see the information. I remember running this same command as my user on my Fedora 12 box and it worked fine. Is this due to a change in yum between F12 and F13? [elake@jackson ~]$ ls -al /var/lib/yum/history/ total 120 drwxr-xr-x. 2 root root 4096 Mar 22 13:51 . drwxr-xr-x. 4 root root 4096 Mar 22 13:51 .. -rw-------. 1 root root 107520 Mar 22 13:51 history-2010-03-19.sqlite [elake@jackson ~]$ yum history Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit Adding en_US to language list ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 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 254, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 109, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 356, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 1314, in doCommand ret = base.historyListCmd(extcmds) File "/usr/share/yum-cli/output.py", line 1297, in historyListCmd for old in self.history.old(tids, limit=limit): File "/usr/lib/python2.6/site-packages/yum/history.py", line 446, in old cur = self._get_cursor() File "/usr/lib/python2.6/site-packages/yum/history.py", line 217, in _get_cursor self._conn = sqlite.connect(self._db_file) sqlite3.OperationalError: unable to open database file [elake@jackson ~]$ su -c 'yum history' Password: Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit Adding en_US to language list ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 8 | Eric Lake <elake> | 2010-03-22 13:51 | Install | 6 7 | Eric Lake <elake> | 2010-03-22 13:26 | Install | 2 6 | Eric Lake <elake> | 2010-03-22 11:43 | Install | 1 5 | Eric Lake <elake> | 2010-03-22 08:34 | Install | 6 4 | Eric Lake <elake> | 2010-03-22 08:26 | Install | 17 3 | Eric Lake <elake> | 2010-03-22 08:03 | I, U | 264 2 | Eric Lake <elake> | 2010-03-22 08:00 | Erase | 18 1 | Eric Lake <elake> | 2010-03-19 15:36 | Install | 1 history list
Yeh, it was decided that the information in there was privilaged and so only root should see it by default. We shouldn't traceback though.
Thanks for the very quick response. So I assume then that the expected output would be like what a normal user sees when trying to run 'yum install foo' as themselves "You need to be root to perform this command.".
atm. I just made it act like there is an empty history file, we could put the root check in the yum history command too ... although that'd mean it still wouldn't work even if the sysadmin did a chmod on /var/lib/history.
How to reproduce ----- 1. Run 'yum history' as a regular user (in a newly-installed F13 Beta TC1 system) 2. 3.
How to reproduce ----- 1. yum history list <item> as non-root user 2. 3.
How to reproduce ----- 1. Be common user. 2. Run "yum history". 3. Comment ----- This is what happens when I run "yum history" from non-root account.
This should be fixed in the version that went into rawhide just before the weekend, if anyone wants to test that and make sure.
I'm on F13, not rawhide - is it in an f13 build yet? -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
No, rawhide only atm.
Has the version with the fix been included in the f13 beta release? I just tried again still see the backtrace. yum-3.2.27-3.fc13.noarch -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
No, while https://admin.fedoraproject.org/updates/yum-3.2.27-3.fc13 has recently been pushed it contains just a single fix (for MD reget). We're unlikely to rebase F-13, or backport this fix, until post GA.
Package: yum-3.2.27-3.fc13 Architecture: x86_64 OS Release: Fedora release 13 (Goddard) How to reproduce ----- 1. Run $ yum history 2. crash 3.
Package: yum-3.2.27-3.fc13 Architecture: x86_64 OS Release: Fedora release 13 (Goddard) How to reproduce ----- 1. $ yum history 2. crash 3. # yum history 4. OK
*** Bug 585196 has been marked as a duplicate of this bug. ***
Package: yum-3.2.27-3.fc13 Architecture: i686 OS Release: Fedora release 13 (Goddard) How to reproduce ----- 1. PackageKit was running. 2. I wanted to find out if the previous update run was successful, or why another one was apparently going on, so I ran yum history list. 3. Crash.
This is fixed in rawhide, and I was sure it was fixed in F-13 ... but if not it'll be fixed in the first update afterwards (if you really care chmod the history file, or install the yum from rawhide :).
*** Bug 587533 has been marked as a duplicate of this bug. ***
yum-3.2.28-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/yum-3.2.28-1.fc13
yum-3.2.28-1.fc14 has been submitted as an update for Fedora 14. http://admin.fedoraproject.org/updates/yum-3.2.28-1.fc14
yum-3.2.28-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/yum-3.2.28-1.fc12
yum-3.2.28-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
yum-3.2.28-3.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/yum-3.2.28-3.fc12
yum-3.2.28-3.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/yum-3.2.28-3.fc13
yum-3.2.28-3.fc14 has been submitted as an update for Fedora 14. http://admin.fedoraproject.org/updates/yum-3.2.28-3.fc14
yum-3.2.28-3.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
yum-3.2.28-3.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
yum-3.2.28-3.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.