projects
/
archive
/
20170607
/
tools
/
tic-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[TIC-CORE] support caching for analysis data
[archive/20170607/tools/tic-core.git]
/
tic
/
repo.py
diff --git
a/tic/repo.py
b/tic/repo.py
index
82c5de7
..
b4d499f
100644
(file)
--- a/
tic/repo.py
+++ b/
tic/repo.py
@@
-83,7
+83,8
@@
def get_repodata_from_repos(repos, cachedir):
repomd_file = os.path.join(temp_dir, 'repomd.xml')
file.make_dirs(temp_dir);
repomd_file = os.path.join(temp_dir, 'repomd.xml')
file.make_dirs(temp_dir);
- #TODO: support proxy
+ #TODO: support local files(local directory)
+ # local/remote repository
url = os.path.join(baseurl, 'repodata/repomd.xml')
repomd = myurlgrab2(url, repomd_file)
url = os.path.join(baseurl, 'repodata/repomd.xml')
repomd = myurlgrab2(url, repomd_file)
@@
-91,10
+92,10
@@
def get_repodata_from_repos(repos, cachedir):
tree = etree.parse(repomd)
root = tree.getroot()
except etree.XMLSyntaxError:
tree = etree.parse(repomd)
root = tree.getroot()
except etree.XMLSyntaxError:
- raise TICError("
repomd.xml syntax error."
)
+ raise TICError("
Unable to parse repomd.xml. Please check the repomd from repository url(%s)", url
)
# make cache_dir
# make cache_dir
- repo_checksum = hashlib.sha256(open(repomd_file, 'rb').read()).hexdigest()
;
+ repo_checksum = hashlib.sha256(open(repomd_file, 'rb').read()).hexdigest()
cache_dir = os.path.join(cachedir, 'cached', base64url, repo_checksum)
file.make_dirs(cache_dir)
cache_dir = os.path.join(cachedir, 'cached', base64url, repo_checksum)
file.make_dirs(cache_dir)