diff options
-rw-r--r-- | g_cran/cran_read.py | 3 | ||||
-rw-r--r-- | 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]+" <local repository directory> <action> [<action a #sync a local repository's PACKAGES file def action_sync(repo_location,remote_uri): + import StringIO, urllib if not os.path.isdir(os.path.join(repo_location, REPO_MYDIR)): os.mkdir(os.path.join(repo_location,REPO_MYDIR)) packages_filename=os.path.join(repo_location, REPO_MYDIR, 'PACKAGES') |