From 94e00a584d7e2d28d23ead5c47e56bc421e2b5f9 Mon Sep 17 00:00:00 2001 From: graham.gower Date: Mon, 23 Nov 2009 23:41:46 -0500 Subject: Remove list_pending command. Undocumented and the pending_dir was unpopulated. git-svn-id: http://opkg.googlecode.com/svn/trunk@359 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c index b7abd15..7c90004 100644 --- a/libopkg/opkg_cmd.c +++ b/libopkg/opkg_cmd.c @@ -48,7 +48,6 @@ static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_list_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_info_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_status_cmd(opkg_conf_t *conf, int argc, char **argv); -static int opkg_install_pending_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_install_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_list_installed_cmd(opkg_conf_t *conf, int argc, char **argv); static int opkg_list_upgradable_cmd(opkg_conf_t *conf, int argc, char **argv); @@ -84,8 +83,6 @@ static opkg_cmd_t cmds[] = { {"info", 0, (opkg_cmd_fun_t)opkg_info_cmd}, {"flag", 1, (opkg_cmd_fun_t)opkg_flag_cmd}, {"status", 0, (opkg_cmd_fun_t)opkg_status_cmd}, - {"install_pending", 0, (opkg_cmd_fun_t)opkg_install_pending_cmd}, - {"install-pending", 0, (opkg_cmd_fun_t)opkg_install_pending_cmd}, {"install", 1, (opkg_cmd_fun_t)opkg_install_cmd}, {"remove", 1, (opkg_cmd_fun_t)opkg_remove_cmd}, {"purge", 1, (opkg_cmd_fun_t)opkg_purge_cmd}, @@ -805,44 +802,6 @@ static int opkg_configure_cmd(opkg_conf_t *conf, int argc, char **argv) return err; } -static int opkg_install_pending_cmd(opkg_conf_t *conf, int argc, char **argv) -{ - int i, err; - char *globpattern; - glob_t globbuf; - - sprintf_alloc(&globpattern, "%s/*" OPKG_PKG_EXTENSION, conf->pending_dir); - err = glob(globpattern, 0, NULL, &globbuf); - free(globpattern); - if (err) { - return 0; - } - - opkg_message(conf, OPKG_NOTICE, - "The following packages in %s will now be installed.\n", - conf->pending_dir); - for (i = 0; i < globbuf.gl_pathc; i++) { - opkg_message(conf, OPKG_NOTICE, - "%s%s", i == 0 ? "" : " ", globbuf.gl_pathv[i]); - } - opkg_message(conf, OPKG_NOTICE, "\n"); - for (i = 0; i < globbuf.gl_pathc; i++) { - err = opkg_install_from_file(conf, globbuf.gl_pathv[i]); - if (err == 0) { - err = unlink(globbuf.gl_pathv[i]); - if (err) { - opkg_message(conf, OPKG_ERROR, - "%s: ERROR: failed to unlink %s: %s\n", - __FUNCTION__, globbuf.gl_pathv[i], strerror(err)); - return err; - } - } - } - globfree(&globbuf); - - return err; -} - static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv) { int i, a, done; diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c index 3b4378f..238754c 100644 --- a/libopkg/opkg_conf.c +++ b/libopkg/opkg_conf.c @@ -251,8 +251,6 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args) conf->lists_dir = tmp; } - sprintf_alloc(&conf->pending_dir, "%s/pending", conf->lists_dir); - /* if no architectures were defined, then default all, noarch, and host architecture */ if (nv_pair_list_empty(&conf->arch_list)) { nv_pair_list_append(&conf->arch_list, "all", "1"); @@ -348,7 +346,6 @@ void opkg_conf_deinit(opkg_conf_t *conf) free(conf->tmp_dir); free(conf->lists_dir); - free(conf->pending_dir); pkg_src_list_deinit(&conf->pkg_src_list); pkg_dest_list_deinit(&conf->pkg_dest_list); diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h index b19e5dd..fc14e09 100644 --- a/libopkg/opkg_conf.h +++ b/libopkg/opkg_conf.h @@ -31,7 +31,6 @@ typedef struct opkg_conf opkg_conf_t; #define OPKG_CONF_DEFAULT_TMP_DIR_BASE "/tmp" #define OPKG_CONF_TMP_DIR_SUFFIX "opkg-XXXXXX" #define OPKG_CONF_LISTS_DIR OPKG_STATE_DIR_PREFIX "/lists" -#define OPKG_CONF_PENDING_DIR OPKG_STATE_DIR_PREFIX "/pending" /* In case the config file defines no dest */ #define OPKG_CONF_DEFAULT_DEST_NAME "root" @@ -51,7 +50,6 @@ struct opkg_conf char *tmp_dir; char *lists_dir; - char *pending_dir; /* options */ int autoremove; -- cgit v0.9.1