From f77b88322de47cb45c844b0b0008d30fc2d96da5 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Wed, 21 Oct 2009 15:03:09 -0400 Subject: [PATCH] Don't unpack dist-eggs --- lib/galaxy/eggs/__init__.py | 5 +++-- scripts/dist-scramble.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/eggs/__init__.py b/lib/galaxy/eggs/__init__.py index 3033aa297f5..2b4363f1664 100644 --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -112,7 +112,7 @@ class Egg( object ): unpack_zipfile( self.path, self.path + "-tmp" ) os.remove( self.path ) os.rename( self.path + "-tmp", self.path ) - def scramble( self ): + def scramble( self, dist=False ): if self.path is None: self.find() if os.access( self.path, os.F_OK ): @@ -148,7 +148,8 @@ class Egg( object ): shutil.copyfile( new_egg, self.path ) log.warning( "scramble(): Copied egg to:" ) log.warning( " %s" % self.path ) - self.unpack_if_needed() + if not dist: + self.unpack_if_needed() for doppelganger in self.doppelgangers: remove_file_or_path( doppelganger ) log.warning( "Removed conflicting egg: %s" % doppelganger ) diff --git a/scripts/dist-scramble.py b/scripts/dist-scramble.py index 58bb9365b61..87b57392e94 100644 --- a/scripts/dist-scramble.py +++ b/scripts/dist-scramble.py @@ -31,7 +31,7 @@ if egg_list is None: sys.exit( 1 ) failed = [] for egg in egg_list: - if not egg.scramble(): + if not egg.scramble( dist=True ): failed.append( egg.platform['galaxy'] ) if len( failed ): print ""