1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../mine/gasgui-any-archiver.patch
5 # Copyright (C) 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
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
15 # --- T2-COPYRIGHT-NOTE-END ---
18 Likewise allow handling of any compressed tarball.
20 - Rene Rebe <rene@exactcode.de>
22 --- mine-0.23/gasgui.c 2005-03-23 09:51:06.000000000 +0100
23 +++ mine-0.23-patched/gasgui.c 2005-12-18 19:17:08.000000000 +0100
25 char * sourcedir = "/mnt/cdrom0";
26 char * sourceopt = "ro";
28 +char * sourcefmt = "tar.bz2";
30 char * mine_command = "mine";
31 char * mine_fopt = "";
34 " -D Read package db and dump the memory DB as tree (debug).\n"
35 " -T Don't really execute 'mine', print commands instead (debug).\n"
36 " -F Start mine with the '-f' option (used by install scripts).\n"
37 +" -S Source format, e.g. tar.bz2, tar.gz or gem\n"
44 while ( !strncmp(sourcedir, "http://", 7) || !strncmp(sourcedir, "ftp://", 6) ) {
45 - snprintf(gemfile, 1024, "%s/%s-%s.gem",
46 - targetdir, p->name, p->version);
47 + snprintf(gemfile, 1024, "%s/%s-%s.%s",
48 + targetdir, p->name, p->version, sourcefmt);
50 - snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s-%s.gem'",
51 - gemfile, sourcedir, config, p->name, p->version);
52 + snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s-%s.%s'",
53 + gemfile, sourcedir, config, p->name, p->version, sourcefmt);
55 snprintf(command, 1024, "test -s '%s' || rm -f %s", gemfile, gemfile);
57 if ( !access(gemfile, F_OK) ) return gemfile;
59 - snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s.gem'",
60 - gemfile, sourcedir, config, p->name);
61 + snprintf(command, 1024, "wget -O '%s' -q '%s/%s/pkgs/%s.%s'",
62 + gemfile, sourcedir, config, p->name, sourcefmt);
64 snprintf(command, 1024, "test -s '%s' || rm -f %s", gemfile, gemfile);
66 if ( !access(gemfile, F_OK) ) return gemfile;
68 - printf("Can't find: %s/%s/pkgs/%s-%s.gem\n",
69 - sourcedir, config, p->name, p->version);
70 - printf("Can't find: %s/%s/pkgs/%s.gem\n",
71 - sourcedir, config, p->name);
72 + printf("Can't find: %s/%s/pkgs/%s-%s.%s\n",
73 + sourcedir, config, p->name, p->version, sourcefmt);
74 + printf("Can't find: %s/%s/pkgs/%s.%s\n",
75 + sourcedir, config, p->name, sourcefmt);
76 printf("Not found on webserver: %s\n\n", p->name);
78 printf("Skip or Retry (default=Retry) > ");
83 - snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.gem",
84 - sourcedir, config, p->name, p->version);
85 + snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.%s",
86 + sourcedir, config, p->name, p->version, sourcefmt);
87 if ( !access(gemfile, F_OK) ) return gemfile;
89 - snprintf(gemfile, 1024, "%s/%s/pkgs/%s.gem",
90 - sourcedir, config, p->name);
91 + snprintf(gemfile, 1024, "%s/%s/pkgs/%s.%s",
92 + sourcedir, config, p->name, sourcefmt);
93 if ( !access(gemfile, F_OK) ) return gemfile;
95 /* looks like there are sometimes races with asyncrounously running mine subprocesses or something
97 snprintf(command, 1024, "umount -v %s &> /dev/null || { sleep 1; umount -v %s; }", sourcedir, sourcedir);
100 - printf("Can't find: %s/%s/pkgs/%s-%s.gem\n",
101 - sourcedir, config, p->name, p->version);
102 - printf("Can't find: %s/%s/pkgs/%s.gem\n",
103 - sourcedir, config, p->name);
104 + printf("Can't find: %s/%s/pkgs/%s-%s.%s\n",
105 + sourcedir, config, p->name, p->version, sourcefmt);
106 + printf("Can't find: %s/%s/pkgs/%s.%s\n",
107 + sourcedir, config, p->name, sourcefmt);
108 printf("Not found on current disk: %s\n\n", p->name);
109 printf("Please insert Disk #%d and press ENTER.\n\n",
111 @@ -174,12 +177,12 @@
115 - snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.gem",
116 - sourcedir, config, p->name, p->version);
117 + snprintf(gemfile, 1024, "%s/%s/pkgs/%s-%s.%s",
118 + sourcedir, config, p->name, p->version, sourcefmt);
119 if ( !access(gemfile, F_OK) ) return gemfile;
121 - snprintf(gemfile, 1024, "%s/%s/pkgs/%s.gem",
122 - sourcedir, config, p->name);
123 + snprintf(gemfile, 1024, "%s/%s/pkgs/%s.%s",
124 + sourcedir, config, p->name, sourcefmt);
125 if ( !access(gemfile, F_OK) ) return gemfile;
127 snprintf(command, 1024, "mount -v -o %s %s %s",
132 - while ( (opt = getopt(argc, argv, "c:t:d:s:o:DTF")) != -1 ) {
133 + while ( (opt = getopt(argc, argv, "c:t:d:s:o:S:DTF")) != -1 ) {
142 + sourcefmt = optarg;