[packages/poldek] up to 0.45

mis mis at pld-linux.org
Tue Dec 16 11:22:52 CET 2025


commit af34ebb05652c09a3c84c08be061ac7803b24ca6
Author: mis <mis at pld-linux.org>
Date:   Tue Dec 16 11:22:37 2025 +0100

    up to 0.45

 fix-reinstall-sigsev.patch   |  13 ---
 linguas.patch                |  35 -------
 pkgiter-preun-req-skip.patch |  25 -----
 poldek.spec                  |  22 +----
 proxy-fix.patch              | 119 -----------------------
 restore-verify-all.patch     |  88 -----------------
 rpm6.patch                   |  20 ----
 verify-fix.patch             | 223 -------------------------------------------
 8 files changed, 4 insertions(+), 541 deletions(-)
---
diff --git a/poldek.spec b/poldek.spec
index 64b005f..4f677c9 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -22,18 +22,18 @@
 %define		ver_rpm		1:4.14
 %endif
 
-%define		rel	12
+%define		rel	1
 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
 Name:		poldek
-Version:	0.44.0
+Version:	0.45.0
 Release:	%{rel}%{?with_snap:.%{SNAP}}
 License:	GPL v2
 Group:		Applications/System
 #Source0:	http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
 Source0:	https://github.com/poldek-pm/poldek/releases/download/v%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	cd0eab5e6fe2ac6995c03541506561fc
+# Source0-md5:	445033ef4d1312718d27b4b7fc197643
 Source1:	%{name}.conf
 Source2:	%{name}-multilib.conf
 Source3:	%{name}-config.sh
@@ -51,13 +51,6 @@ Source102:	%{name}-debuginfo-snap.conf
 Patch0:		%{name}-config.patch
 Patch1:		pm-hooks.patch
 Patch2:		%{name}-ext-down-enable.patch
-Patch3:		fix-reinstall-sigsev.patch
-Patch4:		restore-verify-all.patch
-Patch5:		proxy-fix.patch
-Patch6:		verify-fix.patch
-Patch7:		linguas.patch
-Patch8:		pkgiter-preun-req-skip.patch
-Patch9:		rpm6.patch
 URL:		http://poldek.pld-linux.org/
 %{?with_rpm5:BuildRequires:	%{db_pkg}-devel >= %{ver_db}}
 BuildRequires:	autoconf >= 2.63
@@ -233,13 +226,6 @@ Moduły języka Python dla poldka.
 %patch -P 0 -p1
 %patch -P 1 -p1
 %patch -P 2 -p1
-%patch -P 3 -p1
-%patch -P 4 -p1
-%patch -P 5 -p1
-%patch -P 6 -p1
-%patch -P 7 -p1
-%patch -P 8 -p1
-%patch -P 9 -p1
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
@@ -541,7 +527,7 @@ fi
 %attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.2
 %attr(755,root,root) %ghost %{_libdir}/libpoldek.so.4
 %attr(755,root,root) %ghost %{_libdir}/libtndb.so.0
-%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.1
+%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.10
 %attr(755,root,root) %ghost %{_libdir}/libvfile.so.0
 %endif
 
diff --git a/fix-reinstall-sigsev.patch b/fix-reinstall-sigsev.patch
deleted file mode 100644
index bc05b88..0000000
--- a/fix-reinstall-sigsev.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pkgset-dep.c b/pkgset-dep.c
-index ddaf74e..f035cd9 100644
---- a/pkgset-dep.c
-+++ b/pkgset-dep.c
-@@ -293,6 +293,8 @@ tn_array *get_conflicted(int indent, struct pkgset *ps,
-     const struct capreq_idx_ent *ent;
-     const char *cnflname = capreq_name(cnfl);
- 
-+    pkgset__index_caps(ps);
-+
-     if ((ent = capreq_idx_lookup(&ps->cap_idx, cnflname, capreq_name_len(cnfl)))) {
-         struct pkg **suspkgs = (struct pkg **)ent->pkgs;
-         int nmatch = 0;
diff --git a/linguas.patch b/linguas.patch
deleted file mode 100644
index 97d86cf..0000000
--- a/linguas.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 9a91c58a282617a536a99d86be4eaa2da7e433ed Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus at fastmail.com>
-Date: Thu, 26 Jun 2025 00:30:42 +0200
-Subject: [PATCH] list available translations in po/LINGUAS file
-
-fixes compatibility with gettext >= 0.24
----
- configure.ac | 2 --
- po/LINGUAS   | 1 +
- 2 files changed, 1 insertion(+), 2 deletions(-)
- create mode 100644 po/LINGUAS
-
-diff --git a/configure.ac b/configure.ac
-index fab947b..9afc747 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -46,8 +46,6 @@ fi
- AC_SUBST(VERSION_CVSTAG)
- AC_DEFINE_UNQUOTED([VERSION_YEAR], "$VERSION_YEAR", [version year])
- 
--ALL_LINGUAS="pl de"
--
- dnl cond. building NFY
- dnl AC_DEFINE([ENABLE_VFILE_TRURLIO],1,[defined if trurlio is used for vfile operations])
- 
-diff --git a/po/LINGUAS b/po/LINGUAS
-new file mode 100644
-index 0000000..78b66c3
---- /dev/null
-+++ b/po/LINGUAS
-@@ -0,0 +1 @@
-+de pl
--- 
-2.50.0
-
diff --git a/pkgiter-preun-req-skip.patch b/pkgiter-preun-req-skip.patch
deleted file mode 100644
index 900c616..0000000
--- a/pkgiter-preun-req-skip.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From cfb03a18a51ed409a143ef56624fc67b12b58073 Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus at fastmail.com>
-Date: Wed, 25 Jun 2025 22:11:12 +0200
-Subject: [PATCH] pkgiter: don't skip reqs which are both pre and preun
-
----
- pkgiter.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkgiter.c b/pkgiter.c
-index bc085a4..4e0b810 100644
---- a/pkgiter.c
-+++ b/pkgiter.c
-@@ -147,7 +147,7 @@ const struct capreq *pkg_req_iter_get(struct pkg_req_iter *it)
-         if ((it->flags & PKG_ITER_REQUN) && !capreq_is_prereq_un(req))
-             return pkg_req_iter_get(it);
- 
--        else if ((it->flags & PKG_ITER_REQUN) == 0 && capreq_is_prereq_un(req))
-+        else if ((it->flags & PKG_ITER_REQUN) == 0 && !capreq_is_prereq(req) && capreq_is_prereq_un(req))
-             return pkg_req_iter_get(it);
- 
-         /* set type of returned (current) req */
--- 
-2.50.0
-
diff --git a/proxy-fix.patch b/proxy-fix.patch
deleted file mode 100644
index 06aeb7c..0000000
--- a/proxy-fix.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-commit ab4f31ec7afa21d7a769ad6ceb5ec176667191b2
-Author: mis <mistoo at gmail.com>
-Date:   Sat Mar 1 20:02:11 2025 +0100
-
-    fix: do not check http connection with 'HEAD /' when proxied
-
-diff --git a/vfile/vfff/http.c b/vfile/vfff/http.c
-index 92effa2..fa0fc74 100644
---- a/vfile/vfff/http.c
-+++ b/vfile/vfff/http.c
-@@ -790,27 +790,6 @@ static time_t parse_date(const char *dt)
-     return ts;
- }
- 
--static
--int vhttp_vcn_is_alive(struct vcn *cn)
--{
--    char req_line[256];
--
--    if (cn->state != VCN_ALIVE)
--        return 0;
--
--    make_req_line(req_line, sizeof(req_line), "HEAD", "/");
--
--    if (!httpcn_req(cn, req_line, NULL))
--        return 0;
--
--    if (!httpcn_get_resp(cn)) {
--        cn->state = VCN_DEAD;
--        return 0;
--    }
--
--    return 1;
--}
--
- static int is_closing_connection_status(struct http_resp *resp)
- {
-     int close_cn = 0;
-@@ -836,6 +815,34 @@ static int is_closing_connection_status(struct http_resp *resp)
-     return close_cn;
- }
- 
-+static int vhttp_vcn_is_alive(struct vcn *cn)
-+{
-+    char req_line[256];
-+
-+    if (cn->state != VCN_ALIVE)
-+        return 0;
-+
-+    if (cn->flags & VCN_PROXIED)
-+        return 0;
-+
-+    make_req_line(req_line, sizeof(req_line), "HEAD", "/");
-+
-+    if (!httpcn_req(cn, req_line, NULL))
-+        return 0;
-+
-+    if (!httpcn_get_resp(cn)) {
-+        cn->state = VCN_DEAD;
-+        return 0;
-+    }
-+
-+    if (is_closing_connection_status(cn->resp)) {
-+        cn->state = VCN_DEAD;
-+        return 0;
-+    }
-+
-+    return 1;
-+}
-+
- static
- int is_redirected_connection(struct http_resp *resp, struct vfff_req *rreq)
- {
-diff --git a/vfile/vfff/vfff.c b/vfile/vfff/vfff.c
-index f745ec1..cd014f9 100644
---- a/vfile/vfff/vfff.c
-+++ b/vfile/vfff/vfff.c
-@@ -436,5 +436,10 @@ int vfff_transfer_file(struct vcn *cn, struct vfff_req *vreq, long total_size)
-     if (vreq->progress_fn)
-         vreq->progress_fn(vreq->progress_fn_data, total_size, -1);
- 
--    return is_err == 0;
-+    if (is_err == 0 && cn->state == VCN_ALIVE) {
-+        cn->ts_is_alive = time(0); /* update alive timestamp on success */
-+        return 1;
-+    }
-+
-+    return 0;
- }
-diff --git a/vfile/vfff/vfff.h b/vfile/vfff/vfff.h
-index 22665b0..4f448de 100644
---- a/vfile/vfff/vfff.h
-+++ b/vfile/vfff/vfff.h
-@@ -60,6 +60,7 @@ struct vfff_req;
- /* flags */
- #define VCN_SUPPORTS_SIZE  (1 << 0)
- #define VCN_SUPPORTS_MDTM  (1 << 1)
-+#define VCN_PROXIED        (1 << 9)
- 
- struct vcn {
-     int       proto;
-diff --git a/vfile/vfffmod.c b/vfile/vfffmod.c
-index 98f828d..c6a8503 100644
---- a/vfile/vfffmod.c
-+++ b/vfile/vfffmod.c
-@@ -202,8 +202,12 @@ static struct vcn *vcn_pool_do_connect(struct vf_request *req)
-     if (cn == NULL) {
-         cn = vcn_new(vcn_proto, host, port, login, passwd,
-                      req->proxy_login, req->proxy_passwd);
--        if (cn)
-+        if (cn) {
-+            if (req->proxy_host)
-+                cn->flags |= VCN_PROXIED;
-+
-             n_list_push(vcn_pool, cn);
-+        }
-     }
- 
-     return cn;
diff --git a/restore-verify-all.patch b/restore-verify-all.patch
deleted file mode 100644
index 2779e06..0000000
--- a/restore-verify-all.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff --git a/arg_packages.c b/arg_packages.c
-index 48499a9..fab7618 100644
---- a/arg_packages.c
-+++ b/arg_packages.c
-@@ -350,6 +350,11 @@ int arg_packages_add_pkg(struct arg_packages *aps, struct pkg *pkg)
-     return 1;
- }
- 
-+int arg_packages_add_pkgs(struct arg_packages *aps, const tn_array *pkgs)
-+{
-+    n_array_concat_ex(aps->packages, pkgs, (tn_fn_dup)pkg_link);
-+    return 1;
-+}
- 
- static
- int arg_packages_load_list(struct arg_packages *aps, const char *fpath)
-diff --git a/arg_packages.h b/arg_packages.h
-index 611111a..13e8ba2 100644
---- a/arg_packages.h
-+++ b/arg_packages.h
-@@ -38,7 +38,7 @@ EXPORT int arg_packages_add_pkgmaska(struct arg_packages *aps, tn_array *masks);
- EXPORT int arg_packages_add_pkgfile(struct arg_packages *aps, const char *pathname);
- EXPORT int arg_packages_add_pkglist(struct arg_packages *aps, const char *path);
- EXPORT int arg_packages_add_pkg(struct arg_packages *aps, struct pkg *pkg);
--EXPORT int arg_packages_add_pkga(struct arg_packages *aps, tn_array *pkgs);
-+EXPORT int arg_packages_add_pkgs(struct arg_packages *aps, const tn_array *pkgs);
- 
- EXPORT int arg_packages_setup(struct arg_packages *aps, struct pm_ctx *ctx);
- 
-diff --git a/poldek_ts.c b/poldek_ts.c
-index 5185f55..398aafd 100644
---- a/poldek_ts.c
-+++ b/poldek_ts.c
-@@ -943,44 +943,31 @@ static int ts_run_uninstall(struct poldek_ts *ts)
- /* just verify deps, conflicts, ordering, etc */
- static int ts_run_verify(struct poldek_ts *ts)
- {
--    int nerr = 0, rc = 1;
-+    int nerr = 0;
- 
-     //n_assert(poldek_ts_issetf(ts, POLDEK_TS_VERIFY));
- 
--    if (poldek_ts_get_arg_count(ts) == 0) {
--        logn(LOGERR, _("Nothing to do"));
-+    if (!ts_prerun(ts))
-         return 0;
--        // XXX disabled feature of whole set verification, does anybody needs that?
--        //load_sources(ts->ctx);
--
--    } else {
--        if (!ts_prerun(ts))
--            return 0;
- 
--        if (!load_sources(ts->ctx))
--            return 0;
--
--        unsigned flags = TS_MARK_DEPS | TS_MARK_VERBOSE | TS_MARK_CAPSINLINE;
--        rc = ts_mark_arg_packages(ts, flags);
--        (void)rc;               /* XXX unused for now */
--    }
-+    if (!load_sources(ts->ctx))
-+        return 0;
- 
--    /* XXX disabled feature of whole set verification
--    if (poldek_ts_get_arg_count(ts) > 0) {
--        pkgs = pkgmark_get_packages(ts->pms, PKGMARK_MARK | PKGMARK_DEP);
-+    unsigned flags = TS_MARK_DEPS | TS_MARK_CAPSINLINE;
- 
-+    if (poldek_ts_get_arg_count(ts) == 0) { /* no args */
-+        arg_packages_add_pkgs(ts->aps, ts->ctx->ps->pkgs);
-     } else {
--        pkgs = n_ref(ts->ctx->ps->pkgs);
-+        flags |= TS_MARK_VERBOSE;
-     }
- 
--    if (pkgs == NULL)
--        return 0;
--    */
-+    ts_mark_arg_packages(ts, flags);
- 
-     tn_array *pkgs = pkgmark_get_packages(ts->pms, PKGMARK_ANY);
-     if (pkgs == NULL)
-         return 0;
- 
-+    /* just print errors here, deps are already verified by ts_mark_arg_packages */
-     if (ts->getop(ts, POLDEK_OP_VRFY_DEPS)) {
-         msgn(3, _("Verifying dependencies..."));
-         if (pkgmark_log_unsatisfied_dependecies(ts->pms) > 0)
diff --git a/rpm6.patch b/rpm6.patch
deleted file mode 100644
index 8e34ac9..0000000
--- a/rpm6.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- poldek-0.44.0/configure.ac~	2025-10-05 17:16:05.000000000 +0200
-+++ poldek-0.44.0/configure.ac	2025-10-05 17:17:17.933330679 +0200
-@@ -272,7 +272,7 @@
- 
- 
- AC_MSG_CHECKING([for rpmorg (>= 4.14)])
--PKG_CHECK_EXISTS([rpm >= 4.14 rpm < 5.0], [is_rpmorg=yes], [is_rpmorg=no])
-+PKG_CHECK_EXISTS([rpm >= 6.0], [is_rpmorg=yes], [PKG_CHECK_EXISTS([rpm >= 4.14 rpm < 5.0], [is_rpmorg=yes], [is_rpmorg=no])])
- if test "${is_rpmorg}." = "yes."; then
-     AC_MSG_RESULT(yes)
-     AM_CONDITIONAL(WITH_RPMORG, true)
-@@ -286,7 +286,7 @@
- fi
- 
- AC_MSG_CHECKING([for rpm5])
--PKG_CHECK_EXISTS([rpm >= 5.0], [is_rpm5=yes], [is_rpm5=no])
-+PKG_CHECK_EXISTS([rpm >= 5.0 rpm < 6.0], [is_rpm5=yes], [is_rpm5=no])
- 
- if test "${is_rpm5}." = "yes."; then
-     AC_DEFINE([HAVE_RPM_5], [1], [])
diff --git a/verify-fix.patch b/verify-fix.patch
deleted file mode 100644
index 7951b1a..0000000
--- a/verify-fix.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-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;
-diff --git a/cli/dent.c b/cli/dent.c
-index b24a723..f4cd4bb 100644
---- a/cli/dent.c
-+++ b/cli/dent.c
-@@ -36,13 +36,14 @@ struct pkg_dent *pkg_dent_new(struct poclidek_ctx *cctx, const char *name,
-                               struct pkg *pkg, int flags, const char *dirpath)
- {
-     struct pkg_dent *ent;
--    int dirpath_at = 0, dirpath_len = 0, len = 0;
-+    int name_len = 0, dirpath_at = 0, dirpath_len = 0, len = 0;
- 
-     if (name) {
-         while (*name == '/')
-             name++;
- 
--        len += strlen(name) + 1;
-+        name_len = strlen(name);
-+        len += name_len + 1;
-         n_assert(flags & PKG_DENT_DIR);
-         n_assert(dirpath);
- 
-@@ -60,7 +61,7 @@ struct pkg_dent *pkg_dent_new(struct poclidek_ctx *cctx, const char *name,
-     if (name) {
-         char *p;
- 
--        memcpy(ent->_buf, name, len);
-+        memcpy(ent->_buf, name, name_len + 1);
-         ent->name = ent->_buf;
- 
-         if (dirpath) {
-diff --git a/cli/ls.c b/cli/ls.c
-index 0027ee0..e2bc01d 100644
---- a/cli/ls.c
-+++ b/cli/ls.c
-@@ -585,9 +585,10 @@ int do_ls(const tn_array *ents, struct cmdctx *cmdctx, const tn_array *evrs)
-             cmdctx_printf(cmdctx, "%-*s %-*s\n",
- 			  term_width_div2 + term_width_div2/10 - 1, pkg_name,
- 			  (term_width/7), group ? group : "(unset)");
--	}
--        else if (flags & OPT_LS_SOURCERPM) {
--            const char *srcrpm = pkg_srcfilename_s(pkg);
-+	} else if (flags & OPT_LS_SOURCERPM) {
-+            char buf[512];
-+            const char *srcrpm = pkg_srcfilename(pkg, buf, sizeof(buf));
-+
-             cmdctx_printf(cmdctx, "%-*s %-*s\n",
- 			  term_width_div2 + term_width_div2/10 - 1, pkg_name,
- 			  (term_width/7), srcrpm ? srcrpm : "(unset)");
-diff --git a/vfile/vfile.h b/vfile/vfile.h
-index 3b55b00..b1612f2 100644
---- a/vfile/vfile.h
-+++ b/vfile/vfile.h
-@@ -174,11 +174,11 @@ EXPORT int vf_url_as_path(char *buf, size_t size, const char *url);
- 
- /* replace password with "x" * len(password) */
- EXPORT const char *vf_url_hidepasswd(char *buf, int size, const char *url);
--#define vf_url_hidepasswd_s(url) vf_url_hidepasswd(alloca(PATH_MAX), PATH_MAX, url)
-+#define vf_url_hidepasswd_s(url) vf_url_hidepasswd(alloca(256), 256, url)
- 
- /* applies vf_url_hidepasswd() + slim down url string to maxl */
- EXPORT const char *vf_url_slim(char *buf, int size, const char *url, int maxl);
--#define vf_url_slim_s(url, maxl) vf_url_slim(alloca(PATH_MAX), PATH_MAX, url, (maxl) > 40 ? (maxl) : 40)
-+#define vf_url_slim_s(url, maxl) vf_url_slim(alloca(256), 256, url, (maxl) > 40 ? (maxl) : 40)
- 
- EXPORT char *vf_url_unescape(const char *url);
- 
-diff --git a/pkg.h b/pkg.h
-index 15a68c4..59f3e84 100644
---- a/pkg.h
-+++ b/pkg.h
-@@ -223,14 +223,14 @@ EXPORT int pkg_has_pkgcnfl(struct pkg *pkg, struct pkg *cpkg);
- 
- /* src.rpm */
- EXPORT char *pkg_srcfilename(const struct pkg *pkg, char *buf, size_t size);
--#define pkg_srcfilename_s(pkg) pkg_srcfilename(pkg, alloca(512), 512)
-+#define pkg_srcfilename_s(pkg) pkg_srcfilename(pkg, alloca(256), 256)
- 
- /* RET %path/%name-%version-%release.%arch.rpm  */
- EXPORT char *pkg_filename(const struct pkg *pkg, char *buf, size_t size);
--#define pkg_filename_s(pkg) pkg_filename(pkg, alloca(512), 512)
-+#define pkg_filename_s(pkg) pkg_filename(pkg, alloca(256), 256)
- 
- EXPORT char *pkg_path(const struct pkg *pkg, char *buf, size_t size);
--#define pkg_path_s(pkg) pkg_path(pkg, alloca(512), 512)
-+#define pkg_path_s(pkg) pkg_path(pkg, alloca(256), 256)
- 
- EXPORT char *pkg_localpath(const struct pkg *pkg, char *path, size_t size,
-                     const char *cachedir);
-@@ -251,13 +251,13 @@ EXPORT int pkg_printf(const struct pkg *pkg, const char *str);
- EXPORT int pkg_snprintf(char *str, size_t size, const struct pkg *pkg);
- EXPORT char *pkg_str(char *str, size_t size, const struct pkg *pkg);
- 
--#define pkg_snprintf_s(pkg) pkg_str(alloca(512), 512, pkg)
--#define pkg_snprintf_s0(pkg) pkg_str(alloca(512), 512, pkg)
--#define pkg_snprintf_s1(pkg) pkg_str(alloca(512), 512, pkg)
-+#define pkg_snprintf_s(pkg) pkg_str(alloca(256), 256, pkg)
-+#define pkg_snprintf_s0(pkg) pkg_str(alloca(256), 256, pkg)
-+#define pkg_snprintf_s1(pkg) pkg_str(alloca(256), 256, pkg)
- 
- EXPORT int pkg_evr_snprintf(char *str, size_t size, const struct pkg *pkg);
- EXPORT char *pkg_evr_str(char *str, size_t size, const struct pkg *pkg);
--#define pkg_evr_snprintf_s(pkg) pkg_evr_str(alloca(512), 512, pkg)
-+#define pkg_evr_snprintf_s(pkg) pkg_evr_str(alloca(256), 256, pkg)
- 
- /* must be free()d by pkguinf_free(); see pkgu.h */
- EXPORT struct pkguinf *pkg_uinf(const struct pkg *pkg);
-diff --git a/pkgdir/pkg_restore.c b/pkgdir/pkg_restore.c
-index e7e9373..8dfb4c9 100644
---- a/pkgdir/pkg_restore.c
-+++ b/pkgdir/pkg_restore.c
-@@ -202,9 +202,9 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
-     int                  tag, last_tag, tag_binsize = PKG_STORETAG_SIZENIL;
-     const  char          *errmg_double_tag = "%s:%lu: double '%c' tag";
-     const  char          *errmg_ldtag = "%s:%lu: load '%c' tag error";
-+    int                  load_full_fl = (ldflags & PKGDIR_LD_FULLFLIST);
- 
- #if 0
--    printf("FULL %d\n", (ldflags & PKGDIR_LD_FULLFLIST));
-     if (depdirs) {
-         int i;
-         printf("depdirs %p %d\n", depdirs, n_array_size(depdirs));
-@@ -387,13 +387,13 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
- 
-             case PKG_STORETAG_FL:
-                 pkgt.nodep_files_offs = n_stream_tell(st);
--                //printf("flag_fullflist %d, %p\n", flag_fullflist, depdirs);
--                if ((ldflags & PKGDIR_LD_FULLFLIST) == 0 && depdirs == NULL) {
-+                if (!load_full_fl && depdirs == NULL) {
-                     pkgfl_skip_st(st);
- 
-                 } else {
-                     tn_tuple *fl;
--                    if (pkgfl_restore_st(na, &fl, st, depdirs, 1) < 0) {
-+
-+                    if (pkgfl_restore_st(na, &fl, st, load_full_fl ? NULL : depdirs, 1) < 0) {
-                         logn(LOGERR, errmg_ldtag, fn, ul_offs, *line);
-                         nerr++;
-                         goto l_end;
-@@ -422,6 +422,10 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
- 
-                         pkgt.pkgfl = ffl;
-                     }
-+
-+                    pkgt.flags |= PKGT_HAS_FILES;
-+                    if (load_full_fl)
-+                        pkgt.flags |= PKGT_HAS_ALLFILES;
-                 }
-                 break;
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/af34ebb05652c09a3c84c08be061ac7803b24ca6



More information about the pld-cvs-commit mailing list