You are not logged in.
Hi, I have an alias created in my .bashrc file to update my archlinux, use reflector on it as follows ...
alias u="sudo reflector --sort rate -l 10 -f 5 --save /etc/pacman.d/mirrorlist && yaourt -Syyu --aur"
By upgrading reflector recently, it has stopped working with sudo. If I do run as root it works well, but if I run with sudo ...
yuki ~ $ u
Contraseña:
Traceback (most recent call last):
File "/usr/bin/reflector", line 5, in <module>
Reflector.main()
File "/usr/lib/python3.2/site-packages/Reflector.py", line 515, in main
ms, mirrors = process_options(options)
File "/usr/lib/python3.2/site-packages/Reflector.py", line 474, in process_options
mirrors = ms.get_mirrors()
File "/usr/lib/python3.2/site-packages/Reflector.py", line 189, in get_mirrors
return self.get_obj()['urls']
File "/usr/lib/python3.2/site-packages/Reflector.py", line 182, in get_obj
self.retrieve()
File "/usr/lib/python3.2/site-packages/Reflector.py", line 124, in retrieve
cache_file = get_cache_home('mirrorstatus.json')
File "/usr/lib/python3.2/site-packages/Reflector.py", line 32, in get_cache_home
path = os.path.join(require_path('HOME'), '.cache')
NameError: global name 'require_path' is not defined
I have tried to find a solution to the final error (I think that's the problem) but I have not managed to fix it
Can anyone help?
Thank you. A greeting.
Offline
I can report the same here.
I just updated minutes ago with this error
resolving dependencies...
looking for inter-conflicts...
Targets (1): reflector-2012.6.30-1
Total Installed Size: 0.09 MiB
Net Upgrade Size: 0.02 MiB
Proceed with installation? [Y/n] y
(1/1) checking package integrity [----------------------------------------] 100%
(1/1) loading package files [----------------------------------------] 100%
(1/1) checking for file conflicts [----------------------------------------] 100%
error: failed to commit transaction (conflicting files)
reflector: /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc exists in filesystem
Errors occurred, no packages were upgraded.
So I rm'd /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc (possibly not the smartest idea) but upgrade went through. Ran reflector and now have same error as OP. In 'su' works as intended.
Not helpful I know but thought I would add some info.
Cheers.
Last edited by doug piston (2012-07-01 01:57:03)
Offline
Culpa mea. It should be fixed in the newest version.
You can get it from my repo right now or wait for your mirror to synchronize.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Now, reflector works fine already. Thank you.
Cheers. ;-)
Offline
Please mark as [solved]. Thanks.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Hm I have not been able to find any repo where this is fixed yet:
feil: kunne ikke utføre transaksjon (motstridende filer)
reflector: /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc finnes i filsystemet
Feil oppstod, ingen pakker ble oppgradert.
What repo are you using?
"Common sense is not common"
Offline
So what are the solution here?
Should we
rm /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc
Or wait for the mirrors to sync?
Offline
Please see Xyne's post.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
loafer, I don't think Xyne was talking about the Reflector.cpython-32.pyc file problem, but rather about the sudo one. So with the risk of hijacking the thread, the question remains: how should we install the newest reflector with this file conflict? Is this a sign of a problem or can be neglected by using the --force?
My mirror seems up-to-date:
community/reflector 2012.7.1-1 [installed: 2012.3.26-1]
xyne-any/reflector 2012.7.1-1 [installed: 2012.3.26-1]
error: failed to commit transaction (conflicting files)
reflector: /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc exists in filesystem
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
Well, I just forced the reflector update (before the sudo problem update came out) and it didn't break and the sudo fix/update didnt throw the same error and works fine now, I'd assume it's safe to force the package in this case.
Offline
The .pyc error is unrelated. I don't actually know why those occasionally leak in to the filesystem. I'll look into it and release an update when I have a solution.
Last edited by Xyne (2012-07-02 16:29:36)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Ok, I've just looked through all of my Python packages. Aside from still using the "build" function instead of the "package" function (which has now been corrected), they all follow the Python packaging guidelines, i.e. they use setup.py with "--optimize=1" to generate .pyc files.
I haven't changed those functions in ages so I really don't know why the previous reflector package failed to track the .pyc file. Regardless, I have just updated all of my own packages and checked for conflicts. There were none.
If the conflict persists, please post the output of "pacman -Qi reflector; pacman -Ql reflector".
Last edited by Xyne (2012-07-02 17:33:40)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
(31/31) checking for file conflicts [########################################################] 100%
error: failed to commit transaction (conflicting files)
reflector: /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc exists in filesystem
Errors occurred, no packages were upgraded.
[walt@athlonx2 ~]$ pacman -Qi reflector;pacman -Ql reflector
Name : reflector
Version : 2012.3.26-1
URL : http://xyne.archlinux.ca/projects/reflector
Licenses : GPL
Groups : None
Provides : None
Depends On : python3
Optional Deps : None
Required By : None
Conflicts With : None
Replaces : None
Installed Size : 76.00 KiB
Packager : Xyne
Architecture : any
Build Date : Mon 26 Mar 2012 06:02:28 AM EDT
Install Date : Wed 28 Mar 2012 04:33:45 PM EDT
Install Reason : Explicitly installed
Install Script : No
Description : A Python 3 module and script to retrieve and filter the latest Pacman mirror list.
reflector /usr/
reflector /usr/bin/
reflector /usr/bin/reflector
reflector /usr/lib/
reflector /usr/lib/python3.2/
reflector /usr/lib/python3.2/site-packages/
reflector /usr/lib/python3.2/site-packages/Reflector-2012.3.26-py3.2.egg-info
reflector /usr/lib/python3.2/site-packages/Reflector.py
reflector /usr/lib/python3.2/site-packages/Reflector.pyc
reflector /usr/lib/python3.2/site-packages/Reflector.pyo
[walt@athlonx2 ~]$ pacman -Qo /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc
error: No package owns /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc
Offline
@wrarus
Thanks.
Does anyone know if this is due to a recent Python update? It seems that the default location for byte-compiled code has changed.
Just force the update (pacman -Sf reflector") for now. Do not force a full system upgrade, only the individual package.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Same Problem here:
(13/13) checking package integrity [######################] 100%
(13/13) loading package files [######################] 100%
(13/13) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
reflector: /usr/lib/python3.2/site-packages/__pycache__/Reflector.cpython-32.pyc exists in filesystem
Errors occurred, no packages were upgraded.
[ashu@hplaptop ~]$ pacman -Qi reflector
Name : reflector
Version : 2012.3.26-1
URL : http://xyne.archlinux.ca/projects/reflector
Licences : GPL
Groups : None
Provides : None
Depends On : python3
Optional Deps : None
Required By : None
Conflicts With : None
Replaces : None
Installed Size : 76.00 KiB
Packager : Xyne
Architecture : any
Build Date : Mon 26 Mar 2012 11:02:28 BST
Install Date : Mon 26 Mar 2012 23:15:40 BST
Install Reason : Explicitly installed
Install Script : No
Description : A Python 3 module and script to retrieve and filter the latest
Pacman mirror list.
[ashu@hplaptop ~]$ pacman -Ql reflector
reflector /usr/
reflector /usr/bin/
reflector /usr/bin/reflector
reflector /usr/lib/
reflector /usr/lib/python3.2/
reflector /usr/lib/python3.2/site-packages/
reflector /usr/lib/python3.2/site-packages/Reflector-2012.3.26-py3.2.egg-info
reflector /usr/lib/python3.2/site-packages/Reflector.py
reflector /usr/lib/python3.2/site-packages/Reflector.pyc
reflector /usr/lib/python3.2/site-packages/Reflector.pyo
Offline
This time it fits: Please see Xyne's post
"Common sense is not common"
Offline
I wasn't using sudo, but I received the same error message:
error: failed to cache JSON data ([Errno 2] No such file or directory: '/root/.cache/mirrorstatus.json')
I then tried to touch the file and I got this:
# touch /root/.cache/mirrorstatus.json
touch: cannot touch ‘/root/.cache/mirrorstatus.json’: No such file or directory
So I mkdir ~/.cache and it worked. Somehow, it was working just fine before, but now it required a new cache directory that it didn't make.
Offline