OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
5.2 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../mine/gasgui-any-archiver.patch
  5. # Copyright (C) 2005 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. Likewise allow handling of any compressed tarball.
  17. - Rene Rebe <rene@exactcode.de>
  18. --- mine-0.23/gasgui.c 2005-03-23 09:51:06.000000000 +0100
  19. +++ mine-0.23-patched/gasgui.c 2005-12-18 19:17:08.000000000 +0100
  20. @@ -39,6 +39,8 @@
  21. char * sourcedir = "/mnt/cdrom0";
  22. char * sourceopt = "ro";
  23. +char * sourcefmt = "tar.bz2";
  24. +
  25. char * mine_command = "mine";
  26. char * mine_fopt = "";
  27. @@ -68,6 +70,7 @@
  28. " -D Read package db and dump the memory DB as tree (debug).\n"
  29. " -T Don't really execute 'mine', print commands instead (debug).\n"
  30. " -F Start mine with the '-f' option (used by install scripts).\n"
  31. +" -S Source format, e.g. tar.bz2, tar.gz or gem\n"
  32. "\n"
  33. );
  34. }
  35. @@ -110,27 +113,27 @@
  36. char command[1024];
  37. while ( !strncmp(sourcedir, "http://", 7) || !strncmp(sourcedir, "ftp://", 6) ) {
  38. - snprintf(gemfile, 1024, "%s/%s-%s.gem",
  39. - targetdir, p->name, p->version);
  40. + snprintf(gemfile, 1024, "%s/%s-%s.%s",
  41. + targetdir, p->name, p->version, sourcefmt);
  42. - snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s-%s.gem'",
  43. - gemfile, sourcedir, config, p->name, p->version);
  44. + snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s-%s.%s'",
  45. + gemfile, sourcedir, config, p->name, p->version, sourcefmt);
  46. system(command);
  47. snprintf(command, 1024, "test -s '%s' || rm -f %s", gemfile, gemfile);
  48. system(command);
  49. if ( !access(gemfile, F_OK) ) return gemfile;
  50. - snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s.gem'",
  51. - gemfile, sourcedir, config, p->name);
  52. + snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s.%s'",
  53. + gemfile, sourcedir, config, p->name, sourcefmt);
  54. system(command);
  55. snprintf(command, 1024, "test -s '%s' || rm -f %s", gemfile, gemfile);
  56. system(command);
  57. if ( !access(gemfile, F_OK) ) return gemfile;
  58. - printf("Can't find: %s/%s/pkgs/%s-%s.gem\n",
  59. - sourcedir, config, p->name, p->version);
  60. - printf("Can't find: %s/%s/pkgs/%s.gem\n",
  61. - sourcedir, config, p->name);
  62. + printf("Can't find: %s/%s/pkgs/%s-%s.%s\n",
  63. + sourcedir, config, p->name, p->version, sourcefmt);
  64. + printf("Can't find: %s/%s/pkgs/%s.%s\n",
  65. + sourcedir, config, p->name, sourcefmt);
  66. printf("Not found on webserver: %s\n\n", p->name);
  67. while (1) {
  68. printf("Skip or Retry (default=Retry) > ");
  69. @@ -143,12 +146,12 @@
  70. }
  71. while (1) {
  72. - snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.gem",
  73. - sourcedir, config, p->name, p->version);
  74. + snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.%s",
  75. + sourcedir, config, p->name, p->version, sourcefmt);
  76. if ( !access(gemfile, F_OK) ) return gemfile;
  77. - snprintf(gemfile, 1024, "%s/%s/pkgs/%s.gem",
  78. - sourcedir, config, p->name);
  79. + snprintf(gemfile, 1024, "%s/%s/pkgs/%s.%s",
  80. + sourcedir, config, p->name, sourcefmt);
  81. if ( !access(gemfile, F_OK) ) return gemfile;
  82. /* looks like there are sometimes races with asyncrounously running mine subprocesses or something
  83. @@ -156,10 +159,10 @@
  84. snprintf(command, 1024, "umount -v %s &> /dev/null || { sleep 1; umount -v %s; }", sourcedir, sourcedir);
  85. system(command);
  86. - printf("Can't find: %s/%s/pkgs/%s-%s.gem\n",
  87. - sourcedir, config, p->name, p->version);
  88. - printf("Can't find: %s/%s/pkgs/%s.gem\n",
  89. - sourcedir, config, p->name);
  90. + printf("Can't find: %s/%s/pkgs/%s-%s.%s\n",
  91. + sourcedir, config, p->name, p->version, sourcefmt);
  92. + printf("Can't find: %s/%s/pkgs/%s.%s\n",
  93. + sourcedir, config, p->name, sourcefmt);
  94. printf("Not found on current disk: %s\n\n", p->name);
  95. printf("Please insert Disk #%d and press ENTER.\n\n",
  96. p->disk_number);
  97. @@ -174,12 +177,12 @@
  98. eject_disk ();
  99. }
  100. - snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.gem",
  101. - sourcedir, config, p->name, p->version);
  102. + snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.%s",
  103. + sourcedir, config, p->name, p->version, sourcefmt);
  104. if ( !access(gemfile, F_OK) ) return gemfile;
  105. - snprintf(gemfile, 1024, "%s/%s/pkgs/%s.gem",
  106. - sourcedir, config, p->name);
  107. + snprintf(gemfile, 1024, "%s/%s/pkgs/%s.%s",
  108. + sourcedir, config, p->name, sourcefmt);
  109. if ( !access(gemfile, F_OK) ) return gemfile;
  110. snprintf(command, 1024, "mount -v -o %s %s %s",
  111. @@ -237,7 +240,7 @@
  112. struct package *p;
  113. int opt, disk;
  114. - while ( (opt = getopt(argc, argv, "c:t:d:s:o:DTF")) != -1 ) {
  115. + while ( (opt = getopt(argc, argv, "c:t:d:s:o:S:DTF")) != -1 ) {
  116. switch (opt) {
  117. case 'c':
  118. config = optarg;
  119. @@ -263,6 +266,9 @@
  120. case 'F':
  121. mine_fopt = "-f";
  122. break;
  123. + case 'S':
  124. + sourcefmt = optarg;
  125. + break;
  126. default:
  127. help();
  128. return 0;