Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473710 - sys-apps/portage-2.1.12.5: traceback with "AttributeError: mtimedb" with non-default ROOT (ROOT!="/")
Summary: sys-apps/portage-2.1.12.5: traceback with "AttributeError: mtimedb" with non-...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 472632
  Show dependency tree
 
Reported: 2013-06-18 14:34 UTC by Andrey Hippo
Modified: 2013-06-18 21:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Hippo 2013-06-18 14:34:53 UTC
git bisect result:
7cc7bf61103044501a89509ae1ade77b6035a272 is the first bad commit
commit 7cc7bf61103044501a89509ae1ade77b6035a272
Author: Zac Medico <zmedico@gentoo.org>
Date:   Sat Jun 15 16:33:36 2013 -0700

    run_action: use emerge_config attrs, not locals

:040000 040000 eade937b26a15452890db5a46c2461a5b8d5e769 e3a9486b0ab11445e85ac41acc5393439a454ce2 M      pym


I'm not the portage/python expert at all, so the following fix may be quiet stupid.
But in case it helps, simple mtimedb initialization to None seems to solve/mask the problem:
diff --git a/pym/_emerge/RootConfig.py b/pym/_emerge/RootConfig.py
index 1348570..5f05ce3 100644
--- a/pym/_emerge/RootConfig.py
+++ b/pym/_emerge/RootConfig.py
@@ -21,6 +21,7 @@ class RootConfig(object):
                self.settings = settings
                self.root = self.settings['EROOT']
                self.setconfig = setconfig
+               self.mtimedb = None
                if setconfig is None:
                        self.sets = {}
                else:

Reproducible: Always

Steps to Reproduce:
1. EMERGE_DEFAULT_OPTS="" emerge --root="/myroot" logrotate # actually, any package
Actual Results:  
Traceback (most recent call last):
  File "/checkouts/portage/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/checkouts/portage/pym/_emerge/main.py", line 1060, in emerge_main
    return run_action(emerge_config)
  File "/checkouts/portage/pym/_emerge/actions.py", line 3975, in run_action
    emerge_config.args, spinner)
  File "/checkouts/portage/pym/_emerge/actions.py", line 446, in action_build
    graph_config=mydepgraph.schedulerGraph())
  File "/checkouts/portage/pym/_emerge/depgraph.py", line 5806, in schedulerGraph
    self.break_refs()
  File "/checkouts/portage/pym/_emerge/depgraph.py", line 5821, in break_refs
    root_config.root]["root_config"])
  File "/checkouts/portage/pym/_emerge/RootConfig.py", line 34, in update
    setattr(self, k, getattr(other, k))
AttributeError: mtimedb

Expected Results:  
Successful emerge.
Comment 1 Zac Medico gentoo-dev 2013-06-18 15:06:27 UTC
Thanks, this is fixed in git:

  http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=488a1881e51c7cec15e4d07d0e00fc1d543e543a

I'm leaving the attribute unset since having a None attribute there is currently useless.
Comment 2 Andrey Hippo 2013-06-18 15:19:50 UTC
I've tried your fix and it seems to work fine now.
Thank you for a very quick response!
Comment 3 Zac Medico gentoo-dev 2013-06-18 21:49:20 UTC
This is fixed in 2.1.12.6 and 2.2.0_alpha181.