aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2005-10-30 00:48:51 +0000
committerNed Ludd <solar@gentoo.org>2005-10-30 00:48:51 +0000
commit8ed9da5e3942069c919a45818609af82627be937 (patch)
tree0687007f834376c4267191824f98fa77d712e8cb /qdepends.c
parent- fixing up dup handling (diff)
downloadportage-utils-8ed9da5e3942069c919a45818609af82627be937.tar.gz
portage-utils-8ed9da5e3942069c919a45818609af82627be937.tar.bz2
portage-utils-8ed9da5e3942069c919a45818609af82627be937.zip
- save and restore cwd when resolving virtuals
Diffstat (limited to 'qdepends.c')
-rw-r--r--qdepends.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/qdepends.c b/qdepends.c
index d62b2afe..a55ceaf3 100644
--- a/qdepends.c
+++ b/qdepends.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v 1.21 2005/10/29 09:31:49 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v 1.22 2005/10/30 00:48:51 solar Exp $
*
* Copyright 2005 Ned Ludd - <solar@gentoo.org>
* Copyright 2005 Mike Frysinger - <vapier@gentoo.org>
@@ -314,6 +314,14 @@ void _dep_flatten_tree(dep_node *root, char *buf, size_t *pos)
if (root->type == DEP_NULL) goto this_node_sucks;
if (root->type == DEP_NORM) {
size_t len = strlen(root->info);
+#if SPANKY
+ if (*root->info == 'v')
+ if (strncmp(root->info, "virtual/", 8) == 0) {
+ if (virtuals == NULL)
+ virtuals = resolve_virtuals();
+ IF_DEBUG(fprintf(stderr, "(%s->%s)", root->info, virtual(root->info, virtuals)));
+ }
+#endif
memcpy(buf + *pos, root->info, len);
*pos += len+1;
buf[*pos-1] = ' ';
@@ -343,10 +351,7 @@ int qdepends_main_vdb(const char *depend_file, int argc, char **argv) {
char buf[_POSIX_PATH_MAX];
char depend[8192], use[8192];
dep_node *dep_tree;
-#if 0
- virtuals = resolve_virtuals();
- print_sets(virtuals);
-#endif
+
if (chdir(portroot))
errp("could not chdir(%s) for ROOT", portroot);