010-remove-flag.patch 3.0 KB

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