1 |
commit: 48aac66f8c73c63926868317f9a47d5582d5bbd5 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 27 23:27:34 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 27 23:27:34 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=48aac66f |
7 |
|
8 |
main: change "portdir" to "main_overlay" |
9 |
|
10 |
Since we no longer use portdir anywhere, rename it to main_overlay. |
11 |
Add some fallback logic though so we use PORTDIR when repos.conf does |
12 |
not exist at all. |
13 |
|
14 |
URL: https://bugs.gentoo.org/553260 |
15 |
|
16 |
main.c | 10 +++++----- |
17 |
1 file changed, 5 insertions(+), 5 deletions(-) |
18 |
|
19 |
diff --git a/main.c b/main.c |
20 |
index 9361b98..208f899 100644 |
21 |
--- a/main.c |
22 |
+++ b/main.c |
23 |
@@ -34,7 +34,7 @@ char pretend = 0; |
24 |
char reinitialize = 0; |
25 |
char reinitialize_metacache = 0; |
26 |
static char *portlogdir; |
27 |
-static char *portdir; |
28 |
+static char *main_overlay; |
29 |
static char *portarch; |
30 |
static char *portvdb; |
31 |
static char *portedb; |
32 |
@@ -447,7 +447,7 @@ static void read_one_repos_conf(const char *repos_conf) |
33 |
if (path) { |
34 |
void *ele = xarraypush_str(overlays, path); |
35 |
if (main_repo && !strcmp(repo, main_repo)) |
36 |
- portdir = ele; |
37 |
+ main_overlay = ele; |
38 |
} |
39 |
free(conf); |
40 |
} |
41 |
@@ -775,7 +775,7 @@ void initialize_portage_env(void) |
42 |
_Q_EVS(ISTR, FEATURES, features, "noman noinfo nodoc") |
43 |
_Q_EVS(STR, EPREFIX, eprefix, CONFIG_EPREFIX) |
44 |
_Q_EVS(STR, EMERGE_LOG_DIR, portlogdir, CONFIG_EPREFIX "var/log") |
45 |
- _Q_EVS(STR, PORTDIR, portdir, CONFIG_EPREFIX "usr/portage") |
46 |
+ _Q_EVS(STR, PORTDIR, main_overlay, CONFIG_EPREFIX "usr/portage") |
47 |
_Q_EVS(STR, PORTAGE_BINHOST, binhost, DEFAULT_PORTAGE_BINHOST) |
48 |
_Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, CONFIG_EPREFIX "var/tmp/portage/") |
49 |
_Q_EVS(STR, PKGDIR, pkgdir, CONFIG_EPREFIX "usr/portage/packages/") |
50 |
@@ -906,6 +906,8 @@ void initialize_portage_env(void) |
51 |
} |
52 |
|
53 |
read_repos_conf(configroot, CONFIG_EPREFIX "etc/portage/repos.conf"); |
54 |
+ if (array_cnt(overlays) == 0) |
55 |
+ xarraypush_str(overlays, main_overlay); |
56 |
|
57 |
if (getenv("PORTAGE_QUIET") != NULL) |
58 |
quiet = 1; |
59 |
@@ -1061,8 +1063,6 @@ ret: |
60 |
close(overlay_fd); |
61 |
return cache_file; |
62 |
} |
63 |
-#define initialize_ebuild_flat() initialize_flat(portdir, CACHE_EBUILD, false) |
64 |
-#define initialize_metadata_flat() initialize_flat(portdir, CACHE_METADATA, false) |
65 |
|
66 |
void reinitialize_as_needed(void) |
67 |
{ |