diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-11 12:18:03 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-11 12:18:03 -0700 |
commit | fcee99f30fccf3897e764ae41700efc77d7f3745 (patch) | |
tree | cc06ead37aabca88bcc9d1c098cb32e15a423200 | |
parent | d557504db4fb47cb7f1d027877ce9fc8dcfea320 (diff) | |
download | portage-fcee99f30fccf3897e764ae41700efc77d7f3745.tar.gz portage-fcee99f30fccf3897e764ae41700efc77d7f3745.tar.bz2 portage-fcee99f30fccf3897e764ae41700efc77d7f3745.zip |
Fix digestgen() to respect RESTRICT=fetch.
-rw-r--r-- | pym/portage/package/ebuild/digestgen.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/package/ebuild/digestgen.py index d5cb2b829..d6ac6fd70 100644 --- a/pym/portage/package/ebuild/digestgen.py +++ b/pym/portage/package/ebuild/digestgen.py @@ -108,6 +108,9 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None): for cpv in distfiles_map[myfile]: uris.update(myportdb.getFetchMap( cpv, mytree=mytree)[myfile]) + restrict_fetch = 'fetch' in \ + myportdb.aux_get(cpv, ['RESTRICT'], + mytree=mytree)[0].split() try: st = os.stat(os.path.join( @@ -115,7 +118,8 @@ def digestgen(myarchives=None, mysettings=None, myportdb=None): except OSError: st = None - if not fetch({myfile : uris}, mysettings): + if restrict_fetch or \ + not fetch({myfile : uris}, mysettings): myebuild = os.path.join(mysettings["O"], catsplit(cpv)[1] + ".ebuild") spawn_nofetch(myportdb, myebuild, |