Synchronize self-reinstallation logic so that emerge will always
authorZac Medico <zmedico@gentoo.org>
Sun, 2 Dec 2007 09:10:56 +0000 (09:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Dec 2007 09:10:56 +0000 (09:10 -0000)
restart itself when dblink.merge() creates temporary copies of
PORTAGE_{BIN,PYM}_PATH.

svn path=/main/trunk/; revision=8803

pym/_emerge/__init__.py
pym/portage/dbapi/vartree.py

index 0d35875f37fe53a451c70a07c65342a72957158e..559a0c68562e7110d3387776cb350c8e80bf20f9 100644 (file)
@@ -4482,11 +4482,7 @@ class MergeTask(object):
                                        # Figure out if we need a restart.
                                        mysplit=portage.pkgsplit(x[2])
                                        if mysplit[0] == "sys-apps/portage" and x[1] == "/":
-                                               myver=mysplit[1]+"-"+mysplit[2]
-                                               if myver[-3:]=='-r0':
-                                                       myver=myver[:-3]
-                                               if (myver != portage.VERSION) and \
-                                                  "livecvsportage" not in self.settings.features:
+                                               if "livecvsportage" not in self.settings.features:
                                                        if len(mymergelist) > mergecount:
                                                                emergelog(xterm_titles,
                                                                        " ::: completed emerge ("+ \
index 874a0e501cc1165c095d4c737f59e5142e24a6cf..cc34a133ab30e61b2b5e0b4ff6564b1523bb261d 100644 (file)
@@ -2365,7 +2365,8 @@ class dblink(object):
                """
                if self.myroot == "/" and \
                        "sys-apps" == self.cat and \
-                       "portage" == pkgsplit(self.pkg)[0]:
+                       "portage" == pkgsplit(self.pkg)[0] and \
+                       "livecvsportage" not in self.settings.features:
                        settings = self.settings
                        base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"])
                        from tempfile import mkdtemp