From 0371fe110c410e124f4295eac7f69c14382622c1 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Wed, 23 Apr 2008 18:32:21 +0000 Subject: [PATCH] This commit was manufactured by cvs2git to create tag 'auto-ti-poldek- 0_30-0_20080225_00_8'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sprout from master 2008-04-21 11:45:48 UTC Marcin Banasiak '- fixes pld#139' Cherrypick from master 2008-04-23 18:32:21 UTC Elan Ruusamäe '- restore lost hold kernel and choose equivalents manually options; rel 8': poldek.spec -> 1.332 Cherrypick from unlabeled-1.13.2 2008-03-11 18:44:50 UTC hawk '- noauto for main tree': poldek-multilib.conf -> 1.13.2.2 Cherrypick from unlabeled-1.47.2 2007-09-27 17:20:54 UTC hawk '- adjusted for PLD Titanium': poldek.conf -> 1.47.2.1 Delete: poldek-as_needed-fix.patch poldek-dir-dot.patch poldek-install-dist.patch poldek-ndie_fix.patch poldek-nohold-fix.patch poldek-reversed-prompt.patch poldek-su-sigsev.patch poldek-suggests-one-package.patch poldek-uninstall-depfix.patch poldek-uri-escape-fix.patch --- poldek-as_needed-fix.patch | 12 -- poldek-dir-dot.patch | 13 -- poldek-install-dist.patch | 11 -- poldek-multilib.conf | 31 +--- poldek-ndie_fix.patch | 44 ----- poldek-nohold-fix.patch | 38 ----- poldek-reversed-prompt.patch | 12 -- poldek-su-sigsev.patch | 109 ------------ poldek-suggests-one-package.patch | 264 ------------------------------ poldek-uninstall-depfix.patch | 174 -------------------- poldek-uri-escape-fix.patch | 19 --- poldek.conf | 39 ++--- poldek.spec | 4 +- 13 files changed, 21 insertions(+), 749 deletions(-) delete mode 100644 poldek-as_needed-fix.patch delete mode 100644 poldek-dir-dot.patch delete mode 100644 poldek-install-dist.patch delete mode 100644 poldek-ndie_fix.patch delete mode 100644 poldek-nohold-fix.patch delete mode 100644 poldek-reversed-prompt.patch delete mode 100644 poldek-su-sigsev.patch delete mode 100644 poldek-suggests-one-package.patch delete mode 100644 poldek-uninstall-depfix.patch delete mode 100644 poldek-uri-escape-fix.patch diff --git a/poldek-as_needed-fix.patch b/poldek-as_needed-fix.patch deleted file mode 100644 index 9aabc46..0000000 --- a/poldek-as_needed-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur poldek-0.20/vfile/Makefile.am poldek-0.20.as_needed-fix/vfile/Makefile.am ---- poldek-0.20/vfile/Makefile.am 2005-05-15 17:16:13.000000000 +0200 -+++ poldek-0.20.as_needed-fix/vfile/Makefile.am 2006-08-02 01:46:42.000000000 +0200 -@@ -22,7 +22,7 @@ - vfffmod.c $(VFCURL_SRCS_) \ - vopen3.c vopen3.h vfile_intern.h - --libvfile_la_LIBADD = vfff/libvfff.la -+libvfile_la_LIBADD = vfff/libvfff.la -lutil - - pkgincludedir = $(includedir)/vfile - pkginclude_HEADERS = vfile.h p_open.h vopen3.h diff --git a/poldek-dir-dot.patch b/poldek-dir-dot.patch deleted file mode 100644 index 20e2e34..0000000 --- a/poldek-dir-dot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urN poldek-0.21-cvs20070703.00.org/misc.c poldek-0.21-cvs20070703.00/misc.c ---- poldek-0.21-cvs20070703.00.org/misc.c 2007-07-02 20:30:48.000000000 +0200 -+++ poldek-0.21-cvs20070703.00/misc.c 2007-11-22 18:09:26.899099602 +0100 -@@ -526,6 +526,9 @@ - { - if (strstr(path, "./") == NULL) - return NULL; -+ -+ if (strncmp(path, ".", 1) == 0) -+ return get_current_dir_name(); - - #ifdef HAVE_CANONICALIZE_FILE_NAME /* have safe GNU ext? */ - return realpath(path, NULL); diff --git a/poldek-install-dist.patch b/poldek-install-dist.patch deleted file mode 100644 index a460584..0000000 --- a/poldek-install-dist.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- poldek/install-dist.c~ 2007-07-01 23:04:26.000000000 +0200 -+++ poldek/install-dist.c 2007-09-23 15:45:51.812485873 +0200 -@@ -232,6 +232,8 @@ - - rc = 1; - -+ pkgs = pkgmark_get_packages(ts->pms, PKGMARK_MARK | PKGMARK_DEP); -+ - ignorer = ts->getop(ts, POLDEK_OP_NODEPS); - if (!packages_verify_dependecies(pkgs, ts->ctx->ps) && !ignorer) - nerr++; diff --git a/poldek-multilib.conf b/poldek-multilib.conf index 4c40340..94c5157 100644 --- a/poldek-multilib.conf +++ b/poldek-multilib.conf @@ -1,44 +1,29 @@ -# Alternative multilib PLD 3.0 (Th) +# PLD Titanium, multilib config +# Unofficial version of PLD Linux Distribution +# http://www.pld-linux.org/Titanium + _arch = %ARCH% -_prefix = ftp://ftp.th.pld-linux.org/dists/th -## Some mirrors -## You can use them if you have better connection there -# CI TASK: -#_prefix = ftp://ftp.task.pld-linux.org/dists/th +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium _type = pndir [source] type = %{_type} -name = th-%{_arch} +name = titanium-%{_arch} path = %{_prefix}/PLD/%{_arch}/RPMS/ auto = no autoup = no -#[source] -#type = %{_type} -#name = th-%{_arch}-updates -#path = %{_prefix}/updates/%{_arch}/RPMS/ -#auto = no -#autoup = no - -#[source] -#type = %{_type} -#name = th-%{_arch}-supported -#path = %{_prefix}/supported/%{_arch}/ -#auto = no -#autoup = no - [source] type = %{_type} -name = th-%{_arch}-ready +name = titanium-ready-%{_arch} path = %{_prefix}/ready/%{_arch}/RPMS/ auto = no autoup = no [source] type = %{_type} -name = th-%{_arch}-test +name = titanium-test-%{_arch} path = %{_prefix}/test/%{_arch}/RPMS/ auto = no autoup = no diff --git a/poldek-ndie_fix.patch b/poldek-ndie_fix.patch deleted file mode 100644 index 6718063..0000000 --- a/poldek-ndie_fix.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: install/install.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/install/install.c,v -retrieving revision 1.10 -diff -u -r1.10 install.c ---- install/install.c 1 Jul 2007 21:04:26 -0000 1.10 -+++ install/install.c 4 Jul 2007 13:41:03 -0000 -@@ -327,6 +327,12 @@ - return nmarked; - } - -+static void ts_reset(struct poldek_ts *ts) -+{ -+ pkgmark_massset(ts->pms, 0, PKGMARK_MARK | PKGMARK_DEP); -+ n_hash_clean(ts->ts_summary); -+} -+ - int in_do_poldek_ts_install(struct poldek_ts *ts) - { - int i, nmarked = 0, nerr = 0, n, is_particle; -@@ -422,7 +428,7 @@ - if (!do_install(&ictx)) - nerr++; - -- pkgmark_massset(ts->pms, 0, PKGMARK_MARK | PKGMARK_DEP); -+ ts_reset(ictx.ts); - install_ctx_reset(&ictx); - } - } -Index: log.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/log.c,v -retrieving revision 1.32 -diff -u -r1.32 log.c ---- log.c 2 Jul 2007 17:08:38 -0000 1.32 -+++ log.c 4 Jul 2007 13:44:04 -0000 -@@ -173,7 +173,6 @@ - /* auto line break for errors and warnings */ - if (!last_endlined && !is_continuation && (pri & (LOGERR|LOGWARN))) { - buf[buf_len++] = '\n'; -- n_assert(0); - } - - last_endlined = is_endlined; diff --git a/poldek-nohold-fix.patch b/poldek-nohold-fix.patch deleted file mode 100644 index 3cb1a79..0000000 --- a/poldek-nohold-fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -urN poldek/cli/install.c poldek.new/cli/install.c ---- poldek/cli/install.c 2007-07-01 23:04:26.000000000 +0200 -+++ poldek.new/cli/install.c 2007-11-17 18:19:06.000000000 +0100 -@@ -174,6 +174,9 @@ - {"hold", OPT_INST_HOLD, "PACKAGE[,PACKAGE]...", 0, - N_("Prevent packages listed from being upgraded if they are already installed."), - OPT_GID }, -+ -+{"nohold", OPT_INST_NOHOLD, 0, 0, -+ N_("Do not hold any packages. Disables --hold settings."), OPT_GID }, - - {"ignore", OPT_INST_IGNORE, "PACKAGE[,PACKAGE]...", 0, - N_("Make packages listed invisible."), OPT_GID }, -@@ -323,17 +326,21 @@ - poldek_configure(ts->ctx, POLDEK_CONF_ROOTDIR, arg); - break; - -- - case OPT_INST_HOLD: - poldek_configure(ts->ctx, POLDEK_CONF_OPT, POLDEK_OP_HOLD, 1); - poldek_configure(ts->ctx, POLDEK_CONF_HOLD, arg); - break; -- -+ -+ case OPT_INST_NOHOLD: -+ ts->setop(ts, POLDEK_OP_HOLD, 0); -+ poldek_configure(ts->ctx, POLDEK_CONF_OPT, POLDEK_OP_HOLD, 0); -+ break; -+ - case OPT_INST_IGNORE: - poldek_configure(ts->ctx, POLDEK_CONF_OPT, POLDEK_OP_IGNORE, 1); - poldek_configure(ts->ctx, POLDEK_CONF_IGNORE, arg); - break; -- -+ - case OPT_INST_NOIGNORE: - ts->setop(ts, POLDEK_OP_IGNORE, 0); - poldek_configure(ts->ctx, POLDEK_CONF_OPT, POLDEK_OP_IGNORE, 0); diff --git a/poldek-reversed-prompt.patch b/poldek-reversed-prompt.patch deleted file mode 100644 index ef93034..0000000 --- a/poldek-reversed-prompt.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN poldek-0.21-cvs20070703.00/pm/rpm/rpminstall.c poldek-0.21-cvs20070703.00.new/pm/rpm/rpminstall.c ---- poldek-0.21-cvs20070703.00/pm/rpm/rpminstall.c 2007-07-01 23:04:27.000000000 +0200 -+++ poldek-0.21-cvs20070703.00.new/pm/rpm/rpminstall.c 2008-02-20 21:34:24.000000000 +0100 -@@ -434,7 +434,7 @@ - int can_ask = poldek_ts_is_interactive_on(ts); - - if (nsignerr) { -- if (!can_ask || poldek__confirm(ts, 0, -+ if (!can_ask || !poldek__confirm(ts, 0, - _("There were signature verification errors. " - "Proceed?"))) - goto l_err_end; diff --git a/poldek-su-sigsev.patch b/poldek-su-sigsev.patch deleted file mode 100644 index 740d680..0000000 --- a/poldek-su-sigsev.patch +++ /dev/null @@ -1,109 +0,0 @@ -Index: conf.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/conf.c,v -retrieving revision 1.84 -diff -u -r1.84 conf.c ---- conf.c 27 Jun 2007 21:47:43 -0000 1.84 -+++ conf.c 28 Jun 2007 15:47:04 -0000 -@@ -944,6 +944,9 @@ - addparam_flags |= ADD_PARAM_FOREIGN; - } - -+ if (flags & POLDEK_LDCONF_NOVALIDATE) -+ validate = 0; -+ - if (flags & POLDEK_LDCONF_UPDATE) - update = 1; - -Index: conf.h -=================================================================== -RCS file: /cvsroot/poldek/poldek/conf.h,v -retrieving revision 1.18 -diff -u -r1.18 conf.h ---- conf.h 27 Jun 2007 00:44:47 -0000 1.18 -+++ conf.h 28 Jun 2007 15:47:04 -0000 -@@ -6,10 +6,11 @@ - #include - #include - --#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek file */ --#define POLDEK_LDCONF_UPDATE (1 << 1) /* resync with remote config */ --#define POLDEK_LDCONF_NOINCLUDE (1 << 2) /* ignore %include directives */ --#define POLDEK_LDCONF_GLOBALONLY (1 << 9) /* for early cachedir setup */ -+#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek config file */ -+#define POLDEK_LDCONF_NOVALIDATE (1 << 1) /* do not validate config variables */ -+#define POLDEK_LDCONF_UPDATE (1 << 2) /* resync with remote config */ -+#define POLDEK_LDCONF_NOINCLUDE (1 << 3) /* ignore %include directives */ -+#define POLDEK_LDCONF_GLOBALONLY (1 << 4) /* for early cachedir setup */ - - /* default localization is used if path is NULL */ - tn_hash *poldek_conf_load(const char *path, unsigned flags); -Index: cli/main.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/cli/main.c,v -retrieving revision 1.56 -diff -u -r1.56 main.c ---- cli/main.c 27 Jun 2007 00:44:47 -0000 1.56 -+++ cli/main.c 28 Jun 2007 15:47:05 -0000 -@@ -587,7 +587,8 @@ - } else if (noautosu == 0 && getuid() == 0) { /* check config's runas */ - tn_hash *cnf; - -- cnf = poldek_conf_load_default(POLDEK_LDCONF_NOINCLUDE | POLDEK_LDCONF_FOREIGN); -+ cnf = poldek_conf_load_default(POLDEK_LDCONF_GLOBALONLY | -+ POLDEK_LDCONF_NOVALIDATE); - if (cnf) { - tn_hash *global; - const char *u; -Index: tests/sh/04-conf -=================================================================== -RCS file: /cvsroot/poldek/poldek/tests/sh/04-conf,v -retrieving revision 1.2 -diff -u -r1.2 04-conf ---- tests/sh/04-conf 27 Jun 2007 21:47:42 -0000 1.2 -+++ tests/sh/04-conf 28 Jun 2007 15:47:05 -0000 -@@ -28,12 +28,43 @@ - - is_verbose_mode && $poldek_l - -- n=$($poldek_l | grep -vE '^dbg:' | wc -l) -+ n=$($poldek_l | grep 'test://' | wc -l) - assertEquals "2 sources expected" "$n" "2" - - n=$($poldek_l | grep -E '^test[12] ' | wc -l) - assertEquals "2 sources expected, but not those" "$n" "2" - } -+ -+testConfAsRoot() -+{ -+ create_local_conf -+ msgn "--conf" -+ poldek_l="$POLDEK --conf $TMPDIR/poldek.conf -q -l" -+ -+ is_verbose_mode && $poldek_l -+ -+ n=$(fakeroot $poldek_l | grep 'test://' | wc -l) -+ assertEquals "2 sources expected" "$n" "2" -+ -+ n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l) -+ assertEquals "2 sources expected, but not those" "$n" "2" -+ -+ msgn "default conf" -+ mkdir $TMPDIR/home || fail "mkdir" -+ mv -f $TMPDIR/poldek.conf $TMPDIR/home/.poldekrc -+ HOME=$TMPDIR/home -+ export HOME -+ -+ poldek_l="$POLDEK -q -l" -+ is_verbose_mode && $poldek_l -+ -+ n=$(fakeroot $poldek_l | grep 'test://' | wc -l) -+ assertEquals "2 sources expected" "$n" "2" -+ -+ n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l) -+ assertEquals "2 sources expected, but not those" "$n" "2" -+} -+ - - testConfInclude() - { diff --git a/poldek-suggests-one-package.patch b/poldek-suggests-one-package.patch deleted file mode 100644 index 85f7164..0000000 --- a/poldek-suggests-one-package.patch +++ /dev/null @@ -1,264 +0,0 @@ -diff -urN poldek/ask.c poldek.new/ask.c ---- poldek/ask.c 2007-07-08 18:48:11.000000000 +0200 -+++ poldek.new/ask.c 2007-11-18 18:55:32.000000000 +0100 -@@ -87,6 +87,38 @@ - return answer; - } - -+static int term_sugs_confirm(void *foo, const struct poldek_ts *ts, int hint, -+ const char *question) -+{ -+ const char *yn = "[Y/n/c]"; -+ int a; -+ -+ foo = foo; -+ ts = ts; -+ -+ if (!isatty(STDIN_FILENO)) -+ return hint; -+ -+ if (hint == 0) /* no */ -+ yn = "[N/y/c]"; -+ -+ poldek_log(LOGINFO, "%s %s", question, yn); -+ -+ a = poldek_term_ask(STDIN_FILENO, "YyNnCc\n", NULL); -+ a = toupper(a); -+ switch(a) { -+ case 'Y': a = 1; break; -+ case 'N': a = 0; break; -+ case 'C': a = -1; break; -+ case '\n': a = hint; break; -+ default: -+ n_assert(0); -+ } -+ -+ msg(-1, "_\n"); -+ return a; -+} -+ - static int term_choose_pkg(void *foo, const struct poldek_ts *ts, - const char *capname, tn_array *pkgs, int hint) - { -@@ -152,6 +184,15 @@ - return ts->ctx->ts_confirm_fn(ts->ctx->data_ts_confirm_fn, ts); - } - -+int poldek__sugs_confirm(const struct poldek_ts *ts, int hint, const char *message) -+{ -+ if (ts->ctx->sugs_confirm_fn == NULL) -+ return hint; -+ -+ return ts->ctx->sugs_confirm_fn(ts->ctx->data_sugs_confirm_fn, ts, hint, message); -+} -+ -+ - int poldek__choose_equiv(const struct poldek_ts *ts, - const char *capname, tn_array *pkgs, struct pkg *hint) - { -@@ -181,6 +222,9 @@ - ctx->data_ts_confirm_fn = NULL; - ctx->ts_confirm_fn = term_ts_confirm; - -+ ctx->data_sugs_confirm_fn = NULL; -+ ctx->sugs_confirm_fn = term_sugs_confirm; -+ - ctx->data_choose_equiv_fn = NULL; - ctx->choose_equiv_fn = term_choose_pkg; - } -diff -urN poldek/install/requirements.c poldek.new/install/requirements.c ---- poldek/install/requirements.c 2007-07-12 23:29:26.000000000 +0200 -+++ poldek.new/install/requirements.c 2007-11-18 18:42:27.000000000 +0100 -@@ -244,46 +244,94 @@ - } - - /* just append sugs to reqs if user wants to */ --static tn_array *process_suggets(struct pkg *pkg, struct poldek_ts *ts) -+static tn_array *process_suggests(struct pkg *pkg, struct install_ctx *ictx) - { - char *confirmation, message[2048]; -- tn_array *reqs; -+ tn_array *reqs, *sugs; - tn_buf *nbuf; -- int n; -+ int i, j, n; - - reqs = pkg->reqs; - -- if (pkg->sugs == NULL || !in_is_user_choosable_equiv(ts)) -+ if (pkg->sugs == NULL || !in_is_user_choosable_equiv(ictx->ts)) - return reqs; - -- if (!ts->getop(ts, POLDEK_OP_SUGGESTS)) -+ if (!ictx->ts->getop(ictx->ts, POLDEK_OP_SUGGESTS)) - return reqs; - -- nbuf = capreq_arr_join(pkg->sugs, NULL, NULL); -- -- -+ /* Array sugs will contain packages which are suggested and not installed */ -+ sugs = capreq_arr_new(n_array_size(pkg->sugs)); -+ -+ for (i = 0; i < n_array_size(pkg->sugs); i++) -+ { -+ struct capreq *suggest = n_array_nth(pkg->sugs, i); -+ -+ /* Check if package is already installed */ -+ if (!pkgdb_match_req(ictx->ts->db, suggest, ictx->strict, ictx->uninst_set->dbpkgs)) -+ { -+ n_array_push(sugs, suggest); -+ } -+ } -+ -+ if (n_array_size(sugs) == 0) -+ return reqs; -+ -+ nbuf = capreq_arr_join(sugs, NULL, NULL); - n = n_snprintf(message, sizeof(message), _("%s suggests installation of: %s"), - pkg_id(pkg), n_buf_ptr(nbuf)); - n_buf_free(nbuf); - -- confirmation = ngettext("Try to install it?", "Try to install them?", -- n_array_size(pkg->sugs)); -+ confirmation = ngettext("Try to install it?", "Try to install them?", n_array_size(sugs)); - n_snprintf(&message[n], sizeof(message) - n, "\n%s", confirmation); - -- if (poldek__confirm(ts, 0, message)) { -- int i; -- -- reqs = capreq_arr_new(n_array_size(pkg->reqs) + n_array_size(pkg->sugs)); -+ if (n_array_size(sugs) > 1) -+ { -+ int answer; -+ -+ answer = poldek__sugs_confirm(ictx->ts, 0, message); -+ -+ /* Install all suggested packages */ -+ if (answer == 1) -+ { -+ reqs = capreq_arr_new(n_array_size(pkg->reqs) + n_array_size(sugs)); - -- for (i=0; i < n_array_size(pkg->reqs); i++) -- n_array_push(reqs, n_array_nth(pkg->reqs, i)); -+ for (i=0; i < n_array_size(pkg->reqs); i++) -+ n_array_push(reqs, n_array_nth(pkg->reqs, i)); -+ for (i=0; i < n_array_size(sugs); i++) -+ n_array_push(reqs, n_array_nth(sugs, i)); -+ -+ n_array_ctl_set_freefn(reqs, NULL); /* "weak" refs */ -+ -+ return reqs; -+ } -+ /* Don't install */ -+ else if (answer == 0) -+ return reqs; -+ } -+ -+ for (j = 0; j < n_array_size(sugs); j++) -+ { -+ n = n_snprintf(message, sizeof(message), _("%s suggests installation of: %s"), -+ pkg_id(pkg), capreq_snprintf_s(n_array_nth(sugs, j))); - -- for (i=0; i < n_array_size(pkg->sugs); i++) -- n_array_push(reqs, n_array_nth(pkg->sugs, i)); -- -- n_array_ctl_set_freefn(reqs, NULL); /* "weak" refs */ -+ n_snprintf(&message[n], sizeof(message) - n, "\n%s", _("Try to install it?")); -+ -+ if (poldek__confirm(ictx->ts, 0, message)) -+ { -+ tn_array *tmpreqs; -+ -+ tmpreqs = capreq_arr_new(n_array_size(reqs) + 1); -+ -+ for (i = 0; i < n_array_size(reqs); i++) -+ n_array_push(tmpreqs, n_array_nth(reqs, i)); -+ -+ n_array_push(tmpreqs, n_array_nth(sugs, j)); -+ -+ reqs = tmpreqs; -+ -+ n_array_ctl_set_freefn(reqs, NULL); /* "weak" refs */ -+ } - } -- - return reqs; - } - -@@ -345,7 +393,7 @@ - - reqs = pkg->reqs; - if (process_as == PROCESS_AS_NEW) -- reqs = process_suggets(pkg, ictx->ts); -+ reqs = process_suggests(pkg, ictx); - - for (i=0; i < n_array_size(reqs); i++) { - struct capreq *req = n_array_nth(reqs, i); -diff -urN poldek/lib_init.c poldek.new/lib_init.c ---- poldek/lib_init.c 2007-07-09 20:31:14.000000000 +0200 -+++ poldek.new/lib_init.c 2007-11-17 22:42:56.000000000 +0100 -@@ -1226,6 +1226,15 @@ - ctx->data_ts_confirm_fn = vv; - break; - -+ case POLDEK_CONF_SUGSCONFIRM_CB: -+ if ((vv = va_arg(ap, void*))) -+ ctx->sugs_confirm_fn = vv; -+ -+ if ((vv = va_arg(ap, void*))) -+ ctx->data_sugs_confirm_fn = vv; -+ -+ break; -+ - case POLDEK_CONF_CHOOSEEQUIV_CB: - if ((vv = va_arg(ap, void*))) - ctx->choose_equiv_fn = vv; -diff -urN poldek/poldek.h poldek.new/poldek.h ---- poldek/poldek.h 2007-07-01 23:04:26.000000000 +0200 -+++ poldek.new/poldek.h 2007-11-17 21:33:31.000000000 +0100 -@@ -53,7 +53,8 @@ - #define POLDEK_CONF_GOODBYE_CB 22 - #define POLDEK_CONF_CONFIRM_CB 23 - #define POLDEK_CONF_TSCONFIRM_CB 24 --#define POLDEK_CONF_CHOOSEEQUIV_CB 25 -+#define POLDEK_CONF_SUGSCONFIRM_CB 25 -+#define POLDEK_CONF_CHOOSEEQUIV_CB 26 - - int poldek_configure(struct poldek_ctx *ctx, int param, ...); - -diff -urN poldek/poldek_intern.h poldek.new/poldek_intern.h ---- poldek/poldek_intern.h 2007-07-08 18:59:15.000000000 +0200 -+++ poldek.new/poldek_intern.h 2007-11-17 22:47:39.000000000 +0100 -@@ -38,6 +38,10 @@ - void *data_ts_confirm_fn; - int (*ts_confirm_fn)(void *data, const struct poldek_ts *ts); /* confirm transaction */ - -+ void *data_sugs_confirm_fn; -+ int (*sugs_confirm_fn)(void *data, const struct poldek_ts *ts, int hint, -+ const char *message); /* confirm suggests */ -+ - void *data_choose_equiv_fn; - int (*choose_equiv_fn)(void *data, const struct poldek_ts *ts, - const char *cap, tn_array *pkgs, int hint); -@@ -74,6 +78,10 @@ - - int poldek__ts_confirm(const struct poldek_ts *ts); - -+int poldek__sugs_confirm(const struct poldek_ts *ts, -+ int default_answer, const char *message); -+ -+ - int poldek__choose_equiv(const struct poldek_ts *ts, - const char *capname, tn_array *pkgs, struct pkg *hint); - -diff -urN poldek/poldek_ts.c poldek.new/poldek_ts.c ---- poldek/poldek_ts.c 2007-07-11 00:56:17.000000000 +0200 -+++ poldek.new/poldek_ts.c 2007-11-17 22:56:19.000000000 +0100 -@@ -54,6 +54,7 @@ - - extern int poldek_term_confirm(int default_answer, const char *msg); - extern int poldek_term_ts_confirm(const struct poldek_ts *ts); -+extern int poldek_term_sugs_confirm(int default_answer, const char *msg); - extern int poldek_term_choose_pkg(const char *capname, tn_array *pkgs, - struct pkg *hint); - diff --git a/poldek-uninstall-depfix.patch b/poldek-uninstall-depfix.patch deleted file mode 100644 index 41f9c4e..0000000 --- a/poldek-uninstall-depfix.patch +++ /dev/null @@ -1,174 +0,0 @@ -Index: capreq.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/capreq.c,v -retrieving revision 1.44 -diff -u -r1.44 capreq.c ---- capreq.c 21 Jun 2007 16:47:45 -0000 1.44 -+++ capreq.c 29 Jun 2007 20:10:22 -0000 -@@ -59,7 +59,7 @@ - return strcmp(capreq_name(cr1), capreq_name(cr2)); - } - --__inline__ -+__inline__ static - int capreq_cmp2name(struct capreq *cr1, const char *name) - { - return strcmp(capreq_name(cr1), name); -@@ -427,9 +427,24 @@ - __inline__ - int capreq_arr_find(tn_array *capreqs, const char *name) - { -+ /* capreq_cmp2name is compilant with capreq_cmp_name_evr */ -+ if (!n_array_is_sorted(capreqs)) -+ n_array_sort(capreqs); -+ - return n_array_bsearch_idx_ex(capreqs, name, - (tn_fn_cmp)capreq_cmp2name); - } -+ -+__inline__ -+int capreq_arr_contains(tn_array *capreqs, const char *name) -+{ -+ if (!n_array_is_sorted(capreqs)) -+ n_array_sort(capreqs); /* capreq_cmp2name */ -+ -+ return n_array_bsearch_idx_ex(capreqs, name, -+ (tn_fn_cmp)capreq_cmp2name) > -1; -+} -+ - - tn_buf *capreq_arr_join(tn_array *capreqs, tn_buf *nbuf, const char *sep) - { -Index: capreq.h -=================================================================== -RCS file: /cvsroot/poldek/poldek/capreq.h,v -retrieving revision 1.30 -diff -u -r1.30 capreq.h ---- capreq.h 21 Jun 2007 22:29:49 -0000 1.30 -+++ capreq.h 29 Jun 2007 20:10:22 -0000 -@@ -117,12 +117,12 @@ - int capreq_strcmp_name_evr(struct capreq *pr1, struct capreq *pr2); - - int capreq_cmp_name(struct capreq *cr1, struct capreq *cr2); --int capreq_cmp2name(struct capreq *pr1, const char *name); - int capreq_cmp_name_evr(struct capreq *cr1, struct capreq *cr2); - - #ifndef SWIG - tn_array *capreq_arr_new(int size); --int capreq_arr_find(tn_array *capreqs, const char *name); -+int capreq_arr_find(tn_array *capreqs, const char *name); /* returns index */ -+int capreq_arr_contains(tn_array *capreqs, const char *name); /* returns bool */ - tn_buf *capreq_arr_join(tn_array *capreqs, tn_buf *nbuf, const char *sep); - - int capreq_arr_store_n(tn_array *arr); -Index: libpoldek.sym -=================================================================== -RCS file: /cvsroot/poldek/poldek/libpoldek.sym,v -retrieving revision 1.28 -diff -u -r1.28 libpoldek.sym ---- libpoldek.sym 28 Jun 2007 22:28:21 -0000 1.28 -+++ libpoldek.sym 29 Jun 2007 20:10:22 -0000 -@@ -20,7 +20,6 @@ - capreq_arr_store - capreq_arr_store_n - capreq_clone --capreq_cmp2name - capreq_cmp_name - capreq_cmp_name_evr - capreq_epoch_ -Index: pkg.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/pkg.c,v -retrieving revision 1.115 -diff -u -r1.115 pkg.c ---- pkg.c 21 Jun 2007 16:47:45 -0000 1.115 -+++ pkg.c 29 Jun 2007 20:10:23 -0000 -@@ -920,8 +920,7 @@ - struct capreq *cnfl = NULL; - - DBGF("%s %s%s", pkg_id(pkg), pkg_id(cpkg), isbastard ? " (bastard)" : ""); -- if (n_array_bsearch_ex(pkg->cnfls, cpkg->name, -- (tn_fn_cmp)capreq_cmp2name) == NULL) { -+ if (!capreq_arr_contains(pkg->cnfls, cpkg->name)) { - cnfl = capreq_new(pkg->na, cpkg->name, cpkg->epoch, cpkg->ver, - cpkg->rel, REL_EQ, - (isbastard ? CAPREQ_BASTARD : 0)); -@@ -935,8 +934,7 @@ - - int pkg_has_pkgcnfl(struct pkg *pkg, struct pkg *cpkg) - { -- return pkg->cnfls && (n_array_bsearch_ex(pkg->cnfls, cpkg->name, -- (tn_fn_cmp)capreq_cmp2name)); -+ return pkg->cnfls && capreq_arr_contains(pkg->cnfls, cpkg->name); - } - - struct pkguinf *pkg_xuinf(const struct pkg *pkg, tn_array *langs) -Index: pkgdir/pkgdir_dirindex.c -=================================================================== -RCS file: /cvsroot/poldek/poldek/pkgdir/pkgdir_dirindex.c,v -retrieving revision 1.13 -diff -u -r1.13 pkgdir_dirindex.c ---- pkgdir/pkgdir_dirindex.c 24 Jun 2007 22:47:27 -0000 1.13 -+++ pkgdir/pkgdir_dirindex.c 29 Jun 2007 20:10:23 -0000 -@@ -505,7 +505,7 @@ - { - const char **tl, **tl_save; - char val[16 * 1024]; -- int vlen, n = 0, nadded = 0; -+ int vlen, n = 0, nadded = 0, created_here = 0; - - n_assert(key[1] == PREFIX_PKGKEY_REQDIR); - vlen = sizeof(val); -@@ -513,15 +513,15 @@ - if (tl == NULL) - return 0; - -- if (!pkg->reqs) -+ if (!pkg->reqs) { - pkg->reqs = capreq_arr_new(n); -- -+ created_here = 1; -+ } -+ - while (*tl) { - const char *dir = *tl; - -- if (*dir && !n_array_bsearch_ex(pkg->reqs, dir, -- (tn_fn_cmp)capreq_cmp2name)) { -- -+ if (*dir && (created_here || !capreq_arr_contains(pkg->reqs, dir))) { - struct capreq *req = capreq_new(pkg->na, dir, 0, NULL, NULL, 0, - CAPREQ_BASTARD); - n_array_push(pkg->reqs, req); -================================================================ -Index: trurlib/include/trurl/narray.h -diff -u trurlib/include/trurl/narray.h:1.29 trurlib/include/trurl/narray.h:1.30 ---- trurlib/include/trurl/narray.h:1.29 Tue Jun 19 23:52:49 2007 -+++ trurlib/include/trurl/narray.h Sat Jun 30 09:39:51 2007 -@@ -155,7 +155,9 @@ - /* internal macros, do not use them */ - #define TN_ARRAY_set_sorted(arr) ((arr)->flags |= TN_ARRAY_INTERNAL_ISSORTED) - #define TN_ARRAY_clr_sorted(arr) ((arr)->flags &= ~TN_ARRAY_INTERNAL_ISSORTED) --#define TN_ARRAY_is_sorted(arr) ((arr)->flags & TN_ARRAY_INTERNAL_ISSORTED) -+ -+ -+#define n_array_is_sorted(arr) ((arr)->flags & TN_ARRAY_INTERNAL_ISSORTED) - - tn_array *n_array_grow_priv_(tn_array *arr, size_t req_size); - #ifndef SWIG - -================================================================ -Index: trurlib/n_array_sorts.c -diff -u trurlib/n_array_sorts.c:1.6 trurlib/n_array_sorts.c:1.7 ---- trurlib/n_array_sorts.c:1.6 Tue Nov 16 20:01:40 2004 -+++ trurlib/n_array_sorts.c Sat Jun 30 09:39:51 2007 -@@ -121,7 +121,7 @@ - - cmpf = autosort(arr, cmpf, &set_sorted); - -- if ((arr->flags & TN_ARRAY_AUTOSORTED) && TN_ARRAY_is_sorted(arr)) -+ if ((arr->flags & TN_ARRAY_AUTOSORTED) && n_array_is_sorted(arr)) - return arr; - - switch (alg) { - diff --git a/poldek-uri-escape-fix.patch b/poldek-uri-escape-fix.patch deleted file mode 100644 index 52b9da5..0000000 --- a/poldek-uri-escape-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- vfile/vfff/http.c.orig 2007-07-16 22:05:47.000000000 +0200 -+++ vfile/vfff/http.c 2007-07-16 22:06:10.000000000 +0200 -@@ -123,16 +123,8 @@ - - static char *make_req_line(char *buf, int size, const char *method, const char *uri) - { -- char *escaped = NULL; -- -- if ((escaped = vfff_uri_escape(uri))) -- uri = escaped; -- - n_snprintf(buf, size, "%s %s HTTP/1.1\r\n", method, uri); - -- if (escaped) -- free(escaped); -- - return buf; - } - diff --git a/poldek.conf b/poldek.conf index ff8919b..151b342 100644 --- a/poldek.conf +++ b/poldek.conf @@ -1,65 +1,46 @@ -# PLD Linux Distribution . +# PLD Titanium +# Unofficial version of PLD Linux Distribution +# http://www.pld-linux.org/Titanium _arch = %ARCH% -_prefix = ftp://ftp.th.pld-linux.org/dists/th -## Some mirrors -## You can use them if you have better connection there -# CI TASK: -#_prefix = ftp://ftp.task.pld-linux.org/dists/th +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium _type = pndir -# PLD 3.0 (Th) [source] type = %{_type} -name = th +name = titanium path = %{_prefix}/PLD/%{_arch}/RPMS/ [source] type = %{_type} -name = th +name = titanium path = %{_prefix}/PLD/noarch/RPMS/ -#[source] -#type = %{_type} -#name = th-updates -#path = %{_prefix}/updates/%{_arch}/RPMS/ -# -#[source] -#type = %{_type} -#name = th-updates -#path = %{_prefix}/updates/noarch/RPMS/ - -#[source] -#type = %{_type} -#name = th-supported -#path = %{_prefix}/supported/%{_arch}/ -#auto = no - [source] type = %{_type} -name = th-ready +name = titanium-ready path = %{_prefix}/ready/%{_arch}/RPMS/ auto = no autoup = no [source] type = %{_type} -name = th-ready +name = titanium-ready path = %{_prefix}/ready/noarch/RPMS/ auto = no autoup = no [source] type = %{_type} -name = th-test +name = titanium-test path = %{_prefix}/test/%{_arch}/RPMS/ auto = no autoup = no [source] type = %{_type} -name = th-test +name = titanium-test path = %{_prefix}/test/noarch/RPMS/ auto = no autoup = no diff --git a/poldek.spec b/poldek.spec index 042c695..e793ee7 100644 --- a/poldek.spec +++ b/poldek.spec @@ -9,7 +9,7 @@ %define ver_rpm 4.4.9-1 # %define snap 20080225.00 -%define rel 6 +%define rel 8 Summary: RPM packages management helper tool Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM Name: poldek @@ -34,6 +34,7 @@ Patch7: %{name}-uninstall-greedy-fix.patch Patch8: %{name}-pkguinf-kill-assert.patch Patch9: %{name}-pkguinf-sourcerpm.patch Patch10: %{name}-sigint_emit.patch +Patch11: %{name}-bug139.patch URL: http://poldek.pld-linux.org/ BuildRequires: autoconf BuildRequires: automake @@ -167,6 +168,7 @@ Moduły języka Python dla poldka. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p0 # cleanup backups after patching find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f -- 2.44.0