From 5c8febec7e8bfa300e22d5c42c055f71497bf2bb Mon Sep 17 00:00:00 2001 From: "Auke Booij (tulcod)" Date: Sun, 1 Aug 2010 23:55:00 +0200 Subject: Performance enhancments --- g_cran/cran_read.py | 3 ++- g_cran/g_cran.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/g_cran/cran_read.py b/g_cran/cran_read.py index c243a7f..1505806 100644 --- a/g_cran/cran_read.py +++ b/g_cran/cran_read.py @@ -1,4 +1,4 @@ -import re, os, tarfile, rfc822 +import re, os from ebuild import * from filetricks import * from settings import * @@ -194,6 +194,7 @@ def read_packages(package_filename,local_repository): #find a package in this repository... we really should cache this #into some sqlite database once def find_package(repo_location,package_name): + import rfc822 package_file=open(os.path.join(repo_location,REPO_MYDIR,'DESCRIPTION',package_name)) repository_file=open(os.path.join(repo_location,REPO_MYDIR,'remote_uri'),'r') diff --git a/g_cran/g_cran.py b/g_cran/g_cran.py index 545ef0d..1847d92 100644 --- a/g_cran/g_cran.py +++ b/g_cran/g_cran.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import getopt, sys, os, string, urllib, re, StringIO +import getopt, sys, os, string from ebuild import * import phases from cran_read import * @@ -10,6 +10,7 @@ __doc__="Usage: "+sys.argv[0]+" [