Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: pym/portage/getbinpkg.py

Issue 6458015: Add support for grabbing Packages files using external programs. (Closed) Base URL: http://git.chromium.org/git/portage_tool.git@cros-2.1.9
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pym/portage/dbapi/bintree.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/portage/getbinpkg.py
diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py
index f85b65c00a5303b103e1ac516fb7c263d6b4d853..43a6bf5f78e15fc00b642924fd44ea4a804e7673 100644
--- a/pym/portage/getbinpkg.py
+++ b/pym/portage/getbinpkg.py
@@ -431,17 +431,19 @@ def file_get_metadata(baseurl,conn=None, chunk_size=3000):
return myid
-def file_get(baseurl,dest,conn=None,fcmd=None):
+def file_get(baseurl,dest,conn=None,fcmd=None,filename=None):
"""(baseurl,dest,fcmd=) -- Takes a base url to connect to and read from.
URI should be in the form <proto>://[user[:pass]@]<site>[:port]<path>"""
if not fcmd:
return file_get_lib(baseurl,dest,conn)
+ if not filename:
+ filename = os.path.basename(baseurl)
variables = {
"DISTDIR": dest,
"URI": baseurl,
- "FILE": os.path.basename(baseurl)
+ "FILE": filename
}
from portage.util import varexpand
« no previous file with comments | « pym/portage/dbapi/bintree.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698