From: Zac Medico Date: Thu, 21 Jun 2007 05:05:50 +0000 (-0000) Subject: Pretty up the repoman imports, use cPickle over pickle for performance (trunk r6431) X-Git-Tag: v2.1.3~197 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=19f6ba3fe24acb38602bbddd957ac51b196f567d;p=portage.git Pretty up the repoman imports, use cPickle over pickle for performance (trunk r6431) svn path=/main/branches/2.1.2/; revision=6900 --- diff --git a/bin/repoman b/bin/repoman index cbc823458..f5ef34dca 100755 --- a/bin/repoman +++ b/bin/repoman @@ -7,9 +7,21 @@ # Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems) # that last one is tricky because multiple profiles need to be checked. -import errno, os, shutil, sys +import errno +import os +import sys +import signal +import re +import tempfile + +try: + import cPickle as pickle +except ImportError: + import pickle + if not hasattr(__builtins__, "set"): from sets import Set as set + exename=os.path.basename(sys.argv[0]) version="1.2" @@ -20,8 +32,6 @@ map(allowed_filename_chars_set.setdefault, map(chr, range(ord('A'), ord('Z')+1)) map(allowed_filename_chars_set.setdefault, map(chr, range(ord('0'), ord('9')+1))) map(allowed_filename_chars_set.setdefault, map(chr, map(ord, [".", "-", "_", "+", ":"]))) -import signal,re,pickle,tempfile - os.environ["PORTAGE_LEGACY_GLOBALS"] = "false" try: import portage