From: Marcin Krol Date: Tue, 19 May 2026 16:15:13 +0000 (+0200) Subject: - merged 0.45.0 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;ds=inline;p=packages%2Fpoldek.git - merged 0.45.0 from PLD --- 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/gcc15.patch b/gcc15.patch deleted file mode 100644 index 205f933..0000000 --- a/gcc15.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ur poldek-0.44.0.orig/conf.c poldek-0.44.0/conf.c ---- poldek-0.44.0.orig/conf.c 2025-02-26 12:40:22.000000000 +0100 -+++ poldek-0.44.0/conf.c 2025-08-10 22:26:33.098247697 +0200 -@@ -1458,33 +1458,33 @@ - int poldek_conf_get_bool(const tn_hash *htconf, const char *name, int default_v) - { - const char *v; -- int bool; -+ int bit; - - if ((v = poldek_conf_get(htconf, name, NULL)) == NULL) - return default_v; - -- if ((bool = poldek_util_parse_bool(v)) < 0) { -+ if ((bit = poldek_util_parse_bool(v)) < 0) { - logn(LOGERR, _("invalid value ('%s') of boolean option '%s'"), v, name); -- bool = default_v; -+ bit = default_v; - } - -- return bool; -+ return bit; - } - - int poldek_conf_get_bool3(const tn_hash *htconf, const char *name, int default_v) - { - const char *v; -- int bool; -+ int bit; - - if ((v = poldek_conf_get(htconf, name, NULL)) == NULL) - return default_v; - -- if ((bool = poldek_util_parse_bool3(v)) < 0) { -+ if ((bit = poldek_util_parse_bool3(v)) < 0) { - logn(LOGERR, _("invalid value ('%s') of option '%s'"), v, name); -- bool = default_v; -+ bit = default_v; - } - -- return bool; -+ return bit; - } - - 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 -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 -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/poldek-dup-sources.patch b/poldek-dup-sources.patch new file mode 100644 index 0000000..f98da4a --- /dev/null +++ b/poldek-dup-sources.patch @@ -0,0 +1,143 @@ +commit bd97788fa990b4b2cd957c540399cec35afab526 +Author: Arkadiusz Miśkiewicz +Date: Tue Apr 14 16:26:11 2026 +0200 + + Show config file origin when removing duplicated sources + + Print which config file:line each duplicated source was defined at, + making it easy to find and fix the duplication. + + Also fix conf.c filemark formatting: remove trailing colon from + stored __file__line value and format strings to avoid double-colon + artifacts in error messages. + +diff --git a/conf.c b/conf.c +index 83e625f6..f9f775b0 100644 +--- a/conf.c ++++ b/conf.c +@@ -505,7 +505,7 @@ static int verify_param_presence(tn_hash *ht_sect, const char *section, + + if (overwrite || (tag->flags & CONF_TYPE_F_MULTI_EXCL)) { + if (!overwrite || poldek_VERBOSE > 1) +- logn(LOGWARN, _("%s %s::%s redefined"), filemark, section, name); ++ logn(LOGWARN, _("%s: %s::%s redefined"), filemark, section, name); + n_hash_remove(ht_sect, name); + + } else if ((tag->flags & CONF_TYPE_F_MULTI) == 0) { +@@ -541,9 +541,9 @@ static int add_param(tn_hash *ht_sect, const char *section, + validate = (flags & ADD_PARAM_VALIDATE); + + if (path) +- n_snprintf(filemark, sizeof(filemark), "%s:%d:", path, nline); ++ n_snprintf(filemark, sizeof(filemark), "%s:%d", path, nline); + else +- n_snprintf(filemark, sizeof(filemark), "config:"); ++ n_snprintf(filemark, sizeof(filemark), "config"); + + if ((tagindex = find_tag(section, name, §)) == -1) { + if (*name == '_') /* internal or _macro */ +@@ -554,7 +554,7 @@ static int add_param(tn_hash *ht_sect, const char *section, + tag = &unknown_tag; + + } else { +- logn(LOGWARN, _("%s unknown option '%s::%s'"), filemark, ++ logn(LOGWARN, _("%s: unknown option '%s::%s'"), filemark, + section, name); + return 0; + } +@@ -604,7 +604,7 @@ static int add_param(tn_hash *ht_sect, const char *section, + val = ""; + + if (val == NULL) { +- logn(LOGERR, _("%s invalid value of '%s::%s'"), filemark, section, name); ++ logn(LOGERR, _("%s: invalid value of '%s::%s'"), filemark, section, name); + return 0; + } + +@@ -618,7 +618,7 @@ static int add_param(tn_hash *ht_sect, const char *section, + } + + if (!valid) { +- logn(LOGWARN, _("%s invalid value '%s' of '%s::%s'"), filemark, ++ logn(LOGWARN, _("%s: invalid value '%s' of '%s::%s'"), filemark, + val, section, name); + return 0; + } +@@ -826,7 +826,7 @@ static tn_hash *open_section_ht(tn_hash *htconf, + char filemark[PATH_MAX]; + struct copt *opt; + +- n_snprintf(filemark, sizeof(filemark), "%s:%d:", path, nline); ++ n_snprintf(filemark, sizeof(filemark), "%s:%d", path, nline); + opt = copt_new("__file__line"); + opt->val = n_strdup(filemark); + n_hash_insert(ht_sect, opt->name, opt); +diff --git a/pkgdir/source.c b/pkgdir/source.c +index 28c0049f..8d23592d 100644 +--- a/pkgdir/source.c ++++ b/pkgdir/source.c +@@ -176,6 +176,7 @@ struct source *source_malloc(void) + //src->flags |= PKGSOURCE_PRI; + src->name = src->path = src->pkg_prefix = NULL; + src->group = src->dscr = NULL; ++ src->config_origin = NULL; + src->lc_lang = NULL; + src->_refcnt = 0; + src->exclude_path = n_array_new(4, free, (tn_fn_cmp)strcmp); +@@ -213,6 +214,7 @@ struct source *source_clone(const struct source *src) + cp_str_ifnotnull(&nsrc->group, src->group); + cp_str_ifnotnull(&nsrc->lc_lang, src->lc_lang); + cp_str_ifnotnull(&nsrc->original_type, src->original_type); ++ cp_str_ifnotnull(&nsrc->config_origin, src->config_origin); + + n_array_free(nsrc->exclude_path); + nsrc->exclude_path = n_ref(src->exclude_path); +@@ -241,6 +243,7 @@ void source_free(struct source *src) + n_cfree(&src->group); + n_cfree(&src->lc_lang); + n_cfree(&src->original_type); ++ n_cfree(&src->config_origin); + + if (src->exclude_path) + n_array_free(src->exclude_path); +@@ -662,6 +665,10 @@ struct source *source_new_htcnf(const tn_hash *htcnf) + if (vs) + src->original_type = n_strdup(vs); + ++ vs = poldek_conf_get(htcnf, "__file__line", NULL); ++ if (vs) ++ src->config_origin = n_strdup(vs); ++ + get_conf_opt_list(htcnf, "exclude path", src->exclude_path); + get_conf_opt_list(htcnf, "ignore", src->ign_patterns); + return src; +@@ -687,11 +694,16 @@ int source_cmp_uniq(const struct source *s1, const struct source *s2) + rc = strcmp(n1, n2); + } + +- if (rc == 0) ++ if (rc == 0) { + logn(LOGWARN, _("removed duplicated source %s%s%s"), + (s2->flags & PKGSOURCE_NAMED) ? s2->name : "", + (s2->flags & PKGSOURCE_NAMED) ? " -- " : "", + s2->path); ++ if (s1->config_origin || s2->config_origin) ++ logn(LOGWARN, _(" defined at %s and %s"), ++ s1->config_origin ? s1->config_origin : "(unknown)", ++ s2->config_origin ? s2->config_origin : "(unknown)"); ++ } + + return rc; + } +diff --git a/pkgdir/source.h b/pkgdir/source.h +index 6052ec25..b93639b5 100644 +--- a/pkgdir/source.h ++++ b/pkgdir/source.h +@@ -55,6 +55,7 @@ struct source { + tn_array *exclude_path; + tn_array *ign_patterns; /* ignore package patterns */ + char *original_type; /* type of source repo for this source */ ++ char *config_origin; /* config file:line where source was defined */ + unsigned subopt_flags; + int _refcnt; + char *group; diff --git a/poldek-env-columns-lines.patch b/poldek-env-columns-lines.patch new file mode 100644 index 0000000..89198e5 --- /dev/null +++ b/poldek-env-columns-lines.patch @@ -0,0 +1,65 @@ +commit bcf31cc1653155c93ad4b2b1a17d2301ac70d36b +Author: Arkadiusz Miśkiewicz +Date: Tue Apr 14 17:45:51 2026 +0200 + + Use $COLUMNS as fallback when ioctl fails to get terminal width + + When stdout is not a tty (e.g. piped output), ioctl TIOCGWINSZ fails + and terminal width falls back to 80 columns, causing unnecessary URL + truncation. Check $COLUMNS environment variable before falling back + to the default. + +diff --git a/poldek_term.c b/poldek_term.c +index 9d4f9a87..6fbf7d82 100644 +--- a/poldek_term.c ++++ b/poldek_term.c +@@ -245,15 +245,34 @@ static void update_term_width(void) + + if (winch_reached) { + char tmp[256]; ++ term_width = TERM_DEFAULT_WIDTH; ++ term_height = TERM_DEFAULT_HEIGHT; ++ + if (ioctl(1, TIOCGWINSZ, &ws) == 0) { + term_width = ws.ws_col; + term_height = ws.ws_row; + + } else { +- term_width = TERM_DEFAULT_WIDTH; +- term_height = TERM_DEFAULT_HEIGHT; ++ const char *cols = getenv("COLUMNS"); ++ if (cols) { ++ int n = atoi(cols); ++ if (n > 0) ++ term_width = n; ++ } ++ ++ const char *rows = getenv("LINES"); ++ if (rows) { ++ int n = atoi(rows); ++ if (n > 0) ++ term_height = n; ++ } + } + ++ if (term_width < TERM_MIN_WIDTH) ++ term_width = TERM_MIN_WIDTH; ++ if (term_height < TERM_MIN_HEIGHT) ++ term_height = TERM_MIN_HEIGHT; ++ + //https://www.gnu.org/software/libc/manual/html_node/Argp-User-Customization.html + snprintf(tmp, sizeof(tmp), "no-dup-args-note,rmargin=%d", term_width - 1); + setenv("ARGP_HELP_FMT", tmp, 1); +diff --git a/poldek_term.h b/poldek_term.h +index 80e6d5a6..2b1db740 100644 +--- a/poldek_term.h ++++ b/poldek_term.h +@@ -25,6 +25,8 @@ + + #define TERM_DEFAULT_WIDTH 80 + #define TERM_DEFAULT_HEIGHT 24 ++#define TERM_MIN_WIDTH 40 ++#define TERM_MIN_HEIGHT 4 + + #include /* for size_t */ + diff --git a/poldek-global-ignore-merges.patch b/poldek-global-ignore-merges.patch new file mode 100644 index 0000000..e7776a7 --- /dev/null +++ b/poldek-global-ignore-merges.patch @@ -0,0 +1,193 @@ +commit aea999f2f1cb86579bc8fef9f5393120d12f863b +Author: Arkadiusz Miśkiewicz +Date: Wed Apr 22 09:50:32 2026 +0200 + + fix: apply [global] + per-source ignore across all pkg paths + + [global] ignore = ... was silently replaced by any per-source + ignore = ... entry rather than extended, so global patterns were + lost on every source with its own ignore line. And the stub-index + load path (poldek --cmd "ls", search, etc.) bypassed ignore + filtering entirely for PKGDIR_CAP_HANDLEIGNORE modules -- that cap + only covers the full do_load path, not the separate stub .zst + cache loaded by load_stubindex. + + - lib_init.c: always concat [global] ign_patterns into src's. + - lib_pkgset.c: in poldek_load_stubs, post-filter per-source stubs + via src->ign_patterns, symmetric with the full-load path and + gated by POLDEK_OP_IGNORE. + - pkgdir/pkgdir_stubindex.c: source_stubload is now a pure loader; + the HANDLEIGNORE guard there was dropping filtering entirely for + pndir sources in the stub path. + +diff --git a/doc/poldek.conf.xml b/doc/poldek.conf.xml +index 86cb545b..828bb683 100644 +--- a/doc/poldek.conf.xml ++++ b/doc/poldek.conf.xml +@@ -395,7 +395,10 @@ and [filename]*-source.conf[/filename], file getters are declared in + +