1 |
commit: 91aa7fb3e59c0c5ab449017263ed1ea135d0c5ac |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 1 13:34:01 2018 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 1 13:34:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=91aa7fb3 |
7 |
|
8 |
scripts/rsync-generation: remove tests again, they fail the tree |
9 |
|
10 |
Tests were designed to expose problems, so it's kind of nasty when they |
11 |
are included in the tree. Not a good idea. |
12 |
|
13 |
scripts/rsync-generation/hashgen.c | 14 +++++++++----- |
14 |
.../tests/hashverify/simpletree/Manifest | 2 -- |
15 |
.../tests/hashverify/simpletree/Manifest.files.gz | Bin 437 -> 0 bytes |
16 |
.../tests/hashverify/simpletree/my-cat/Manifest.gz | Bin 231 -> 0 bytes |
17 |
.../hashverify/simpletree/my-cat/mypackage/Manifest | 6 ------ |
18 |
.../simpletree/my-cat/mypackage/metadata.xml | 10 ---------- |
19 |
.../simpletree/my-cat/mypackage/mypackage-0.ebuild | 16 ---------------- |
20 |
.../simpletree/my-cat/mypackage/mypackage-1.ebuild | 18 ------------------ |
21 |
.../simpletree/my-cat/mypackage/mypackage-2.ebuild | 16 ---------------- |
22 |
.../simpletree/my-cat/mypackage/unrecorded-file | 1 - |
23 |
10 files changed, 9 insertions(+), 74 deletions(-) |
24 |
|
25 |
diff --git a/scripts/rsync-generation/hashgen.c b/scripts/rsync-generation/hashgen.c |
26 |
index 93723f7e60..226daa74df 100644 |
27 |
--- a/scripts/rsync-generation/hashgen.c |
28 |
+++ b/scripts/rsync-generation/hashgen.c |
29 |
@@ -218,6 +218,7 @@ compare_strings(const void *l, const void *r) |
30 |
* starting with a dot are ignored, and not present in the returned |
31 |
* list. The list and all entries are allocated using malloc() and need |
32 |
* to be freed. |
33 |
+ * This function returns 0 when everything is fine, non-zero otherwise. |
34 |
*/ |
35 |
static char |
36 |
list_dir(char ***retlist, size_t *retcnt, const char *path) |
37 |
@@ -324,7 +325,7 @@ write_hashes_dir( |
38 |
size_t i; |
39 |
|
40 |
snprintf(path, sizeof(path), "%s/%s", root, name); |
41 |
- if (list_dir(&dentries, &dentrieslen, path) != 0) { |
42 |
+ if (list_dir(&dentries, &dentrieslen, path) == 0) { |
43 |
for (i = 0; i < dentrieslen; i++) { |
44 |
snprintf(path, sizeof(path), "%s/%s", name, dentries[i]); |
45 |
free(dentries[i]); |
46 |
@@ -350,7 +351,7 @@ process_files(const char *dir, const char *off, FILE *m) |
47 |
struct timeval tv[2]; /* dummy, won't use its result */ |
48 |
|
49 |
snprintf(path, sizeof(path), "%s/%s", dir, off); |
50 |
- if (list_dir(&dentries, &dentrieslen, path) != 0) { |
51 |
+ if (list_dir(&dentries, &dentrieslen, path) == 0) { |
52 |
for (i = 0; i < dentrieslen; i++) { |
53 |
snprintf(path, sizeof(path), "%s%s%s", |
54 |
off, *off == '\0' ? "" : "/", dentries[i]); |
55 |
@@ -519,7 +520,7 @@ process_dir_gen(const char *dir) |
56 |
size_t dentrieslen; |
57 |
size_t i; |
58 |
|
59 |
- if (list_dir(&dentries, &dentrieslen, dir) != 0) { |
60 |
+ if (list_dir(&dentries, &dentrieslen, dir) == 0) { |
61 |
char *my_manifest = str_manifest_gz; |
62 |
|
63 |
if (type_manifest == GLOBAL_MANIFEST) |
64 |
@@ -657,7 +658,7 @@ process_dir_gen(const char *dir) |
65 |
} |
66 |
fclose(f); |
67 |
|
68 |
- if (list_dir(&dentries, &dentrieslen, dir) != 0) { |
69 |
+ if (list_dir(&dentries, &dentrieslen, dir) == 0) { |
70 |
for (i = 0; i < dentrieslen; i++) { |
71 |
if (strcmp(dentries[i] + strlen(dentries[i]) - 7, |
72 |
".ebuild") != 0) |
73 |
@@ -1348,8 +1349,11 @@ main(int argc, char *argv[]) |
74 |
int ret = 0; |
75 |
char *rsn; |
76 |
|
77 |
- if ((prog = strrchr(argv[0], '/')) == NULL) |
78 |
+ if ((prog = strrchr(argv[0], '/')) == NULL) { |
79 |
prog = argv[0]; |
80 |
+ } else { |
81 |
+ prog++; |
82 |
+ } |
83 |
|
84 |
if (argc > 1) { |
85 |
if (strcmp(argv[1], "hashverify") == 0 || |
86 |
|
87 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest |
88 |
deleted file mode 100644 |
89 |
index 58c61a8625..0000000000 |
90 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest |
91 |
+++ /dev/null |
92 |
@@ -1,2 +0,0 @@ |
93 |
-MANIFEST Manifest.files.gz 437 BLAKE2B 32dd239c7cc855c08a02c50b07970cc4df0af1a40e4be3c69c05d36e97ec8b611a45f2fdc773450fecd4d22253122f3978080cea595247e7891b66688ac45668 SHA512 85036ad84f245f8137591223c0db936ab80a21c363e06dae63e6e0f1f2c78715a733abc55b9707a89df39481dedcddd3887f66fd59d4ce8dcdf5e8ccf3c2a267 |
94 |
-TIMESTAMP 2018-03-01T10:58:37Z |
95 |
|
96 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz |
97 |
deleted file mode 100644 |
98 |
index 09eadcad7b..0000000000 |
99 |
Binary files a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz and /dev/null differ |
100 |
|
101 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz |
102 |
deleted file mode 100644 |
103 |
index 9bc47b288a..0000000000 |
104 |
Binary files a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz and /dev/null differ |
105 |
|
106 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest |
107 |
deleted file mode 100644 |
108 |
index da5accb70b..0000000000 |
109 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest |
110 |
+++ /dev/null |
111 |
@@ -1,6 +0,0 @@ |
112 |
-DIST foo 12 bar |
113 |
-EBUILD mypackage-0.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61 |
114 |
-EBUILD mypackage-1.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61 |
115 |
-EBUILD mypackage-2.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61 |
116 |
-EBUILD mypackage-3.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61 |
117 |
-MISC metadata.xml 297 BLAKE2B 14dd1b26d504485cb920cf01ddb68fe36a3f4646c7283b01697363680a0c56520cc28f1ad3df4f41a7dba532e08e66321fe89a309f43feeeafc65ef1f7617c8e SHA512 4b07eaacba80c46a68348ecc95c67b821d5e23ef5f6e7a0dec89f1a380d5562fc50d65d9fb09fe2c3079b4ca16ed6a9774668aabb93a56a9d8864f5de53aac57 |
118 |
|
119 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml |
120 |
deleted file mode 100644 |
121 |
index 33b480e2ec..0000000000 |
122 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml |
123 |
+++ /dev/null |
124 |
@@ -1,10 +0,0 @@ |
125 |
-<?xml version="1.0" encoding="UTF-8"?> |
126 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
127 |
-<pkgmetadata> |
128 |
- <maintainer type="person"> |
129 |
- <email>grobian@g.o</email> |
130 |
- <name>Fabian Groffen</name> |
131 |
- </maintainer> |
132 |
- <longdescription lang="en"> |
133 |
- </longdescription> |
134 |
-</pkgmetadata> |
135 |
|
136 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild |
137 |
deleted file mode 100644 |
138 |
index 708fc58efb..0000000000 |
139 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild |
140 |
+++ /dev/null |
141 |
@@ -1,16 +0,0 @@ |
142 |
-# Copyright 1999-2018 Gentoo Foundation |
143 |
-# Distributed under the terms of the GNU General Public License v2 |
144 |
- |
145 |
-EAPI=6 |
146 |
- |
147 |
-DESCRIPTION="" |
148 |
-HOMEPAGE="" |
149 |
-SRC_URI="" |
150 |
- |
151 |
-LICENSE="" |
152 |
-SLOT="0" |
153 |
-KEYWORDS="~amd64 ~x86" |
154 |
-IUSE="" |
155 |
- |
156 |
-DEPEND="" |
157 |
-RDEPEND="${DEPEND}" |
158 |
|
159 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild |
160 |
deleted file mode 100644 |
161 |
index a4388abd8e..0000000000 |
162 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild |
163 |
+++ /dev/null |
164 |
@@ -1,18 +0,0 @@ |
165 |
-# Copyright 1999-2018 Gentoo Foundation |
166 |
-# Distributed under the terms of the GNU General Public License v2 |
167 |
- |
168 |
-#filesize mismatch |
169 |
- |
170 |
-EAPI=6 |
171 |
- |
172 |
-DESCRIPTION="" |
173 |
-HOMEPAGE="" |
174 |
-SRC_URI="" |
175 |
- |
176 |
-LICENSE="" |
177 |
-SLOT="0" |
178 |
-KEYWORDS="~amd64 ~x86" |
179 |
-IUSE="" |
180 |
- |
181 |
-DEPEND="" |
182 |
-RDEPEND="${DEPEND}" |
183 |
|
184 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild |
185 |
deleted file mode 100644 |
186 |
index 38bbcfc4e4..0000000000 |
187 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild |
188 |
+++ /dev/null |
189 |
@@ -1,16 +0,0 @@ |
190 |
-# Copyright 1999-2018 Gentoo Foundation |
191 |
-# Distributed under the terms of the GNU General Public License v2 |
192 |
- |
193 |
-EAPI=6 |
194 |
- |
195 |
-HASH_MISMATCH_ |
196 |
-HOMEPAGE="" |
197 |
-SRC_URI="" |
198 |
- |
199 |
-LICENSE="" |
200 |
-SLOT="0" |
201 |
-KEYWORDS="~amd64 ~x86" |
202 |
-IUSE="" |
203 |
- |
204 |
-DEPEND="" |
205 |
-RDEPEND="${DEPEND}" |
206 |
|
207 |
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file |
208 |
deleted file mode 100644 |
209 |
index 257cc5642c..0000000000 |
210 |
--- a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file |
211 |
+++ /dev/null |
212 |
@@ -1 +0,0 @@ |
213 |
-foo |