20bebda4b680c1f1ef121d50e77eca80ae725e79
[openwrt.git] / package / opkg / patches / 010-remove-flag.patch
1 --- a/libopkg/args.c
2 +++ b/libopkg/args.c
3 @@ -268,8 +268,6 @@
4 printf("\tinstall <file.opk> Install package <file.opk>\n");
5 printf("\tconfigure [<pkg>] Configure unpacked packages\n");
6 printf("\tremove <pkg|regexp> Remove package <pkg|packages following regexp>\n");
7 - printf("\tflag <flag> <pkg> ... Flag package(s) <pkg>\n");
8 - printf("\t <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation) \n");
9
10 printf("\nInformational Commands:\n");
11 printf("\tlist List available packages and descriptions\n");
12 --- a/libopkg/opkg_cmd.c
13 +++ b/libopkg/opkg_cmd.c
14 @@ -58,7 +58,6 @@
15 static int opkg_list_upgradable_cmd(opkg_conf_t *conf, int argc, char **argv);
16 static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv);
17 static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv);
18 -static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv);
19 static int opkg_files_cmd(opkg_conf_t *conf, int argc, char **argv);
20 static int opkg_search_cmd(opkg_conf_t *conf, int argc, char **argv);
21 static int opkg_download_cmd(opkg_conf_t *conf, int argc, char **argv);
22 @@ -84,7 +83,6 @@
23 {"list_installed", 0, (opkg_cmd_fun_t)opkg_list_installed_cmd},
24 {"list_upgradable", 0, (opkg_cmd_fun_t)opkg_list_upgradable_cmd},
25 {"info", 0, (opkg_cmd_fun_t)opkg_info_cmd},
26 - {"flag", 1, (opkg_cmd_fun_t)opkg_flag_cmd},
27 {"status", 0, (opkg_cmd_fun_t)opkg_status_cmd},
28 {"install_pending", 0, (opkg_cmd_fun_t)opkg_install_pending_cmd},
29 {"install", 1, (opkg_cmd_fun_t)opkg_install_cmd},
30 @@ -1050,48 +1048,6 @@
31 return 0;
32 }
33
34 -static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv)
35 -{
36 - int i;
37 - pkg_t *pkg;
38 - const char *flags = argv[0];
39 -
40 - global_conf = conf;
41 - signal(SIGINT, sigint_handler);
42 -
43 - for (i=1; i < argc; i++) {
44 - if (conf->restrict_to_default_dest) {
45 - pkg = pkg_hash_fetch_installed_by_name_dest(&conf->pkg_hash,
46 - argv[i],
47 - conf->default_dest);
48 - } else {
49 - pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, argv[i]);
50 - }
51 -
52 - if (pkg == NULL) {
53 - opkg_message(conf, OPKG_ERROR,
54 - "Package %s is not installed.\n", argv[i]);
55 - continue;
56 - }
57 - if (( strcmp(flags,"hold")==0)||( strcmp(flags,"noprune")==0)||
58 - ( strcmp(flags,"user")==0)||( strcmp(flags,"ok")==0)) {
59 - pkg->state_flag = pkg_state_flag_from_str(flags);
60 - }
61 -/* pb_ asked this feature 03292004 */
62 -/* Actually I will use only this two, but this is an open for various status */
63 - if (( strcmp(flags,"installed")==0)||( strcmp(flags,"unpacked")==0)){
64 - pkg->state_status = pkg_state_status_from_str(flags);
65 - }
66 - opkg_state_changed++;
67 - opkg_message(conf, OPKG_NOTICE,
68 - "Setting flags for package %s to %s\n",
69 - pkg->name, flags);
70 - }
71 -
72 - write_status_files_if_changed(conf);
73 - return 0;
74 -}
75 -
76 static int opkg_files_cmd(opkg_conf_t *conf, int argc, char **argv)
77 {
78 pkg_t *pkg;
This page took 0.042158 seconds and 3 git commands to generate.