Gentoo Archives: gentoo-commits

From: Arfrever Frehtes Taifersar Arahesis <arfrever@××××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: /, pym/portage/repository/, pym/portage/
Date: Wed, 05 Feb 2014 16:28:55
Message-Id: 1391617518.9e9c3d38f42b6ed7a76419d9cad4e26939768b49.arfrever@gentoo
1 commit: 9e9c3d38f42b6ed7a76419d9cad4e26939768b49
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Wed Feb 5 16:25:18 2014 +0000
4 Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
5 CommitDate: Wed Feb 5 16:25:18 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9e9c3d38
7
8 Check presence of .portage_not_installed file instead of .git directory
9 to allow using local files also when using Portage from unpacked tarball.
10
11 ---
12 .portage_not_installed | 0
13 mkrelease.sh | 2 +-
14 pym/portage/__init__.py | 2 +-
15 pym/portage/repository/config.py | 2 +-
16 4 files changed, 3 insertions(+), 3 deletions(-)
17
18 diff --git a/.portage_not_installed b/.portage_not_installed
19 new file mode 100644
20 index 0000000..e69de29
21
22 diff --git a/mkrelease.sh b/mkrelease.sh
23 index 334b4fb..94e90f7 100755
24 --- a/mkrelease.sh
25 +++ b/mkrelease.sh
26 @@ -80,7 +80,7 @@ git archive --format=tar ${TREE_ISH} | \
27
28 echo ">>> Building release tree"
29 cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,misc,pym} "${RELEASE_DIR}/" || die "directory copy failed"
30 -cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,Makefile,NEWS,README,RELEASE-NOTES,TEST-NOTES} \
31 +cp "${SOURCE_DIR}/"{.portage_not_installed,DEVELOPING,LICENSE,Makefile,NEWS,README,RELEASE-NOTES,TEST-NOTES} \
32 "${RELEASE_DIR}/" || die "file copy failed"
33
34 if [[ ${RUNTESTS} == "true" ]] ; then
35
36 diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
37 index a643c7f..fdbc4a8 100644
38 --- a/pym/portage/__init__.py
39 +++ b/pym/portage/__init__.py
40 @@ -368,7 +368,7 @@ except (ImportError, OSError) as e:
41 _python_interpreter = os.path.realpath(sys.executable)
42 _bin_path = PORTAGE_BIN_PATH
43 _pym_path = PORTAGE_PYM_PATH
44 -_working_copy = VERSION == "HEAD"
45 +_not_installed = os.path.isfile(os.path.join(PORTAGE_BASE_PATH, ".portage_not_installed"))
46
47 # Api consumers included in portage should set this to True.
48 _internal_caller = False
49
50 diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
51 index c931c86..e0d3173 100644
52 --- a/pym/portage/repository/config.py
53 +++ b/pym/portage/repository/config.py
54 @@ -960,7 +960,7 @@ def load_repository_config(settings, extra_files=None):
55 if "PORTAGE_REPOSITORIES" in settings:
56 repoconfigpaths.append(io.StringIO(settings["PORTAGE_REPOSITORIES"]))
57 else:
58 - if portage._working_copy:
59 + if portage._not_installed:
60 repoconfigpaths.append(os.path.join(PORTAGE_BASE_PATH, "cnf", "repos.conf"))
61 else:
62 repoconfigpaths.append(os.path.join(settings.global_config_path, "repos.conf"))