summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-10 18:39:42 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-10 18:46:23 -0700
commit722000c545d7c23764382685d70819e42c11ead8 (patch)
tree2d5c1ce34929ccbfac1091949cc6c8b22477e268 /pym/portage
parent7aac6b6be6092ceb7f778534efd95c7f6a35a55c (diff)
downloadportage-722000c545d7c23764382685d70819e42c11ead8.tar.gz
portage-722000c545d7c23764382685d70819e42c11ead8.tar.bz2
portage-722000c545d7c23764382685d70819e42c11ead8.zip
Remove pkg_nofetch code from the fetch() function since it's currently broken (doebuild_environment raises TypeError due to missing mydbapi parameter) and this is a poor place to spawn pkg_nofetch anyway, especially given that the caller does not even pass in a portdbapi instance. For now, relocate the pkg_nofetch execution to EbuildBuild so that it works for emerge. TODO: Add pkg_nofetch support to fetch() callers where appropriate.
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/package/ebuild/fetch.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index d5ad7f827..2c7f00703 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -1054,55 +1054,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
(mysettings["CATEGORY"], mysettings["PF"])
writemsg_level(msg,
level=logging.ERROR, noiselevel=-1)
- have_builddir = "PORTAGE_BUILDDIR" in mysettings and \
- os.path.isdir(mysettings["PORTAGE_BUILDDIR"])
-
- global_tmpdir = mysettings["PORTAGE_TMPDIR"]
- private_tmpdir = None
- if not parallel_fetchonly and not have_builddir:
- # When called by digestgen(), it's normal that
- # PORTAGE_BUILDDIR doesn't exist. It's helpful
- # to show the pkg_nofetch output though, so go
- # ahead and create a temporary PORTAGE_BUILDDIR.
- # Use a temporary config instance to avoid altering
- # the state of the one that's been passed in.
- mysettings = config(clone=mysettings)
- try:
- private_tmpdir = tempfile.mkdtemp("", "._portage_fetch_.",
- global_tmpdir)
- except OSError as e:
- if e.errno != PermissionDenied.errno:
- raise
- raise PermissionDenied(global_tmpdir)
- mysettings["PORTAGE_TMPDIR"] = private_tmpdir
- mysettings.backup_changes("PORTAGE_TMPDIR")
- debug = mysettings.get("PORTAGE_DEBUG") == "1"
- doebuild_environment(mysettings["EBUILD"], "fetch",
- mysettings["ROOT"], mysettings, debug, 1, None)
- prepare_build_dirs(mysettings["ROOT"], mysettings, 0)
- have_builddir = True
-
- if not parallel_fetchonly and have_builddir:
- # To spawn pkg_nofetch requires PORTAGE_BUILDDIR for
- # ensuring sane $PWD (bug #239560) and storing elog
- # messages. Therefore, calling code needs to ensure that
- # PORTAGE_BUILDDIR is already clean and locked here.
-
- # All the pkg_nofetch goes to stderr since it's considered
- # to be an error message.
- fd_pipes = {
- 0 : sys.stdin.fileno(),
- 1 : sys.stderr.fileno(),
- 2 : sys.stderr.fileno(),
- }
-
- try:
- _doebuild_spawn("nofetch", mysettings, fd_pipes=fd_pipes)
- finally:
- if private_tmpdir is not None:
- shutil.rmtree(private_tmpdir)
- private_tmpdir = None
-
elif restrict_fetch:
pass
elif listonly: