Jump to content
funtoo forums
  • 0
jhan

maximum recursion depth exceeded after switch to kits

Question

Hi,

 

I switched over to kit according to the instructions on https://github.com/funtoo/meta-repoand it worked for a few days. But now I always get following error when using emerge:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.5/site-packages/_emerge/main.py", line 1196, in emerge_main
    action=myaction, args=myfiles, opts=myopts)
  File "/usr/lib64/python3.5/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 2403, in load_emerge_config
    **kwargs)
  File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 585, in create_trees
    env=env, eprefix=eprefix)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/config.py", line 566, in __init__
    locations_manager.load_profiles(self.repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 125, in load_profiles
    repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
...
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 227, in _addProfile
    parents = grabfile(parentsFile)
  File "/usr/lib64/python3.5/site-packages/portage/util/__init__.py", line 131, in grabfile
    mylines = grablines(myfilename, recursive, remember_source_file=True)
  File "/usr/lib64/python3.5/site-packages/portage/util/__init__.py", line 567, in grablines
    mylines = myfile.readlines()
RecursionError: maximum recursion depth exceeded while calling a Python object

I sadly can't remember what caused the problem and any attempts to solve it did not work.

 

If I remove the symlink for repos.conf and rename repos.conf.bak back to repos.conf it seems to work again but without kits.

 

It might be just a slight config problem but at the moment I am out of ideas. Any help on this would be greatly appreciated.

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

OK, I finally found the cause of this problem.

 

After all config files seemed to be fine I completely started over with kits, including removing /var/git and reinstalling it. That did it.

 

It seems that the git tree somehow got corrupted, which led to the recursion.

Share this post


Link to post
Share on other sites
  • 0

Sadly I can't remember what got me into this same state.  Python 3.4 instead of 3.5, but other then that, same identical error.  Decided to follow the same course and removed /var/git and reinstalled kits(https://github.com/funtoo/meta-repo) as linked from http://forums.funtoo.org/topic/1193-eix-and-kits/.  Among the commands having the error epro. After the reinstall:

> epro show

=== Enabled Profiles: ===

        arch: (not set)
       build: (not set)
     subarch: (not set)
      flavor: (not set)
     mix-ins: (not set)


=== Python kit: ===

      branch: 3.4-prime

WARNING: No arch defined. Please set a arch.
WARNING: No build defined. Please set a build.
WARNING: No flavor defined. Please set a flavor.

At least I got output, and not the recursion error. So started to set profile:

> epro arch pure64

=== Enabled Profiles: ===

        arch: pure64
       build: (not set)
     subarch: (not set)
      flavor: (not set)
     mix-ins: (not set)

>>> Set arch to pure64.
WARNING: No build defined. Please set a build.
WARNING: No flavor defined. Please set a flavor.

As the man was heard to say after jumping of the roof, as he was passing a lower floor of the building, "So far so good".

> epro build current
Traceback (most recent call last):
  File "/usr/sbin/epro", line 9, in <module>
    portdir = portage.settings.repositories.mainRepoLocation()
  File "/usr/lib64/python3.4/site-packages/portage/proxy/objectproxy.py", line 22, in __getattribute__
    result = object.__getattribute__(self, '_get_target')()
  File "/usr/lib64/python3.4/site-packages/portage/__init__.py", line 695, in _get_target
    return _get_legacy_global(name)
  File "/usr/lib64/python3.4/site-packages/portage/_legacy_globals.py", line 35, in _get_legacy_global
    portage.db = portage.create_trees(**kwargs)
  File "/usr/lib64/python3.4/site-packages/portage/__init__.py", line 585, in create_trees
    env=env, eprefix=eprefix)
  File "/usr/lib64/python3.4/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 566, in __init__
    locations_manager.load_profiles(self.repositories, known_repos)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 125, in load_profiles
    repositories, known_repos)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)

...


  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 249, in _addProfile
    self._addProfile(parentPath, repositories, known_repos)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 227, in _addProfile
    parents = grabfile(parentsFile)
  File "/usr/lib64/python3.4/site-packages/portage/util/__init__.py", line 131, in grabfile
    mylines = grablines(myfilename, recursive, remember_source_file=True)
  File "/usr/lib64/python3.4/site-packages/portage/util/__init__.py", line 567, in grablines
    mylines = myfile.readlines()
RuntimeError: maximum recursion depth exceeded while calling a Python object

Back to where I started. Not sure where to go next.  Still looking, but if anyone has any suggestions, I'd like to hear them.  Must be missing something.  So far my system is still running, just can't do any updates.  emerge, same errors but with python2.7.

 

Thanks in advance,

 

Jim

Share this post


Link to post
Share on other sites
  • 0

How does your parent file (/etc/portage/make.profile/parent) look like? What does your /etc/portage look like?

 

I sometimes got this problem as well when I messed with those. 

Share this post


Link to post
Share on other sites
  • 0

/etc/portage/make.profile/parent looks strange, at least to me:

core-kit:funtoo/1.0/linux-gnu/arch/pure64
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime

19 identical lines?  I'm guessing at a minimum the %s of each line should have been substituted with something else.  Need to find what created this file.

Share this post


Link to post
Share on other sites
  • 0

/etc/portage/make.profile/parent looks strange, at least to me:

core-kit:funtoo/1.0/linux-gnu/arch/pure64
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
%s:funtoo/kits/python-kit/3.4-prime
19 identical lines?  I'm guessing at a minimum the %s of each line should have been substituted with something else.  Need to find what created this file.

 

That is a problem, this is my parent file:

core-kit:funtoo/1.0/linux-gnu/arch/pure64
core-kit:funtoo/1.0/linux-gnu/build/current
core-kit:funtoo/1.0/linux-gnu/arch/pure64/subarch/native_64-pure64
core-kit:funtoo/1.0/linux-gnu/flavor/desktop
core-kit:funtoo/1.0/linux-gnu/mix-ins/lxde
php-kit:funtoo/kits/python-kit/3.4-prime
media-kit:funtoo/kits/python-kit/3.4-prime
games-kit:funtoo/kits/python-kit/3.4-prime
text-kit:funtoo/kits/python-kit/3.4-prime
perl-kit:funtoo/kits/python-kit/3.4-prime
desktop-kit:funtoo/kits/python-kit/3.4-prime
editors-kit:funtoo/kits/python-kit/3.4-prime
core-hw-kit:funtoo/kits/python-kit/3.4-prime
gnome-kit:funtoo/kits/python-kit/3.4-prime
security-kit:funtoo/kits/python-kit/3.4-prime
dev-kit:funtoo/kits/python-kit/3.4-prime
core-kit:funtoo/kits/python-kit/3.4-prime
xorg-kit:funtoo/kits/python-kit/3.4-prime
net-kit:funtoo/kits/python-kit/3.4-prime
science-kit:funtoo/kits/python-kit/3.4-prime
kde-kit:funtoo/kits/python-kit/3.4-prime
nokit:funtoo/kits/python-kit/3.4-prime
python-kit:funtoo/kits/python-kit/3.4-prime
java-kit:funtoo/kits/python-kit/3.4-prime

Share this post


Link to post
Share on other sites
  • 0

That parent file looks more like a sed or vi command than the parent file.  My guess would be that it got scrambled in the process.

 

If you haven't got the "pre"kit version lying around somewhere, I think you can delete that one and create a new one with touch and then add content via epro again.

Share this post


Link to post
Share on other sites
  • 0

a weird looking parent is due to "epro update" tried to run when using older ego version, such if it is not updated yer but epro update tried to run. to fix, remove those bogus entries manually, and then make sure you updated ego, then run epro update.

Share this post


Link to post
Share on other sites
  • 0

That is a problem, this is my parent file:

core-kit:funtoo/1.0/linux-gnu/arch/pure64
core-kit:funtoo/1.0/linux-gnu/build/current
core-kit:funtoo/1.0/linux-gnu/arch/pure64/subarch/native_64-pure64
core-kit:funtoo/1.0/linux-gnu/flavor/desktop
core-kit:funtoo/1.0/linux-gnu/mix-ins/lxde
php-kit:funtoo/kits/python-kit/3.4-prime
media-kit:funtoo/kits/python-kit/3.4-prime
...
python-kit:funtoo/kits/python-kit/3.4-prime
java-kit:funtoo/kits/python-kit/3.4-prime

 

Understand and agree.  If I hand edit parent, things look better. The problem is every time I set something with epro, those 19 lines get changed back to:

%s:funtoo/kits/python-kit/3.4-prime

Even changing parent by hand doesn't get me any farther as emerge has many dependency errors.  I'm not sure if there is just one thing causing these issues, or if their are multiple things that are incorrect.  Something I changed has caused this, just hope it wasn't something stupid. So far the system is still running(knock on wood).  I just can't update anything.

 

I have the space, and as I have spent way to much time already troubleshooting this, I'm going to rebuild from the most recent stage3.  If and when time allows I will revisit this, at least then I'll have something to compare it to.

 

It will take a while to set up and I need to run errands first, so If anyone has anything else to offer, I would be willing to try before rebuilding.  I hate not knowing what caused this(which I may never know) and it would be nice to fix so if someone in the future has the same issue, there would be a solution.

 

I want to thank all for your help.

Share this post


Link to post
Share on other sites
  • 0

please, give a clear steps how you getting those entries back.

the steps for you are:

remove bad entries manually, they start with %s

make sure you update to ego-1.1.3-r5

run epro update

you should not get any problems with parent after

Share this post


Link to post
Share on other sites
  • 0

Even changing parent by hand doesn't get me any farther as emerge has many dependency errors.  I'm not sure if there is just one thing causing these issues, or if their are multiple things that are incorrect.  Something I changed has caused this, just hope it wasn't something stupid. So far the system is still running(knock on wood).  I just can't update anything.

 

I also had trouble when modifying the parent file by hand. I also wasn't able to get a state where I could emerge something with kits enabled. The only thing that solved it was reverting back from kits and doing the switch again.

Share this post


Link to post
Share on other sites
  • 0

Sorry for the delay getting back to this, other obligations come first.

 

please, give a clear steps how you getting those entries back.

the steps for you are:

remove bad entries manually, they start with %s

make sure you update to ego-1.1.3-r5

run epro update

you should not get any problems with parent after

 

Not sure what steps got me to that point, but using the epro command to set the environment would cause the lines in the parent file to be reset to %s:...  Updating ego to 1.1.3-r5 and running 'epro update' cleared up this issue.  Checking command history showed that I hadn't run 'epro update' previously. I thought it was something I had done, but my command history says differently.

 

I also had trouble when modifying the parent file by hand. I also wasn't able to get a state where I could emerge something with kits enabled. The only thing that solved it was reverting back from kits and doing the switch again.

 

As epro appears to modify parent, directly or indirectly I surmise hand modifying parent was not the way to go.  But nothing is mentioned in either the ego or epro man pages about the parent file.  A web search didn't turn up much either.  The relationship is mentioned in Funtoo Profiles, but may need to be updated to reflect kits depending on how kits is to be addressed. The document does state "Typically, users don't need to modify this file, instead using ego and epro to make changes...", so it doesn't state that you can't or shouldn't modify it yourself.  Kits may change how this should be looked at.

 

My emerge issues, as mention earlier, most likely shouldn't be part of this discussion.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×