Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 332967

Summary: portage fails when moving files with the same name
Product: Gentoo/Alt Reporter: Alan Hourihane <alanh>
Component: Prefix SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: FreeMiNT   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335925    

Description Alan Hourihane 2010-08-16 09:24:33 UTC
When emerging binary packages I hit a problem as it's trying to move a file with the same name. This patch fixes the problem...

--- bad/pym/portage/dbapi/bintree.py	2010-04-30 08:52:37.000000000 +0000
+++ good/pym/portage/dbapi/bintree.py	2010-04-30 08:52:53.000000000 +0000
@@ -939,7 +939,8 @@
 			if filename is not None:
 				new_filename = self.getname(cpv)
 				self._ensure_dir(os.path.dirname(new_filename))
-				_movefile(filename, new_filename, mysettings=self.settings)
+				if filename != new_filename:
+					_movefile(filename, new_filename, mysettings=self.settings)
 			if self._all_directory and \
 				self.getname(cpv).split(os.path.sep)[-2] == "All":
 				self._create_symlink(cpv)
Comment 3 Zac Medico gentoo-dev 2010-08-23 06:30:13 UTC
This is in 2.2_rc68, but I'll leave this bug open until it's in an unmasked version.
Comment 4 Zac Medico gentoo-dev 2010-09-04 07:59:27 UTC
This is fixed in 2.1.9.