ARGS_OPT_NODEPS,
ARGS_OPT_VERBOSE_WGET,
ARGS_OPT_VERBOSITY,
- ARGS_OPT_MULTIPLE_PROVIDERS
+ ARGS_OPT_MULTIPLE_PROVIDERS,
+ ARGS_OPT_AUTOREMOVE
};
int args_init(args_t *args)
args->force_reinstall = ARGS_DEFAULT_FORCE_REINSTALL;
args->force_removal_of_dependent_packages = ARGS_DEFAULT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES;
args->force_removal_of_essential_packages = ARGS_DEFAULT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES;
+ args->autoremove = ARGS_DEFAULT_AUTOREMOVE;
args->noaction = ARGS_DEFAULT_NOACTION;
args->nodeps = ARGS_DEFAULT_NODEPS;
args->verbose_wget = ARGS_DEFAULT_VERBOSE_WGET;
int parse_err = 0;
static struct option long_options[] = {
{"query-all", 0, 0, 'A'},
+ {"autoremove", 0, 0, ARGS_OPT_AUTOREMOVE},
{"conf-file", 1, 0, 'f'},
{"conf", 1, 0, 'f'},
{"dest", 1, 0, 'd'},
else
args->verbosity += 1;
break;
+ case ARGS_OPT_AUTOREMOVE:
+ args->autoremove = 1;
+ break;
case ARGS_OPT_FORCE_DEFAULTS:
args->force_defaults = 1;
break;
fprintf(stderr, "\t-nodeps Do not follow dependences\n");
fprintf(stderr, "\t-force-removal-of-dependent-packages\n");
fprintf(stderr, "\t-recursive Allow opkg to remove package and all that depend on it.\n");
+ fprintf(stderr, "\t-autoremove Allow opkg to remove packages that where installed automatically to satisfy dependencies.\n");
fprintf(stderr, "\t-test No action -- test only\n");
fprintf(stderr, "\t-t Specify tmp-dir.\n");
fprintf(stderr, "\t--tmp-dir Specify tmp-dir.\n");
int verbosity;
int nocheckfordirorfile;
int noreadfeedsfile;
+ int autoremove;
char *offline_root;
char *offline_root_pre_script_cmd;
char *offline_root_post_script_cmd;
#define ARGS_DEFAULT_NODEPS 0
#define ARGS_DEFAULT_VERBOSE_WGET 0
#define ARGS_DEFAULT_VERBOSITY 1
+#define ARGS_DEFAULT_AUTOREMOVE 0
int args_init(args_t *args);
void args_deinit(args_t *args);
typedef char* (*opkg_response_callback)(char *question);
typedef void (*opkg_download_progress_callback)(int percent, char *url);
typedef void (*opkg_state_changed_callback)(opkg_state_t state, const char *data);
+typedef void (*opkg_progress_callback)(int complete, int total, void *userdata);
extern int opkg_op(int argc, char *argv[]); /* opkglib.c */
extern int opkg_init (opkg_message_callback mcall,
*/
int err;
abstract_pkg_t *parent_pkg = NULL;
-
+
+ if (conf->autoremove)
+ printf ("autoremove is enabled, but not yet implemented\n");
+
if (pkg->essential && !message) {
if (conf->force_removal_of_essential_packages) {
fprintf(stderr, "WARNING: Removing essential package %s under your coercion.\n"