summaryrefslogtreecommitdiffstats
path: root/src/info.c
diff options
context:
space:
mode:
authorCameron Banta <cbanta@gmail.com>2009-03-07 01:33:31 +0000
committerTimo Teras <timo.teras@iki.fi>2009-03-07 11:34:37 +0200
commit57391d1e4c4b8464ca14b464cc6c29987922fe88 (patch)
treea4b1008b4459d5c3653211a7fd7a87851adc1531 /src/info.c
parente93cb1ffe5a411de69312858fa73bbd0707f5c35 (diff)
downloadapk-tools-57391d1e4c4b8464ca14b464cc6c29987922fe88.tar.bz2
apk-tools-57391d1e4c4b8464ca14b464cc6c29987922fe88.tar.xz
Created search applet
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/info.c b/src/info.c
index 9414738..7bfc6b7 100644
--- a/src/info.c
+++ b/src/info.c
@@ -35,30 +35,6 @@ static int info_list(struct apk_database *db, int argc, char **argv)
return 0;
}
-static int info_repo_pkgs_print(apk_hash_item item, void *ctx)
-{
- struct apk_database *db = (struct apk_database *) ctx;
- struct apk_package *pkg = (struct apk_package *) item;
-
- printf("%s", pkg->name->name);
- if (apk_verbosity > 0)
- printf("-%s", pkg->version);
- if (apk_verbosity > 1) {
- printf("\n\t%s", db->repos[pkg->repos].url);
- printf("\n\t%s", pkg->description);
- }
- printf("\n");
-
- return 0;
-}
-
-static int info_repo_pkgs(struct apk_database *db, int argc, char **argv)
-{
- apk_hash_foreach(&db->available.packages, info_repo_pkgs_print, db);
-
- return 0;
-}
-
static int info_exists(struct apk_database *db, int argc, char **argv)
{
struct apk_name *name;
@@ -207,9 +183,6 @@ static int info_parse(void *ctx, int optch, int optindex, const char *optarg)
case 'R':
ictx->action = info_depends;
break;
- case 'o':
- ictx->action = info_repo_pkgs;
- break;
default:
return -1;
}
@@ -239,12 +212,11 @@ static struct option info_options[] = {
{ "installed", no_argument, NULL, 'e' },
{ "who-owns", no_argument, NULL, 'W' },
{ "depends", no_argument, NULL, 'R' },
- { "repo-pkgs", no_argument, NULL, 'o' },
};
static struct apk_applet apk_info = {
.name = "info",
- .usage = "[--repo-pkgs|-o]",
+ .usage = "",
.context_size = sizeof(struct info_ctx),
.num_options = ARRAY_SIZE(info_options),
.options = info_options,