summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-23 23:55:51 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-23 23:55:51 (EST)
commit0029afd9026a9f82c68c86a81be306ff835a30d5 (patch)
treed2bb34b79cc15d5db54628dff730e126c77e8b08
parent94e00a584d7e2d28d23ead5c47e56bc421e2b5f9 (diff)
Remove the purge command. Undocumented and only duplicates remove functionality.
git-svn-id: http://opkg.googlecode.com/svn/trunk@360 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/opkg_cmd.c33
-rw-r--r--libopkg/opkg_remove.c6
-rw-r--r--libopkg/opkg_remove.h1
3 files changed, 0 insertions, 40 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 7c90004..e33ef68 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -52,7 +52,6 @@ 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);
static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv);
-static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_files_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_search_cmd(opkg_conf_t *conf, int argc, char **argv);
@@ -85,7 +84,6 @@ static opkg_cmd_t cmds[] = {
{"status", 0, (opkg_cmd_fun_t)opkg_status_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},
{"configure", 0, (opkg_cmd_fun_t)opkg_configure_cmd},
{"files", 1, (opkg_cmd_fun_t)opkg_files_cmd},
{"search", 1, (opkg_cmd_fun_t)opkg_search_cmd},
@@ -855,37 +853,6 @@ static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv)
return 0;
}
-static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv)
-{
- int i;
- pkg_t *pkg;
-
- global_conf = conf;
- signal(SIGINT, sigint_handler);
-
- pkg_info_preinstall_check(conf);
-
- for (i=0; i < argc; i++) {
- if (conf->restrict_to_default_dest) {
- pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash,
- argv[i],
- conf->default_dest);
- } else {
- pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, argv[i]);
- }
-
- if (pkg == NULL) {
- opkg_message(conf, OPKG_ERROR,
- "Package %s is not installed.\n", argv[i]);
- continue;
- }
- opkg_purge_pkg(conf, pkg);
- }
-
- write_status_files_if_changed(conf);
- return 0;
-}
-
static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv)
{
int i;
diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
index aba3512..d6c592c 100644
--- a/libopkg/opkg_remove.c
+++ b/libopkg/opkg_remove.c
@@ -326,12 +326,6 @@ int opkg_remove_pkg(opkg_conf_t *conf, pkg_t *pkg,int message)
return 0;
}
-int opkg_purge_pkg(opkg_conf_t *conf, pkg_t *pkg)
-{
- opkg_remove_pkg(conf, pkg,0);
- return 0;
-}
-
int remove_data_files_and_list(opkg_conf_t *conf, pkg_t *pkg)
{
str_list_t installed_dirs;
diff --git a/libopkg/opkg_remove.h b/libopkg/opkg_remove.h
index d4f234f..909475c 100644
--- a/libopkg/opkg_remove.h
+++ b/libopkg/opkg_remove.h
@@ -22,7 +22,6 @@
#include "opkg_conf.h"
int opkg_remove_pkg(opkg_conf_t *conf, pkg_t *pkg,int message);
-int opkg_purge_pkg(opkg_conf_t *conf, pkg_t *pkg);
int possible_broken_removal_of_packages (opkg_conf_t *conf, pkg_t *pkg);
int pkg_has_installed_dependents(opkg_conf_t *conf, abstract_pkg_t *parent_apkg, pkg_t *pkg, abstract_pkg_t *** pdependents);
int remove_data_files_and_list(opkg_conf_t *conf, pkg_t *pkg);