Bug 537829 - Fastest mirror doesn't use cachedir, doesn't catch errors from unlink.
Fastest mirror doesn't use cachedir, doesn't catch errors from unlink.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
12
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
abrt_hash:c2157754
:
: 591054 595908 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-16 08:58 EST by Filipe Rosset
Modified: 2014-01-21 18:12 EST (History)
67 users (show)

See Also:
Fixed In Version: yum-utils-1.1.27-2.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-14 13:21:09 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.15 KB, text/plain)
2009-11-16 08:58 EST, Filipe Rosset
no flags Details
Patch to make fastestmirror to store timedhosts.txt inside user cache dirs (1.37 KB, patch)
2010-04-11 18:42 EDT, Baris Cicek
no flags Details | Diff

  None (edit)
Description Filipe Rosset 2009-11-16 08:58:28 EST
abrt detected a crash.

Attached file: backtrace
cmdline: /usr/bin/python /usr/bin/yum clean all 
component: yum
executable: /usr/bin/yum
kernel: 2.6.31.5-127.fc12.x86_64
package: yum-3.2.25-1.fc12
uuid: c2157754
Comment 1 Filipe Rosset 2009-11-16 08:58:33 EST
Created attachment 369698 [details]
File: backtrace
Comment 2 James Antill 2009-11-16 09:18:41 EST
  File "/usr/lib/yum-plugins/fastestmirror.py", line 119, in clean_hook
    os.unlink(hostfilepath)
OSError: [Errno 13] Permisso negada: '/var/cache/yum/timedhosts.txt'
Comment 3 Filipe Rosset 2009-11-16 12:42:16 EST
Hi James.
The best return should be something like

[rosset@rosset ~]$ yum update
Plugins carregados: fastestmirror, presto
Você precisa ser root para executar este comando.
[rosset@rosset ~]$ 

rosset = normal user without privileges
Comment 4 seth vidal 2009-11-16 16:02:01 EST
actually, if it uses the cachedir then there won't be a non-user-priveleges issue since the  timedhosts file will be in the user-owned cache dir /var/tmp/....
Comment 5 Baris Cicek 2010-03-05 14:09:01 EST

Comment
-----
Can't it handle permission denied message without crashing?
Comment 6 Mohamed Nasr Ahmed 2010-03-11 05:10:04 EST

How to reproduce
-----
1.open yakuak 
2. excute yum clean all
3. excute yum clean all
Comment 7 Daniel Scott 2010-03-12 12:20:30 EST

How to reproduce
-----
1. run `yum clean all`
2.
3.
Comment 8 Simen 2010-03-27 08:33:12 EDT

How to reproduce
-----
1. Clean the yum cache with BleachBit (http://bleachbit.sourceforge.net/).

Comment
-----
The error occurs whenever BleachBit is run with options 'yum -> clean all' turned on. Reproducable every time.
Comment 9 Mohammed Arafa 2010-03-28 08:13:59 EDT

How to reproduce
-----
1.run yum clean all as non root user
2.
3.
Comment 10 maximus0206 2010-03-31 03:35:02 EDT

How to reproduce
-----
1. yum clean all
2.
3.
Comment 11 Szymon 2010-04-08 10:41:25 EDT

Comment
-----
run command yum clean all via user (not root)
Comment 12 Jonathan 2010-04-11 16:12:51 EDT

How to reproduce
-----
1. ran "yum clean all" as non-root user
2.
3.
Comment 13 Baris Cicek 2010-04-11 18:42:47 EDT
Created attachment 405863 [details]
Patch to make fastestmirror to store timedhosts.txt inside user cache dirs

This patch make fastestmirror to use cachedirs inside /var/tmp/. Also puts unlink inside try block in case it could not still remove timedhosts.txt file. 

fastestmirror.conf file should also be changed (ie. cachedir option should be removed since it only uses /var/tmp cachedir on default). 

I'm not quite sure if importing misc is a good idea in order to get user cachedir, but I could not think out any other way than this. And I'm not a python/yum hacker so maybe there's another alternative without importing.

Anyways, I'm kind of bored getting CC-add notices for this trivial bug, so I hope it's fixed now.
Comment 14 James Antill 2010-04-12 10:35:14 EDT
 I didn't catch unlink (Eg. use unlink_f from misc), but that shouldn't be needed after the other fix:

http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=b4c9ab9ecf7e602f78836ba34b1fc3994904e533
Comment 15 Kaloyan Petrov 2010-04-14 03:21:37 EDT

How to reproduce
-----
1.yum clean all
2.
3.


Comment
-----
I tried to do 'yum clean all' as a normal user.
I wasnt able to reproduce it. I cleaned the yum data as root, then issue 'yum clean all' as the normal user again, and it worked.
Comment 16 happyday19c 2010-04-17 22:24:13 EDT
Package: yum-3.2.27-2.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. when run yum with no root previlleges, this traceback appears
2.
3.
Comment 17 ryuslash 2010-04-20 13:34:09 EDT

How to reproduce
-----
1. yum clean all

Comment
-----
I just tried a 'yum clean all' without having root privileges
Comment 18 Mark Harig 2010-04-24 20:12:45 EDT
Package: yum-3.2.27-2.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1. Enter the command 'yum clean plugins' at a bash shell prompt.  Do this as a non-root user.
2. This triggered 'abrt' and generated the backtrace, above.
3. I repeated the command using 'sudo' and the command completed with no errors.
Comment 19 Dwayne Bailey 2010-05-05 05:19:46 EDT
Package: yum-3.2.27-3.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1. As non-root user
2. yum clean all


Comment
-----
We should fail gracefully as we do with yum install when the user is not root.
Comment 20 Tim Lauridsen 2010-05-05 10:30:07 EDT
I have fixed it upstream

http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=cc7b91218b7828ccb949b53401c66895a7fadf9d

yum clean plugins

and 

yum list updates

now work as non root, with the plugin installed.
Comment 21 James Antill 2010-05-11 10:20:32 EDT
*** Bug 591054 has been marked as a duplicate of this bug. ***
Comment 22 pleabargain 2010-05-12 03:54:54 EDT
Package: yum-3.2.27-3.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.trying to work around rpmfusion not working
2.deleted rpmfusion repos
3.ran yum clean all
4.error
Comment 23 pleabargain 2010-05-12 04:07:15 EDT
Package: yum-3.2.27-3.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.installing rpmfusion
2.all kinds of errors saying no transaction
3.had to delete them and reinstall
yum still unhappy


Comment
-----
1.installing rpmfusion
2.all kinds of errors saying no transaction
3.had to delete them and reinstall
yum still unhappy
Comment 24 Ankur Sinha (FranciscoD) 2010-05-15 08:09:09 EDT
Package: yum-3.2.27-4.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. i tried yum history as a non root user
2. 
3.


Comment
-----
it shouldn't crash, give an error saying "you need to be root" as it does for other commands?
Comment 25 Joel Uckelman 2010-05-18 14:52:09 EDT
Package: yum-3.2.27-3.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----



Comment
-----
Ran 'sudo yum update'.
Comment 26 Adam Huffman 2010-05-19 06:09:26 EDT
Package: yum-3.2.27-3.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1. Mistakenly tried yum command as a normal user
2.
3.
Comment 27 Davide Repetto 2010-05-19 19:32:47 EDT
Package: yum-3.2.27-3.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1. do a "yum clean all" as user 
2.
3.


Comment
-----
It should fail more gracefully.
Comment 28 Tim Lauridsen 2010-05-26 00:31:18 EDT
*** Bug 595908 has been marked as a duplicate of this bug. ***
Comment 29 Robert Lightfoot 2010-05-28 23:01:37 EDT
Package: yum-3.2.27-1.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.yum clean all
2.
3.
Comment 30 Mohammed Arafa 2010-05-31 09:14:31 EDT
Package: yum-3.2.27-4.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1.yum clean all as a normal user

Comment
-----
ran "yum clean all" as a normal user 

yum should respond with something along the lines of "you are not root - quitting"
Comment 31 Erinn Looney-Triggs 2010-06-06 01:40:49 EDT
Package: yum-3.2.27-4.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. Run yum clean all with fastestmirror installed without root privileges
2.
3.


Comment
-----
Probably shouldn't crash just because it can't get access to a file.

-Erinn
Comment 32 Fedora Update System 2010-06-06 09:44:35 EDT
yum-utils-1.1.27-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/yum-utils-1.1.27-1.fc13
Comment 33 Fedora Update System 2010-06-08 15:35:04 EDT
yum-utils-1.1.27-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-utils-1.1.27-2.fc13
Comment 34 Aymen 2010-06-11 04:07:24 EDT
Package: yum-3.2.27-3.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.when i do yum clean all and i am not a suoer user
2.
3.
Comment 35 Fedora Update System 2010-06-14 13:19:59 EDT
yum-utils-1.1.27-2.fc13 has been pushed to the Fedora 13 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.