From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C8F801384B4 for ; Sat, 28 Nov 2015 02:44:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0138121C09B; Sat, 28 Nov 2015 02:44:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2F8BD21C092 for ; Sat, 28 Nov 2015 02:44:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4F4C43406C0 for ; Sat, 28 Nov 2015 02:44:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8D845FE4 for ; Sat, 28 Nov 2015 02:44:35 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1448666854.48aac66f8c73c63926868317f9a47d5582d5bbd5.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 48aac66f8c73c63926868317f9a47d5582d5bbd5 X-VCS-Branch: master Date: Sat, 28 Nov 2015 02:44:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8ef2ae4e-9984-47af-a596-60c3fe4a4c3f X-Archives-Hash: 4e9a37e0a45bdf07b47498c6b19654f9 commit: 48aac66f8c73c63926868317f9a47d5582d5bbd5 Author: Mike Frysinger gentoo org> AuthorDate: Fri Nov 27 23:27:34 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Nov 27 23:27:34 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=48aac66f main: change "portdir" to "main_overlay" Since we no longer use portdir anywhere, rename it to main_overlay. Add some fallback logic though so we use PORTDIR when repos.conf does not exist at all. URL: https://bugs.gentoo.org/553260 main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 9361b98..208f899 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ char pretend = 0; char reinitialize = 0; char reinitialize_metacache = 0; static char *portlogdir; -static char *portdir; +static char *main_overlay; static char *portarch; static char *portvdb; static char *portedb; @@ -447,7 +447,7 @@ static void read_one_repos_conf(const char *repos_conf) if (path) { void *ele = xarraypush_str(overlays, path); if (main_repo && !strcmp(repo, main_repo)) - portdir = ele; + main_overlay = ele; } free(conf); } @@ -775,7 +775,7 @@ void initialize_portage_env(void) _Q_EVS(ISTR, FEATURES, features, "noman noinfo nodoc") _Q_EVS(STR, EPREFIX, eprefix, CONFIG_EPREFIX) _Q_EVS(STR, EMERGE_LOG_DIR, portlogdir, CONFIG_EPREFIX "var/log") - _Q_EVS(STR, PORTDIR, portdir, CONFIG_EPREFIX "usr/portage") + _Q_EVS(STR, PORTDIR, main_overlay, CONFIG_EPREFIX "usr/portage") _Q_EVS(STR, PORTAGE_BINHOST, binhost, DEFAULT_PORTAGE_BINHOST) _Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, CONFIG_EPREFIX "var/tmp/portage/") _Q_EVS(STR, PKGDIR, pkgdir, CONFIG_EPREFIX "usr/portage/packages/") @@ -906,6 +906,8 @@ void initialize_portage_env(void) } read_repos_conf(configroot, CONFIG_EPREFIX "etc/portage/repos.conf"); + if (array_cnt(overlays) == 0) + xarraypush_str(overlays, main_overlay); if (getenv("PORTAGE_QUIET") != NULL) quiet = 1; @@ -1061,8 +1063,6 @@ ret: close(overlay_fd); return cache_file; } -#define initialize_ebuild_flat() initialize_flat(portdir, CACHE_EBUILD, false) -#define initialize_metadata_flat() initialize_flat(portdir, CACHE_METADATA, false) void reinitialize_as_needed(void) {