[package] opkg: update to r503 - reduces peak memory usage by further 20%, rebased...
[openwrt.git] / package / opkg / patches / 010-remove-flag.patch
1 --- a/libopkg/opkg_cmd.c
2 +++ b/libopkg/opkg_cmd.c
3 @@ -735,49 +735,6 @@
4 }
5
6 static int
7 -opkg_flag_cmd(int argc, char **argv)
8 -{
9 - int i;
10 - pkg_t *pkg;
11 - const char *flags = argv[0];
12 -
13 - signal(SIGINT, sigint_handler);
14 -
15 - for (i=1; i < argc; i++) {
16 - if (conf->restrict_to_default_dest) {
17 - pkg = pkg_hash_fetch_installed_by_name_dest(argv[i],
18 - conf->default_dest);
19 - } else {
20 - pkg = pkg_hash_fetch_installed_by_name(argv[i]);
21 - }
22 -
23 - if (pkg == NULL) {
24 - opkg_msg(ERROR, "Package %s is not installed.\n", argv[i]);
25 - continue;
26 - }
27 - if (( strcmp(flags,"hold")==0)||( strcmp(flags,"noprune")==0)||
28 - ( strcmp(flags,"user")==0)||( strcmp(flags,"ok")==0)) {
29 - pkg->state_flag = pkg_state_flag_from_str(flags);
30 - }
31 -
32 - /*
33 - * Useful if a package is installed in an offline_root, and
34 - * should be configured by opkg-cl configure at a later date.
35 - */
36 - if (( strcmp(flags,"installed")==0)||( strcmp(flags,"unpacked")==0)){
37 - pkg->state_status = pkg_state_status_from_str(flags);
38 - }
39 -
40 - opkg_state_changed++;
41 - opkg_msg(NOTICE, "Setting flags for package %s to %s.\n",
42 - pkg->name, flags);
43 - }
44 -
45 - write_status_files_if_changed();
46 - return 0;
47 -}
48 -
49 -static int
50 opkg_files_cmd(int argc, char **argv)
51 {
52 pkg_t *pkg;
53 @@ -1159,7 +1116,6 @@
54 {"list_upgradable", 0, (opkg_cmd_fun_t)opkg_list_upgradable_cmd, PFM_SOURCE},
55 {"list-upgradable", 0, (opkg_cmd_fun_t)opkg_list_upgradable_cmd, PFM_SOURCE},
56 {"info", 0, (opkg_cmd_fun_t)opkg_info_cmd, 0},
57 - {"flag", 1, (opkg_cmd_fun_t)opkg_flag_cmd, PFM_DESCRIPTION|PFM_SOURCE},
58 {"status", 0, (opkg_cmd_fun_t)opkg_status_cmd, PFM_DESCRIPTION|PFM_SOURCE},
59 {"install", 1, (opkg_cmd_fun_t)opkg_install_cmd, PFM_DESCRIPTION|PFM_SOURCE},
60 {"remove", 1, (opkg_cmd_fun_t)opkg_remove_cmd, PFM_DESCRIPTION|PFM_SOURCE},
This page took 0.038449 seconds and 5 git commands to generate.