summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-09 10:56:36 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-09 10:56:36 +0000
commitb06204abfb4e44dc52ded623593654c437d0f45f (patch)
tree24bf2c55b0b3341e1ec5a5864ae767e7ab55b8c1 /pym
parentfde31808d9bb600102d57f42883b73f21e4b0392 (diff)
downloadportage-b06204abfb4e44dc52ded623593654c437d0f45f.tar.gz
portage-b06204abfb4e44dc52ded623593654c437d0f45f.tar.bz2
portage-b06204abfb4e44dc52ded623593654c437d0f45f.zip
For bug #181387, fix an UnboundLocalError for the mymtime variable that is triggered by confmem. (trunk r6778)
svn path=/main/branches/2.1.2/; revision=6779
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index f8b769921..3ace88c92 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7677,13 +7677,15 @@ class dblink:
# handy variables; mydest is the target object on the live filesystems;
# mysrc is the source object in the temporary install dir
try:
- mydmode = os.lstat(mydest).st_mode
+ mydstat = os.lstat(mydest)
+ mydmode = mydstat.st_mode
except OSError, e:
if e.errno != errno.ENOENT:
raise
del e
#dest file doesn't exist
- mydmode=None
+ mydstat = None
+ mydmode = None
if stat.S_ISLNK(mymode):
# we are merging a symbolic link
@@ -7803,6 +7805,7 @@ class dblink:
mydestdir=os.path.dirname(mydest)
moveme=1
zing="!!!"
+ mymtime = None
if mydmode!=None:
# destination file exists
if stat.S_ISDIR(mydmode):
@@ -7826,9 +7829,11 @@ class dblink:
""" An identical update has previously been
merged. Skip it unless the user has chosen
--noconfmem."""
- zing = "-o-"
moveme = cfgfiledict["IGNORE"]
cfgprot = cfgfiledict["IGNORE"]
+ if not moveme:
+ zing = "-o-"
+ mymtime = long(mydstat.st_mtime)
else:
moveme = 1
cfgprot = 1