[package] opkg:
[openwrt.git] / package / opkg / patches / 009-remove-upgrade.patch
1 --- a/libopkg/args.c
2 +++ b/libopkg/args.c
3 @@ -263,7 +263,6 @@
4
5 printf("\nPackage Manipulation:\n");
6 printf("\tupdate Update list of available packages\n");
7 - printf("\tupgrade Upgrade all installed packages to latest version\n");
8 printf("\tinstall <pkg> Download and install <pkg> (and dependencies)\n");
9 printf("\tinstall <file.opk> Install package <file.opk>\n");
10 printf("\tconfigure [<pkg>] Configure unpacked packages\n");
11 @@ -274,7 +273,6 @@
12 printf("\nInformational Commands:\n");
13 printf("\tlist List available packages and descriptions\n");
14 printf("\tlist_installed List all and only the installed packages and description \n");
15 - printf("\tlist_upgradable List all the installed and upgradable packages\n");
16 printf("\tfiles <pkg> List all files belonging to <pkg>\n");
17 printf("\tsearch <file|regexp> Search for a package providing <file>\n");
18 printf("\tinfo [pkg|regexp] Display all info for <pkg>\n");
19 --- a/libopkg/opkg_cmd.c
20 +++ b/libopkg/opkg_cmd.c
21 @@ -48,14 +48,12 @@
22 static void *p_userdata = NULL;
23
24 static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv);
25 -static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv);
26 static int opkg_list_cmd(opkg_conf_t *conf, int argc, char **argv);
27 static int opkg_info_cmd(opkg_conf_t *conf, int argc, char **argv);
28 static int opkg_status_cmd(opkg_conf_t *conf, int argc, char **argv);
29 static int opkg_install_pending_cmd(opkg_conf_t *conf, int argc, char **argv);
30 static int opkg_install_cmd(opkg_conf_t *conf, int argc, char **argv);
31 static int opkg_list_installed_cmd(opkg_conf_t *conf, int argc, char **argv);
32 -static int opkg_list_upgradable_cmd(opkg_conf_t *conf, int argc, char **argv);
33 static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv);
34 static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv);
35 static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv);
36 @@ -79,10 +77,8 @@
37 array for easier maintenance */
38 static opkg_cmd_t cmds[] = {
39 {"update", 0, (opkg_cmd_fun_t)opkg_update_cmd},
40 - {"upgrade", 0, (opkg_cmd_fun_t)opkg_upgrade_cmd},
41 {"list", 0, (opkg_cmd_fun_t)opkg_list_cmd},
42 {"list_installed", 0, (opkg_cmd_fun_t)opkg_list_installed_cmd},
43 - {"list_upgradable", 0, (opkg_cmd_fun_t)opkg_list_upgradable_cmd},
44 {"info", 0, (opkg_cmd_fun_t)opkg_info_cmd},
45 {"flag", 1, (opkg_cmd_fun_t)opkg_flag_cmd},
46 {"status", 0, (opkg_cmd_fun_t)opkg_status_cmd},
47 @@ -599,69 +595,6 @@
48 return err;
49 }
50
51 -static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv)
52 -{
53 - int i;
54 - pkg_t *pkg;
55 - int err;
56 -
57 - global_conf = conf;
58 - signal(SIGINT, sigint_handler);
59 -
60 - if (argc) {
61 - for (i=0; i < argc; i++) {
62 - char *arg = argv[i];
63 -
64 - err = opkg_prepare_url_for_install(conf, arg, &arg);
65 - if (err != EINVAL && err != 0)
66 - return err;
67 - }
68 - pkg_info_preinstall_check(conf);
69 -
70 - for (i=0; i < argc; i++) {
71 - char *arg = argv[i];
72 - if (conf->restrict_to_default_dest) {
73 - pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash,
74 - argv[i],
75 - conf->default_dest);
76 - if (pkg == NULL) {
77 - opkg_message(conf, OPKG_NOTICE,
78 - "Package %s not installed in %s\n",
79 - argv[i], conf->default_dest->name);
80 - continue;
81 - }
82 - } else {
83 - pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash,
84 - argv[i]);
85 - }
86 - if (pkg)
87 - opkg_upgrade_pkg(conf, pkg);
88 - else {
89 - opkg_install_by_name(conf, arg);
90 - }
91 - }
92 - } else {
93 - pkg_vec_t *installed = pkg_vec_alloc();
94 -
95 - pkg_info_preinstall_check(conf);
96 -
97 - pkg_hash_fetch_all_installed(&conf->pkg_hash, installed);
98 - for (i = 0; i < installed->len; i++) {
99 - pkg = installed->pkgs[i];
100 - opkg_upgrade_pkg(conf, pkg);
101 - }
102 - pkg_vec_free(installed);
103 - }
104 -
105 - /* recheck to verify that all dependences are satisfied */
106 - if (0) opkg_satisfy_all_dependences(conf);
107 -
108 - opkg_configure_packages(conf, NULL);
109 -
110 - write_status_files_if_changed(conf);
111 -
112 - return 0;
113 -}
114
115 static int opkg_download_cmd(opkg_conf_t *conf, int argc, char **argv)
116 {
117 @@ -788,26 +721,6 @@
118 return 0;
119 }
120
121 -static int opkg_list_upgradable_cmd(opkg_conf_t *conf, int argc, char **argv)
122 -{
123 - struct active_list *head = prepare_upgrade_list(conf);
124 - struct active_list *node=NULL;
125 - pkg_t *_old_pkg, *_new_pkg;
126 - char *old_v, *new_v;
127 - for (node = active_list_next(head, head); node;node = active_list_next(head,node)) {
128 - _old_pkg = list_entry(node, pkg_t, list);
129 - _new_pkg = pkg_hash_fetch_best_installation_candidate_by_name(conf, _old_pkg->name, NULL);
130 - old_v = pkg_version_str_alloc(_old_pkg);
131 - new_v = pkg_version_str_alloc(_new_pkg);
132 - if (opkg_cb_list)
133 - opkg_cb_list(_old_pkg->name, new_v, old_v, _old_pkg->state_status, p_userdata);
134 - free(old_v);
135 - free(new_v);
136 - }
137 - active_list_head_delete(head);
138 - return 0;
139 -}
140 -
141 static int opkg_info_status_cmd(opkg_conf_t *conf, int argc, char **argv, int installed_only)
142 {
143 int i;
This page took 0.055262 seconds and 5 git commands to generate.