Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

I deleted /usr/portage/*


cuchumino

Question

I know... I know...  :unsure:

 

I was going for the last action of the day. typed in

rm -rf /usr/portage/*

instead of:

rm -rf /usr/portage/distfiles/*

I am currently getting the following output when I try to emerge --sync

Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 36, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 39, in <module>
    from portage.package.ebuild.doebuild import _check_temp_dir
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/doebuild.py", line 41, in <module>
    from portage.dbapi.porttree import _parse_uri_map
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/porttree.py", line 20, in <module>
    from portage.cache import metadata_overlay, volatile
ImportError: cannot import name metadata_overlay

I tried python-update but...

Traceback (most recent call last):
  File "/usr/bin/portageq", line 820, in <module>
    main()
  File "/usr/bin/portageq", line 800, in main
    args[0] = portage.settings["ROOT"]
  File "/usr/lib64/python2.7/site-packages/portage/proxy/objectproxy.py", line 37, in __getitem__
    return object.__getattribute__(self, '_get_target')()[key]
  File "/usr/lib64/python2.7/site-packages/portage/__init__.py", line 608, in _get_target
    return _get_legacy_global(name)
  File "/usr/lib64/python2.7/site-packages/portage/_legacy_globals.py", line 34, in _get_legacy_global
    portage.db = portage.create_trees(**kwargs)
  File "/usr/lib64/python2.7/site-packages/portage/__init__.py", line 495, in create_trees
    config_incrementals=portage.const.INCREMENTALS, _eprefix=eprefix)
  File "/usr/lib64/python2.7/site-packages/portage/proxy/objectproxy.py", line 30, in __call__
    result = object.__getattribute__(self, '_get_target')()
  File "/usr/lib64/python2.7/site-packages/portage/proxy/lazyimport.py", line 129, in _get_target
    __import__(name)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 15, in <module>
    from _emerge.Package import Package
  File "/usr/lib64/python2.7/site-packages/_emerge/Package.py", line 15, in <module>
    from _emerge.Task import Task
  File "/usr/lib64/python2.7/site-packages/_emerge/Task.py", line 4, in <module>
    from _emerge.SlotObject import SlotObject
ImportError: No module named SlotObject
Traceback (most recent call last):
  File "/usr/bin/portageq", line 820, in <module>
    main()
  File "/usr/bin/portageq", line 800, in main
    args[0] = portage.settings["ROOT"]
  File "/usr/lib64/python2.7/site-packages/portage/proxy/objectproxy.py", line 37, in __getitem__
    return object.__getattribute__(self, '_get_target')()[key]
  File "/usr/lib64/python2.7/site-packages/portage/__init__.py", line 608, in _get_target
    return _get_legacy_global(name)
  File "/usr/lib64/python2.7/site-packages/portage/_legacy_globals.py", line 34, in _get_legacy_global
    portage.db = portage.create_trees(**kwargs)
  File "/usr/lib64/python2.7/site-packages/portage/__init__.py", line 495, in create_trees
    config_incrementals=portage.const.INCREMENTALS, _eprefix=eprefix)
  File "/usr/lib64/python2.7/site-packages/portage/proxy/objectproxy.py", line 30, in __call__
    result = object.__getattribute__(self, '_get_target')()
  File "/usr/lib64/python2.7/site-packages/portage/proxy/lazyimport.py", line 129, in _get_target
    __import__(name)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 15, in <module>
    from _emerge.Package import Package
  File "/usr/lib64/python2.7/site-packages/_emerge/Package.py", line 15, in <module>
    from _emerge.Task import Task
  File "/usr/lib64/python2.7/site-packages/_emerge/Task.py", line 4, in <module>
    from _emerge.SlotObject import SlotObject
ImportError: No module named SlotObject
 * Python 2 and Python 3 not installed

eselect python list :

Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.3

Anyone know how to fix? I'd hate to have to wipe. :S

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Thanks for the messages. I did what sputnik suggested.

 

I also downloaded a stage3 tarball image and replaced /usr/lib/portage/{bin,pym} with what was in the tarball.

 

I'm getting this error now. I think it's getting there. :)

FuntooBox portage # emerge --sync
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/steam/metadata/layout.conf'
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/pro-audio/metadata/layout.conf'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'dev-java/ibm-jdk-bin:1.5'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'www-plugins/chrome-binary-plugins:unstable'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'www-client/google-chrome:beta'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'www-client/google-chrome:stable'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'www-client/google-chrome:unstable'
--- Invalid atom in /usr/portage/profiles/package.mask/00-gentoo: Slot deps are not allowed in EAPI 0: 'dev-java/itext:5'
/usr/lib64/portage/pym/portage/package/ebuild/_config/MaskManager.py:50: UserWarning: Repository 'x-portage' is implicitly using 'portage-1' profile format in its profiles/package.mask, but the repository profiles are not marked as that format.  This will break in the future.  Please either convert the following paths to files, or add
profile-formats = portage-1
to the repositories layout.conf.

  % dict(repo_name=repo_config.name))
WARNING: One or more repositories have missing repo_name entries:

	/usr/portage/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


>>> Starting git pull...
remote: Counting objects: 79, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 79 (delta 65), reused 79 (delta 65)
Unpacking objects: 100% (79/79), done.
From git://github.com/funtoo/ports-2012
   1d8b3be..a780479  funtoo.org -> origin/funtoo.org
You are not currently on a branch. Please specify which
branch you want to merge with. See git-pull(1) for details.

    git pull <remote> <branch>

!!! git pull error in /usr/portage.

In any case, thanks for the help so far!

Link to comment
Share on other sites

  • 0

Thanks for your help everyone.

 

I ended up re-installing funtoo. I concluded that I must have done something else that first night I deleted portage in an attempt to fix it, and got lost in the depths of my mind when I went to sleep. 

 

I'm marking as solved because, as pointed out, had this only been a deleted /usr/portage/* , the following:

 

 

#tar xpf portage.tbz2 -C /

 

 

Should have fixed the problem, as it completely populated it again.

 

In any case, thanks for the support!

Link to comment
Share on other sites

×
×
  • Create New...