aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2006-01-12 15:05:53 +0000
committerNed Ludd <solar@gentoo.org>2006-01-12 15:05:53 +0000
commit1e76da0f7471686b8587babb7d6b358429e9b694 (patch)
tree3f26c697fa834c1ba9b34e90c3c471d6098fcd79 /main.c
parenttest suite for atom_compare (diff)
downloadportage-utils-1e76da0f7471686b8587babb7d6b358429e9b694.tar.gz
portage-utils-1e76da0f7471686b8587babb7d6b358429e9b694.tar.bz2
portage-utils-1e76da0f7471686b8587babb7d6b358429e9b694.zip
- regen manpages, update depends, get rid of any compile warns and get ready to release a new portage-utilsv0.1.12
Diffstat (limited to 'main.c')
-rw-r--r--main.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/main.c b/main.c
index 9dc2f5b..5e3841a 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2006 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.94 2006/01/08 07:15:49 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.95 2006/01/12 15:05:53 solar Exp $
*
* Copyright 2005-2006 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org>
@@ -893,68 +893,6 @@ depend_atom **get_vdb_atoms(void) {
#include "qgrep.c"
#include "qatom.c"
-#if 0
-queue *resolve_vdb_virtuals();
-queue *resolve_vdb_virtuals() {
- DIR *dir, *dirp;
- struct dirent *dentry_cat, *dentry_pkg;
- char buf[BUFSIZE];
- depend_atom *atom;
-
- chdir("/");
-
- /* now try to run through vdb and locate matches for user inputs */
- if ((dir = opendir(portvdb)) == NULL)
- return virtuals;
-
- /* scan all the categories */
- while ((dentry_cat = q_vdb_get_next_dir(dir)) != NULL) {
- snprintf(buf, sizeof(buf), "%s/%s", portvdb, dentry_cat->d_name);
- if ((dirp = opendir(buf)) == NULL)
- continue;
-
- /* scan all the packages in this category */
- while ((dentry_pkg = q_vdb_get_next_dir(dirp)) != NULL) {
- FILE *fp;
- char *p;
- /* see if user wants any of these packages */
- snprintf(buf, sizeof(buf), "%s/%s/%s/PROVIDE", portvdb, dentry_cat->d_name, dentry_pkg->d_name);
- if ((fp = fopen(buf, "r")) != NULL) {
- fgets(buf, sizeof(buf), fp);
-
- if ((p = strrchr(buf, '\n')) != NULL)
- *p = 0;
-
- rmspace(buf);
-
- if (*buf) {
- int ok = 0;
- char *v, *tmp = xstrdup(buf);
- snprintf(buf, sizeof(buf), "%s/%s", dentry_cat->d_name, dentry_pkg->d_name);
-
- atom = atom_explode(buf);
- if (!atom) {
- warn("could not explode '%s'", buf);
- continue;
- }
- sprintf(buf, "%s/%s", atom->CATEGORY, atom->PN);
- if ((v = virtual(tmp, virtuals)) != NULL) {
- IF_DEBUG(fprintf(stderr, "%s provided by %s (removing)\n", tmp, v));
- virtuals = del_set(tmp, virtuals, &ok);
- }
- virtuals = add_set(tmp, buf, virtuals);
- IF_DEBUG(fprintf(stderr, "%s provided by %s/%s (adding)\n", tmp, atom->CATEGORY, dentry_pkg->d_name));
- free(tmp);
- atom_implode(atom);
- }
- fclose(fp);
- }
- }
- }
- return virtuals;
-}
-#endif
-
void cleanup() {
reinitialize_as_needed();
free_sets(virtuals);