250-add-lists-dir-switch.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --- a/src/opkg-cl.c
  2. +++ b/src/opkg-cl.c
  3. @@ -101,6 +101,8 @@ static struct option long_options[] = {
  4. {"test", 0, 0, ARGS_OPT_NOACTION},
  5. {"tmp-dir", 1, 0, 't'},
  6. {"tmp_dir", 1, 0, 't'},
  7. + {"lists-dir", 1, 0, 'l'},
  8. + {"lists_dir", 1, 0, 'l'},
  9. {"verbosity", 2, 0, 'V'},
  10. {"version", 0, 0, 'v'},
  11. {0, 0, 0, 0}
  12. @@ -115,7 +117,7 @@ args_parse(int argc, char *argv[])
  13. char *tuple, *targ;
  14. while (1) {
  15. - c = getopt_long_only(argc, argv, "Ad:f:ino:p:t:vV::",
  16. + c = getopt_long_only(argc, argv, "Ad:f:ino:p:l:t:vV::",
  17. long_options, &option_index);
  18. if (c == -1)
  19. break;
  20. @@ -139,6 +141,9 @@ args_parse(int argc, char *argv[])
  21. case 't':
  22. conf->tmp_dir = xstrdup(optarg);
  23. break;
  24. + case 'l':
  25. + conf->lists_dir = xstrdup(optarg);
  26. + break;
  27. case 'v':
  28. printf("opkg version %s\n", VERSION);
  29. exit(0);
  30. @@ -316,6 +321,8 @@ usage()
  31. printf("\t automatically to satisfy dependencies\n");
  32. printf("\t-t Specify tmp-dir.\n");
  33. printf("\t--tmp-dir Specify tmp-dir.\n");
  34. + printf("\t-l Specify lists-dir.\n");
  35. + printf("\t--lists-dir Specify lists-dir.\n");
  36. printf("\n");