public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14898 - main/trunk/pym/portage
@ 2009-11-27  2:22 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-11-27  2:22 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-11-27 02:22:08 +0000 (Fri, 27 Nov 2009)
New Revision: 14898

Modified:
   main/trunk/pym/portage/__init__.py
Log:
Fix logic from previous commit so it only applies when a 'newmtime' parameter
has not been specified (this is always the case when called by portage).


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2009-11-26 21:59:51 UTC (rev 14897)
+++ main/trunk/pym/portage/__init__.py	2009-11-27 02:22:08 UTC (rev 14898)
@@ -7565,13 +7565,15 @@
 	try:
 		if hardlinked:
 			newmtime = long(os.stat(dest).st_mtime)
-		elif not renamefailed:
-			newmtime = long(sstat.st_mtime)
 		else:
 			if newmtime is not None:
 				os.utime(dest, (newmtime, newmtime))
 			else:
-				os.utime(dest, (sstat.st_atime, sstat.st_mtime))
+				if renamefailed:
+					# If rename succeeded then this is not necessary, since
+					# rename automatically preserves timestamps with complete
+					# precision.
+					os.utime(dest, (sstat.st_atime, sstat.st_mtime))
 				newmtime = long(sstat.st_mtime)
 	except OSError:
 		# The utime can fail here with EPERM even though the move succeeded.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-27  2:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27  2:22 [gentoo-commits] portage r14898 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox