diff options
author | 2010-08-02 16:05:45 +0200 | |
---|---|---|
committer | 2010-08-02 16:05:45 +0200 | |
commit | 2d43fe0d528c4f7bd60016271d4c7597f397d6c0 (patch) | |
tree | 42ac907cb25c60bd2b201859501232ccb70ee88c | |
parent | Performance enhancments (diff) | |
download | g-cran-2d43fe0d528c4f7bd60016271d4c7597f397d6c0.tar.gz g-cran-2d43fe0d528c4f7bd60016271d4c7597f397d6c0.tar.bz2 g-cran-2d43fe0d528c4f7bd60016271d4c7597f397d6c0.zip |
One more performance update
-rw-r--r-- | g_common/g_common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g_common/g_common.py b/g_common/g_common.py index 31057e5..648daa4 100644 --- a/g_common/g_common.py +++ b/g_common/g_common.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import getopt, sys, os, string, urllib, re, subprocess +import getopt, sys, os import settings #__doc__="Usage: "+sys.argv[0]+" <local repository directory> <action> [<action arguments>...]" @@ -78,6 +78,7 @@ def list_packages(repo_location): #generate a tree of ebuilds... note that we only link ebuild files, instead of generating them #we will, however, generate metadata.xml and Manifest files def generate_tree(repo_location,generate_manifest,generate_metadata): + import hashlib, subprocess repo_conf=read_repo_config(repo_location) driver_conf=read_driver_config(repo_conf['driver']) @@ -85,7 +86,6 @@ def generate_tree(repo_location,generate_manifest,generate_metadata): raise NotImplementedError ebuild_file=settings.COMMON_EBUILD_FILE #get from settings - import hashlib ebuild_digest=hashlib.sha1(open(ebuild_file).read()).hexdigest() Manifest="EBUILD %s "+str(os.path.getsize(ebuild_file))+" SHA1 "+ebuild_digest |