Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage corrupted files? How do I fix this? [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Sat Mar 07, 2009 10:44 pm    Post subject: Portage corrupted files? How do I fix this? [Solved] Reply with quote

This machine has been stable for over two years, and kept constantly updated.

Yesterday, emerge -uavDN world upgraded a bunch of gnome-related packages, including orbit, which was upgraded from 2.14.13 to 2.14.16.
That particularly emerge informs it is going to slot 2.14.13 and 2.14.16, emits a warning about a long list of file collisions, and then installs.

After the emerge is over...
Code:
# equery list orbit
[ Searching for package 'orbit' in all categories among: ]
 * installed packages
[I--] [  ] dev-python/pyorbit-2.24.0 (0)
[I--] [  ] gnome-base/orbit-2.14.13 ()
[I--] [  ] gnome-base/orbit-2.14.16 (2)

However, emerge --depclean fails.
Code:
>>> Unmerging gnome-base/orbit-2.14.13...
Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = _emerge.emerge_main()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 14661, in emerge_main
    myopts, myaction, valid_atoms, spinner)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 13259, in action_depclean
    ldpath_mtimes, ordered=ordered)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 11498, in unmerge
    scheduler=scheduler)
  File "//usr/lib/portage/pym/portage/__init__.py", line 6241, in unmerge
    mylink.delete()
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1138, in delete
    shutil.rmtree(self.dbdir)
  File "/usr/lib/python2.5/shutil.py", line 174, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.5/shutil.py", line 172, in rmtree
    os.remove(fullname)
OSError: [Errno 2] No such file or directory: '/var/db/pkg/gnome-base/orbit-2.14.13/DEPMND'


Manually trying to unmerge orbit-2.14.13 produces the same result.

The file '/var/db/pkg/gnome-base/orbit-2.14.13/DEPMND' is unreadable by the "file" and "stat" commands.
Code:
~ # ls -l /var/db/pkg/gnome-base/orbit-2.14.13
ls: cannot access /var/db/pkg/gnome-base/orbit-2.14.13/DEPMND: No such file or directory
total 0
?????????? ? ? ? ?                ? DEPMND

monsoon orbit-2.14.13 # ls
Code:
ls: cannot access DEPMND: No such file or directory
DEPMND
monsoon orbit-2.14.13 # stat DEPMND
stat: cannot stat `DEPMND': No such file or directory
monsoon orbit-2.14.13 # file DEPMND
DEPMND: cannot open `DEPMND' (No such file or directory)


In fact, I can't even remove the "file".

Now, I can't complete emerge --depclean without getting the errors listed above, and I cannot completely remove orbit 2.14.13 from my system.


Last edited by Bones McCracker on Sun Mar 08, 2009 3:50 am; edited 1 time in total
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 612
Location: Munich, Germany

PostPosted: Sat Mar 07, 2009 10:55 pm    Post subject: Reply with quote

Something like this happens if portage is killed during the final install stage in which it writes status informations to /var/db/pkg/.

However the fix is quite simple:
Remove /var/db/pkg/gnome-base/orbit-2.14.13. After that portage will think orbit is not installed(but it still is). Then do a FEATURES="-collision-protect" emerge =gnome-base/orbit-2.14.13 to reinstall it.
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Sat Mar 07, 2009 11:45 pm    Post subject: Reply with quote

But I can't remove /var/db/pkg/gnome-base/orbit-2.14.13.
It contains what I gather is a link to a nonexistent inode or a corrupted file or something.

I've run an fsck on that partition, and it seems there are some other corrupt files as well. So I'll be pursuing this from that route. Fortunately, it looks like it's just the /var partition.

Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum