at the end of emerge =sys-apps/portage-2.1.2_rc1-r3 I get this error : --- !empty dir /usr/lib --- !empty dir /usr/bin --- !empty dir /usr --- !empty dir /etc/env.d Traceback (most recent call last): File "/usr/bin/emerge", line 34, in ? import emergehelp, xpak, commands, errno, re, socket, string, time, types ImportError: Bad magic number in /usr/lib/portage/bin/emergehelp.pyo and emerge command is breaked root@efflam:~ # emerge portage x11-wm/compiz sys-apps/baselayout Traceback (most recent call last): File "/usr/bin/emerge", line 34, in ? import emergehelp, xpak, commands, errno, re, socket, string, time, types ImportError: Bad magic number in /usr/lib/portage/bin/emergehelp.pyo --- I found a workaround : # ebuild /usr/portage/sys-apps/portage/portage-2.1.2_rc1-r3.ebuild unpack # ebuild /usr/portage/sys-apps/portage/portage-2.1.2_rc1-r3.ebuild compile # cp /var/tmp/portage/sys-apps/portage-2.1.2_rc1-r3/work/portage-2.1.2_rc1/pym/emergehelp.py /usr/lib/portage/bin/ and now emerge work better :-)
Created attachment 101130 [details] emerge --info
My merge ended ok and I was able to do etc-update but subsequent emerge commands failed with the same error: <<< dir /usr/share/doc/portage-2.1.2_rc1-r1 --- !empty dir /usr/share/doc --- !empty dir /usr/share --- !empty dir /usr/sbin --- !empty dir /usr/lib/portage/pym/elog_modules --- !empty dir /usr/lib/portage/pym/cache --- !empty dir /usr/lib/portage/pym --- !empty dir /usr/lib/portage/bin --- !empty dir /usr/lib/portage --- !empty dir /usr/lib --- !empty dir /usr/bin --- !empty dir /usr --- !empty dir /etc/env.d >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. * IMPORTANT: 1 config files in '/etc' need updating. * Type emerge --help config to learn how to update config files. localhost ~ # etc-update Scanning Configuration files... Automerging trivial changes in: /etc/dispatch-conf.conf Exiting: Nothing left to do; exiting. :) localhost ~ # emerge -uDvp world Traceback (most recent call last): File "/usr/bin/emerge", line 34, in ? import emergehelp, xpak, commands, errno, re, socket, string, time, types ImportError: Bad magic number in /usr/lib/portage/bin/emergehelp.pyo
*** Bug 153891 has been marked as a duplicate of this bug. ***
This bug is strange because emergehelp.pyo shouldn't even exist inside /usr/lib/portage/bin/. It really belongs in /usr/lib/portage/pym/.
hmmm yes it's strange, and I seem to be a very old file : root@efflam:~ # ls -al /usr/lib/portage/bin/emergehelp.* -rw-r--r-- 1 root root 21790 Sep 11 2003 /usr/lib/portage/bin/emergehelp.pyc -rw-r--r-- 1 root root 20860 Sep 11 2003 /usr/lib/portage/bin/emergehelp.pyo (it's a ls before the workaround) Now the ls give me this : root@efflam:/ # ls -al /usr/lib/portage/bin/emergehelp.* -rw-r--r-- 1 portage portage 26371 Nov 3 10:12 /usr/lib/portage/bin/emergehelp.py -rw-r--r-- 1 root root 21790 Sep 11 2003 /usr/lib/portage/bin/emergehelp.pyc -rw-r--r-- 1 root root 25487 Nov 3 10:14 /usr/lib/portage/bin/emergehelp.pyo
On my old system (older than 3 years) I had the same problem. On my new system (about 2 weeks), the files do not exist: [new_system] ls /usr/lib/portage/bin/emergehelp* ls: cannot access /usr/lib/portage/bin/emergehelp*: No such file or directory And equery agrees with my new system: [old_system] equery f portage | grep emergehelp /usr/lib/portage/pym/emergehelp.py The silly question is: Why uses emerge these files anyway? I'm thinking about a "brute force repair": Creating a tbz2-package of portage, removing all folders and untaring the tbz2-package to /-dir. Seems to be the quickest way for me as I'm too lazy to remove all the unneeded files manually.
I've fixed the ebuild to clean /usr/lib/portage/bin/*.pyo during preinst. That should solve the problem. (In reply to comment #6) > The silly question is: Why uses emerge these files anyway? Apparently it's a side-effect from the way that python loads modules.
Same error here. Manually removing emergehelp.py* in /usr/lib/portage/bin solve the problem. For info, these file where installed on nov 7 2003: -rw-r--r-- 1 root root 21783 nov 7 2003 emergehelp.pyc -rw-r--r-- 1 root root 20853 nov 7 2003 emergehelp.pyo David (In reply to comment #7) > I've fixed the ebuild to clean /usr/lib/portage/bin/*.pyo during preinst. That > should solve the problem. > > (In reply to comment #6) > > The silly question is: Why uses emerge these files anyway? > > Apparently it's a side-effect from the way that python loads modules. >
(In reply to comment #8) > Same error here. > Manually removing emergehelp.py* in /usr/lib/portage/bin solve the problem. > > For info, these file where installed on nov 7 2003: > -rw-r--r-- 1 root root 21783 nov 7 2003 emergehelp.pyc > -rw-r--r-- 1 root root 20853 nov 7 2003 emergehelp.pyo Your timestamps are pretty close to those in comment #5. Anyway, the preinst phase of the ebuild will clean those up automatically from now on.
*** Bug 154124 has been marked as a duplicate of this bug. ***
*** Bug 192619 has been marked as a duplicate of this bug. ***