Bug 975619 - [abrt] yum-3.4.3-95.fc19: misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'
Summary: [abrt] yum-3.4.3-95.fc19: misc.py:939:unlink_f:OSError: [Errno 13] Permission...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:108b02298aabdae818ef4408cef...
: 1011758 1015647 1031363 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-19 00:21 UTC by Francisco de la Peña
Modified: 2013-11-18 08:54 UTC (History)
8 users (show)

Fixed In Version: yum-3.4.3-111.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-08 11:32:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.59 KB, text/plain)
2013-06-19 00:21 UTC, Francisco de la Peña
no flags Details
File: core_backtrace (1018 bytes, text/plain)
2013-06-19 00:21 UTC, Francisco de la Peña
no flags Details
File: environ (3.15 KB, text/plain)
2013-06-19 00:21 UTC, Francisco de la Peña
no flags Details

Description Francisco de la Peña 2013-06-19 00:21:38 UTC
Description of problem:
When doing bash completion.

Version-Release number of selected component:
yum-3.4.3-95.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -t /usr/share/yum-cli/completion-helper.py -d 0 -C list all firefox
executable:     /usr/share/yum-cli/completion-helper.py
kernel:         3.9.5-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Traceback (most recent call last):
  File "/usr/share/yum-cli/completion-helper.py", line 95, in <module>
    main(sys.argv[1:])
  File "/usr/share/yum-cli/completion-helper.py", line 88, in main
    base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 522, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/completion-helper.py", line 52, in doCommand
    patterns=[get_pattern(extcmds)])
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2763, in doPackageLists
    avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1030, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 767, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 364, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 237, in populate
    misc.unlink_f(repo.cachedir +'/gen/%s.sqlite' % mydbtype)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 939, in unlink_f
    os.unlink(filename)
OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Local variables in innermost frame:
e: OSError(13, 'Permission denied')
filename: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Comment 1 Francisco de la Peña 2013-06-19 00:21:45 UTC
Created attachment 762680 [details]
File: backtrace

Comment 2 Francisco de la Peña 2013-06-19 00:21:49 UTC
Created attachment 762681 [details]
File: core_backtrace

Comment 3 Francisco de la Peña 2013-06-19 00:21:53 UTC
Created attachment 762682 [details]
File: environ

Comment 4 Francisco de la Peña 2013-06-19 00:26:52 UTC
Description of problem:
How to reproduce:
$ yum info optionaltext[tab completion]

Version-Release number of selected component:
yum-3.4.3-95.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -t /usr/share/yum-cli/completion-helper.py -d 0 -C list all firefo
executable:     /usr/share/yum-cli/completion-helper.py
kernel:         3.9.5-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
misc.py:939:unlink_f:OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Traceback (most recent call last):
  File "/usr/share/yum-cli/completion-helper.py", line 95, in <module>
    main(sys.argv[1:])
  File "/usr/share/yum-cli/completion-helper.py", line 88, in main
    base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 522, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/completion-helper.py", line 52, in doCommand
    patterns=[get_pattern(extcmds)])
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2763, in doPackageLists
    avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1030, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 767, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 364, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 237, in populate
    misc.unlink_f(repo.cachedir +'/gen/%s.sqlite' % mydbtype)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 939, in unlink_f
    os.unlink(filename)
OSError: [Errno 13] Permission denied: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Local variables in innermost frame:
e: OSError(13, 'Permission denied')
filename: '/var/cache/yum/x86_64/19/fedora/gen/primary_db.sqlite'

Comment 5 Zdeněk Pavlas 2013-06-19 07:37:36 UTC
The compressed primary_db is valid (matches repomd.xml), but the decompressed file was invalid.  I'm curious how this could happen.  Did You kill Yum while it was retrieving metadata before that?

Comment 6 Francisco de la Peña 2013-06-19 15:04:11 UTC
Not sure, in fact I was trying to get the terminal where it happened, so it could. However, $ yum remove [tab] (instead of info) works fine without rebuilding db. I will try again tonight after rebuilding.

Comment 7 Francisco de la Peña 2013-06-21 00:52:32 UTC
After recreating repo db, it worked fine for yum info completion.

Comment 8 Zdeněk Pavlas 2013-09-25 07:38:59 UTC
*** Bug 1011758 has been marked as a duplicate of this bug. ***

Comment 9 Zdeněk Pavlas 2013-10-07 10:06:00 UTC
*** Bug 1015647 has been marked as a duplicate of this bug. ***

Comment 10 Zdeněk Pavlas 2013-10-07 10:10:31 UTC
Since 3.4.3-99, unlink_f() does handle EPERM.

Comment 11 Fedora Update System 2013-10-07 11:14:19 UTC
yum-3.4.3-111.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-111.fc19

Comment 12 Fedora Update System 2013-10-08 11:32:46 UTC
yum-3.4.3-111.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Zdeněk Pavlas 2013-11-18 08:46:19 UTC
*** Bug 1031363 has been marked as a duplicate of this bug. ***

Comment 14 Zdeněk Pavlas 2013-11-18 08:54:52 UTC
*** Bug 1015647 has been marked as a duplicate of this bug. ***


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