Bug 537829
Summary: | Fastest mirror doesn't use cachedir, doesn't catch errors from unlink. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Filipe Rosset <rosset.filipe> | ||||||
Component: | yum-utils | Assignee: | Seth Vidal <skvidal> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 12 | CC: | a.aspden, agentbwoy007, allinux4, anim-eh, anto.trande, ayatoujou, baris, baymen, blagoy.chepelov, bloch, BobLfoot, brandon.gardner, bugzilla, ceyhanmolla, contacto, dan, dataeditama, dennisgdaniels, donkishoot, dwald34, dwayne, elgueromexicano, ericosaucedo, erinn.looneytriggs, ffesti, findingharrylime, florian.voudgaarden, fpedraza, froze14ph, Giga_Tarek, happyday19c, james.antill, livermob, ljn917, lmacken, markhuomian, matheus.cg, matthew, maxamillion, maximus0206, mbreitfe, mdmpsyd, me, mohamednasr2000, nikolas.moraitis, ntsurfer, ogro21, omarberroteranlkf, peter.taylor, pmatilai, qash, ray, renlei040766, rh, ryan, ryuslash, sanjay.ankur, shiyicanghai, simenheg, sweigand, tim.lauridsen, tonysk8, tpeplt, uckelman, wellspring3, xxleite, zmanji | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | abrt_hash:c2157754 | ||||||||
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 17:21:09 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Filipe Rosset
2009-11-16 13:58:28 UTC
Created attachment 369698 [details]
File: backtrace
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' 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 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 ----- Can't it handle permission denied message without crashing? How to reproduce ----- 1.open yakuak 2. excute yum clean all 3. excute yum clean all How to reproduce ----- 1. run `yum clean all` 2. 3. 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. How to reproduce ----- 1.run yum clean all as non root user 2. 3. How to reproduce ----- 1. yum clean all 2. 3. Comment ----- run command yum clean all via user (not root) How to reproduce ----- 1. ran "yum clean all" as non-root user 2. 3. 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.
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 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. 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. How to reproduce ----- 1. yum clean all Comment ----- I just tried a 'yum clean all' without having root privileges 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. 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. 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. *** Bug 591054 has been marked as a duplicate of this bug. *** 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 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 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? Package: yum-3.2.27-3.fc12 Architecture: x86_64 OS Release: Fedora release 12 (Constantine) How to reproduce ----- Comment ----- Ran 'sudo yum update'. 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. 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. *** Bug 595908 has been marked as a duplicate of this bug. *** 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. 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" 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 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 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 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. 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. |