[packages/poldek] - --verify fix; rel 5
mis
mis at pld-linux.org
Wed Mar 19 16:41:38 CET 2025
commit b442ad64db8f5f978045e534976a1fcda83b3b92
Author: mis <mis at pld-linux.org>
Date: Wed Mar 19 16:07:33 2025 +0100
- --verify fix; rel 5
poldek.spec | 4 ++-
verify-fix.patch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletion(-)
---
diff --git a/poldek.spec b/poldek.spec
index d17eed6..d876914 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -22,7 +22,7 @@
%define ver_rpm 1:4.14
%endif
-%define rel 4
+%define rel 5
Summary: RPM packages management helper tool
Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
@@ -54,6 +54,7 @@ Patch2: %{name}-ext-down-enable.patch
Patch3: fix-reinstall-sigsev.patch
Patch4: restore-verify-all.patch
Patch5: proxy-fix.patch
+Patch6: verify-fix.patch
URL: http://poldek.pld-linux.org/
%{?with_rpm5:BuildRequires: %{db_pkg}-devel >= %{ver_db}}
BuildRequires: autoconf >= 2.63
@@ -232,6 +233,7 @@ Moduły języka Python dla poldka.
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
+%patch -P 6 -p1
%{__rm} doc/poldek.info
%{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/verify-fix.patch b/verify-fix.patch
new file mode 100644
index 0000000..183bc69
--- /dev/null
+++ b/verify-fix.patch
@@ -0,0 +1,74 @@
+diff --git a/trurlib/include/trurl/nhash.h b/trurlib/include/trurl/nhash.h
+index e03fa9c..3ffe267 100644
+--- a/trurlib/include/trurl/nhash.h
++++ b/trurlib/include/trurl/nhash.h
+@@ -104,6 +104,7 @@ uint32_t n_hash_compute_index_hash(const tn_hash *ht, uint32_t raw_hash);
+ struct trurl_hash_iterator {
+ tn_hash *ht;
+ int pos;
++ int bpos;
+ };
+
+ typedef struct trurl_hash_iterator tn_hash_it;
+diff --git a/trurlib/n_hash_get.c b/trurlib/n_hash_get.c
+index 81c612b..48f0897 100644
+--- a/trurlib/n_hash_get.c
++++ b/trurlib/n_hash_get.c
+@@ -8,21 +8,39 @@ void n_hash_it_init(tn_hash_it *hi, tn_hash *ht)
+ {
+ hi->ht = ht;
+ hi->pos = 0;
++ hi->bpos = 0;
+ }
+
+ void *n_hash_it_get(tn_hash_it *hi, const char **key) {
+ struct hash_bucket **tbl = hi->ht->table;
+ size_t i = hi->pos;
+
+- while (tbl[i] == NULL && i < hi->ht->size)
++ while (i < hi->ht->size && tbl[i] == NULL)
+ i++;
+
+ if (i >= hi->ht->size)
+ return NULL;
+
+- struct hash_bucket *ptr = tbl[i];
++ struct hash_bucket *ptr;
++ int j = 0;
++
++ ptr = tbl[i];
++ while (ptr != NULL) {
++ if (j == hi->bpos)
++ break;
++ ptr = ptr->next;
++ j++;
++ }
++
++ n_assert(ptr);
++
++ if (ptr->next == NULL) {
++ hi->pos = i + 1;
++ hi->bpos = 0;
++ } else {
++ hi->bpos++;
++ }
+
+- hi->pos = i + 1;
+ if (key)
+ *key = ptr->key;
+
+diff --git a/pkgmark.c b/pkgmark.c
+index 84ea6f4..9845bce 100644
+--- a/pkgmark.c
++++ b/pkgmark.c
+@@ -351,8 +351,9 @@ void pkgmark_massset(struct pkgmark_set *pms, int set, uint32_t flag)
+ return;
+
+ tn_hash_it it;
+- struct pkg_mark *m;
++ n_hash_it_init(&it, pms->ht);
+
++ struct pkg_mark *m;
+ while ((m = n_hash_it_get(&it, NULL)) != NULL) {
+ if (set)
+ m->flags |= flag;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/b442ad64db8f5f978045e534976a1fcda83b3b92
More information about the pld-cvs-commit
mailing list