previous commit was too optimistic, pass on the required variables onto the new functions
authorFabian Groffen <grobian@gentoo.org>
Wed, 11 Nov 2009 21:11:51 +0000 (21:11 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 11 Nov 2009 21:11:51 +0000 (21:11 -0000)
svn path=/main/branches/prefix/; revision=14813

pym/portage/__init__.py

index 3816c8a8064ff17efc66c965017857ce4626f1e4..2949b3a7b00ab05234b1ebd7ba9879cc8e2b7c0a 100644 (file)
@@ -1037,10 +1037,15 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
                env.update(myconfig)
        
        if EPREFIX == '':
-               dolinkingstuff()
-       writeshellprofile()
+               sleep_for_mtime_granularity = dolinkingstuff(
+                               target_root, specials, prelink_capable,
+                               makelinks, contents)
+       else:
+               sleep_for_mtime_granularity = False
+       writeshellprofile(target_root, env, sleep_for_mtime_granularity)
 
-def dolinkingstuff():
+def dolinkingstuff(target_root, specials, prelink_capable, makelinks,
+               contents):
        # updating this stuff will never work in an offset, other than ROOT
        # (e.g. not in Prefix), hence the EPREFIX is not taken into account
        # here since this code should never be triggered on an offset install
@@ -1184,7 +1189,9 @@ def dolinkingstuff():
 
        del specials["LDPATH"]
 
-def writeshellprofile():
+       return sleep_for_mtime_granularity
+
+def writeshellprofile(target_root, env, sleep_for_mtime_granularity):
        penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
        penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
        cenvnotice  = penvnotice[:]