Sprout from master 2002-11-16 00:16:37 UTC mis <mis@pld-linux.org> '- fixed fix (%$#@!)'
Cherrypick from master 2004-07-05 10:12:55 UTC wolf <wolf@pld-linux.org> '- fix segmentation violation (from author)':
poldek-deps-fix.patch -> 1.1
poldek-retr_term.patch -> 1.1
poldek-sigsegv.patch -> 1.1
Cherrypick from master 2002-08-08 13:21:06 UTC Jakub Bogusz <qboosh@pld-linux.org> '- fix for obsoletes processing':
poldek-epoch.patch -> 1.1
poldek-typo.patch -> 1.1
Cherrypick from RA-branch 2004-07-08 09:11:22 UTC Jakub Bogusz <qboosh@pld-linux.org> '- cleanup whitespace':
poldek.conf -> 1.27.2.3
poldek.spec -> 1.82.2.15
--- /dev/null
+--- pkgset-install.c 16 Nov 2002 00:23:22 -0000 1.82
++++ pkgset-install.c 16 Jul 2003 10:55:04 -0000 1.82.4.1
+@@ -224,11 +224,11 @@
+
+ if (p != pkg && pkg_is_marked(p)) {
+ if (req == NULL || pkg_statisfies_req(p, req, 0)) {
+- DBGF("%s -> yes, %s\n", pkg_snprintf_s0(pkg), pkg_snprintf_s1(p));
+- return 1;
++ DBGF("%s -> yes, %s\n", pkg_snprintf_s0(pkg), pkg_snprintf_s1(p));
++ return 1;
++ }
+ }
+ }
+- }
+
+ return 0;
+ }
+@@ -303,7 +303,7 @@
+ struct pkg **candidates, int npkgs,
+ struct pkgset *ps, struct upgrade_s *upg)
+ {
+- int *ncnfls, i, j, i_min, cnfl_min;
++ int *ncnfls, i, j, i_best, cnfl_min;
+ int i_ver_eq = -1, i_evr_eq = -1;
+
+ DBGF("%s (%d)\n", pkg_snprintf_s(marker), npkgs);
+@@ -345,38 +345,44 @@
+ return i_ver_eq;
+
+ cnfl_min = INT_MAX;
+- i_min = -1;
++ i_best = -1;
+ for (i=0; i < npkgs; i++) {
+ DBGF("%d. %s %d\n", i, pkg_snprintf_s(candidates[i]), ncnfls[i]);
+ if (cnfl_min > ncnfls[i]) {
+ cnfl_min = ncnfls[i];
+- i_min = i;
++ i_best = i;
+ }
+ }
+
+- DBGF("[after cnfls] i_min = %d\n", i_min);
++ DBGF("[after cnfls] i_best = %d\n", i_best);
+ if (cnfl_min == 0) {
+ int n = INT_MAX, *nmarks;
+
+ nmarks = alloca(npkgs * sizeof(*nmarks));
+
+ for (i=0; i < npkgs; i++) {
++ if (other_version_marked(candidates[i], ps->pkgs, NULL)) {
++ DBGF("%d. %s other version is already marked, skipped\n",
++ i, pkg_snprintf_s(candidates[i]));
++ continue;
++ }
++
+ nmarks[i] = pkg_drags(candidates[i], ps, upg);
+- DBGF("%d %s -> %d\n", i, pkg_snprintf_s(candidates[i]), nmarks[i]);
+- if (n > nmarks[i]) {
++ DBGF("%d. %s -> %d\n", i, pkg_snprintf_s(candidates[i]), nmarks[i]);
++ if (n > nmarks[i])
+ n = nmarks[i];
+- }
+-
++
+ if (n == 0 && ncnfls[i] == 0) {
+- i_min = i;
++ i_best = i;
+ break;
+ }
+ }
+ }
+
+- if (i_min == -1)
+- i_min = 0;
+- return i_min;
++ if (i_best == -1)
++ i_best = 0;
++ DBGF("RET %d. %s\n", i_best, pkg_snprintf_s(candidates[i]));
++ return i_best;
+ }
+
+ #define FINDREQ_BESTSEL 0
+@@ -1009,7 +1015,7 @@
+ capreq_snprintf(reqname, 256, req);
+ }
+
+- DBGF("req %s\n", capreq_snprintf_s(req));
++ DBGF("%s: REQ %s\n", pkg_snprintf_s(pkg), capreq_snprintf_s(req));
+
+ if ((upg->inst->flags & INSTS_EQPKG_ASKUSER) && upg->inst->askpkg_fn)
+ tomark_candidates_ptr = &tomark_candidates;
+@@ -1022,7 +1028,8 @@
+ goto l_end_loop;
+ }
+ }
+-
++ DBGF("%s: TOMARK %s\n", pkg_snprintf_s1(pkg),
++ tomark ? pkg_snprintf_s0(tomark) : "NULL");
+ /* don't check foreign dependencies */
+ if (process_as == PROCESS_AS_ORPHAN) {
+ #if 0 /* buggy, TODO - unmark foreign on adding to uninst_set */
--- /dev/null
+--- poldek-0.17.7/rpm.c.orig Thu Apr 25 18:34:12 2002
++++ poldek-0.17.7/rpm.c Thu Aug 8 14:42:40 2002
+@@ -752,7 +752,7 @@
+ int i, n = 0;
+
+
+- self_cap = capreq_new(pkg->name, 0, NULL, NULL, 0, 0);
++ self_cap = capreq_new(pkg->name, pkg->epoch, pkg->ver, pkg->rel, REL_LT, 0);
+ n = rpm_get_obsoletedby_cap(db, dbpkgs, self_cap, ldflags);
+ capreq_free(self_cap);
+
--- /dev/null
+diff -urN poldek-0.18.1.orig/vfile/Makefile.am poldek-0.18.1/vfile/Makefile.am
+--- poldek-0.18.1.orig/vfile/Makefile.am Thu Oct 24 18:23:12 2002
++++ poldek-0.18.1/vfile/Makefile.am Fri May 2 10:55:06 2003
+@@ -21,10 +21,10 @@
+ vlibs = vftp/libvftp.a vhttp/libvhttp.a
+
+ noinst_PROGRAMS = sample ttest
+-sample_SOURCES = sample.c
++sample_SOURCES = sample.c ../poldek_term.c ../log.c
+ sample_LDADD = libvfile.a $(vlibs) @TRURL_LDFLAG@ $(LDADD_) $(top_srcdir)/sigint/libsigint.a
+
+-ttest_SOURCES = ttest.c
++ttest_SOURCES = ttest.c ../poldek_term.c ../log.c
+ ttest_LDADD = libvfile.a $(vlibs) @TRURL_LDFLAG@ $(LDADD_) $(top_srcdir)/sigint/libsigint.a
+ EXTRA_DIST = $(VFCURL_SRCS) \
+ testcookie.c test_progress.c
+diff -urN poldek-0.18.1.orig/vfile/vfile.c poldek-0.18.1/vfile/vfile.c
+--- poldek-0.18.1.orig/vfile/vfile.c Tue Oct 29 17:55:56 2002
++++ poldek-0.18.1/vfile/vfile.c Fri May 2 10:59:25 2003
+@@ -42,6 +42,7 @@
+ #include <trurl/nmalloc.h>
+
+ #include "i18n.h"
++#include "../poldek_term.h"
+
+ #define VFILE_INTERNAL
+ #include "vfile.h"
+@@ -224,6 +225,10 @@
+ return mod;
+ }
+
++const char *PR_URL(const char *url) {
++ return vf_url_slim_s(url, term_get_width()-strlen(_("Retrieving %s...\n"))-4);
++}
++
+ int vfile_fetcha(const char *destdir, tn_array *urls, int urltype)
+ {
+ const struct vf_module *mod = NULL;
+diff -urN poldek-0.18.1.orig/vfile/vfile.h poldek-0.18.1/vfile/vfile.h
+--- poldek-0.18.1.orig/vfile/vfile.h Thu Nov 7 17:43:29 2002
++++ poldek-0.18.1/vfile/vfile.h Fri May 2 10:20:18 2003
+@@ -189,7 +189,7 @@
+
+ /* short alias for */
+ #define CL_URL(url) vf_url_hidepasswd_s(url)
+-#define PR_URL(url) vf_url_slim_s(url, 60)
++//#define PR_URL(url) vf_url_slim_s(url, 60)
+
+
+
--- /dev/null
+Index: pkgfl.c
+===================================================================
+RCS file: /cvsroot/installer/poldek/pkgfl.c,v
+retrieving revision 1.25
+diff -u -r1.25 pkgfl.c
+--- pkgfl.c 15 May 2002 15:42:48 -0000 1.25
++++ pkgfl.c 5 Jul 2004 08:18:58 -0000
+@@ -467,14 +467,14 @@
+ while (ndirs--) {
+ struct pkgfl_ent *flent = NULL;
+ char *dn = NULL;
+- int8_t dnl = 0;
++ uint8_t dnl = 0;
+ int32_t nfiles = 0;
+ int loadir;
+
+
+ n_buf_it_get_int8(nbufi, &dnl);
+ dn = n_buf_it_get(nbufi, dnl);
+-
++ n_assert(dn);
+ loadir = default_loadir;
+ if (dirs && n_array_bsearch(dirs, dn))
+ loadir = include;
--- /dev/null
+--- poldek-0.17.7/po/pl.po.orig Fri Jun 14 18:11:28 2002
++++ poldek-0.17.7/po/pl.po Thu Aug 8 13:07:21 2002
+@@ -290,7 +290,7 @@
+ #: main.c:364 shell/install.c:45
+ msgid "Upgrade packages, but only if an earlier version currently exists"
+ msgstr ""
+-"Aktualizuj pakiety tylko w przypadku gdy wcze¶nijesza ich wersja jest "
++"Aktualizuj pakiety tylko w przypadku gdy wcze¶niejsza ich wersja jest "
+ "zainstalowana"
+
+ #: main.c:367
# $Id$
-#source = Ra+2.4.18 ftp://ftp.pld.org.pl/people/jack/Ra+2.4.18/i686/
-#source = Ra+2.4.19 ftp://ftp.pld.org.pl/people/jack/Ra+2.4.19/i686/
+# security updates
+source = ra-updates-security ftp://ftp.pld-linux.org/dists/ra/updates/security/i686/
-source = ra ftp://ftp.pld.org.pl/dists/ra/PLD/i686/PLD/RPMS/
+# main packages repository
+source = ra ftp://ftp.pld-linux.org/dists/ra/PLD/i686/PLD/RPMS/
-#source = ra-supported,noauto ftp://ftp.pld.org.pl/dists/ra/supported/i686/
+# non-critical fixes and updates which will be base for next version of Ra
+source = ra-updates-general,noauto ftp://ftp.pld-linux.org/dists/ra/updates/general/i686/
-#source = ra-test,noauto ftp://ftp.pld.org.pl/dists/ra/test/i686/
+# Other, sometimes obsolete, stuff
+source = ra-supported,noauto ftp://ftp.pld-linux.org/dists/ra/supported/i686/
-#source = nest,noauto ftp://ftp.nest.pld.org.pl/PLD/i686/PLD/RPMS/
-#source = nest-test,noauto ftp://ftp.nest.pld.org.pl/test/i686/
+# Things that are scheduled to move to updates/*
+# Testers are *really* needed, but you have to know what are you doing
+#source = ra-ready,noauto ftp://ftp.pld-linux.org/dists/ra/ready/i686/
-# NOTE: directory *must* exist; default is ~/.poldek-cache
+# Everything that is built by RA-builders. Things here could be dangerous
+# for the stability of your system:
+#source = ra-test,noauto ftp://ftp.pld-linux.org/dists/ra/test/i686/
+
+#source = nest,noauto ftp://ftp.nest.pld-linux.org/PLD/i686/PLD/RPMS/
+#source = nest-test,noauto ftp://ftp.nest.pld-linux.org/test/i686/
+
+# NOTE: directory *must* exist; default is ${TMPDIR:-~/.poldek-cache}
+# but if that fails /tmp is taken
#cachedir = /var/tmp/poldek-cache
-# permits using root privs for installation only; default "no"
-#use_sudo = yes
+# use root privileges for installation only; default "no"
+#use_sudo = yes
+
# Installation options
-# install packages in small groups instead of doing all-or-nothing
+# install packages in small groups instead of doing all-or-nothing
# installation; default "yes"
#particle_install = no
+# remove duplicate packages from available package set, i.e. this
+# option ensures that only one instance (highest version from source
+# with highest priority) of every package will be available
+# for installation; default "no"
+#unique_package_names = yes
+
# automatically install packages required by installed ones; default "yes"
#follow = no
#keep_downloads = yes
# confirm each installation; default "no"
-#confirm_installs = yes
+confirm_installs = yes
+
+# let the user select package among equivalents; default "no"
+choose_equivalents_manually = yes
-# let the user select package among equivalents
-#choose_equivalents_manually = yes
+# prevent kernel* and dev from being upgraded if they are already installed
+#hold = kernel* dev
-# prevent kernel* and dev from being upgraded if they are already installed.
-#hold = kernel* dev
+# remove kernel* packages from available package set, i.e. make them
+# invisible for the user
+#ignore = kernel*
+# use Epoch comparison compatible with rpm < 4.2.1
+promoteepoch = yes
-# External downloaders configuration
+# External downloaders configuration
# Available semi-macros (as ws-separate tokens only):
-# %p[n] - package basename
-# %d - cache dir
-# %D - cache dir/package basename
-# %P[n] - package full path(URL)
-#
-# Hint: if you use several PLD powered machines, you may consider using
-# proxy server to speed up download. To make use of proxy with poldek set
+# %p[n] - package basename
+# %d - cache dir
+# %D - cache dir/package basename
+# %P[n] - package full path(URL)
+#
+# Hint: if you use several PLD powered machines, you may consider using a
+# proxy server to speed up download. To make use of proxy with poldek set
# HTTP_PROXY and/or FTP_PROXY environment variables or setup transparent
# proxy and uncomment one of the lines below. For more info use man
# {poldek|wget|snarf|squid|ipchains or iptables}
-#ftp_get = /usr/bin/snarf %P %D
-#ftp_get = /usr/bin/wget -N --dot-style=binary -P %d %Pn
-#http_get = /usr/bin/wget -N --dot-style=binary -P %d %Pn
-#https_get = /usr/bin/curl %P -o %D
-#rsync_get = /usr/bin/rsync -v %P %d
-#cdrom_get = /usr/bin/vfjuggle %d %Pn
+#ftp_get = /usr/bin/snarf %P %D
+#ftp_get = /usr/bin/wget -N --dot-style=binary -P %d %Pn
+#http_get = /usr/bin/wget -N --dot-style=binary %P -O %D
+#https_get = /usr/bin/curl %P -o %D
+#rsync_get = /usr/bin/rsync -v %P %d
+#cdrom_get = /usr/bin/vfjuggle %d %Pn
# Some rpm macros
-#rpmdef = _install_langs pl:pl_PL:lt:lt_LT
+#rpmdef = _install_langs pl:pl_PL:lt:lt_LT
# don't install any documentation
-#rpmdef = _netsharedpath /usr/share/info:/usr/share/man
-#rpmdef = _excludedocs 1
+#rpmdef = _netsharedpath /usr/share/info:/usr/share/man
+#rpmdef = _excludedocs 1
#
-# conditional build:
-# --with static - don't use shared libraries
-# --without imode - don't build interactive mode
-# --without curl - don't link curl
+# Conditional build:
+%bcond_without imode # don't build interactive mode
+%bcond_without curl # don't link curl
+%bcond_with static # don't use shared libraries
#
Summary: RPM packages management helper tool
Summary(pl): Pomocnicze narzêdzie do zarz±dzania pakietami RPM
Name: poldek
-Version: 0.18
+Version: 0.18.3
Release: 4
License: GPL v2
Group: Applications/System
-Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.bz2
+Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
+# Source0-md5: 339c54b86bfd733851c0f7125057f446
Source1: %{name}.conf
-Patch0: %{name}-vfprogress.patch
-Patch1: %{name}-hold-fix.patch
-Patch2: %{name}-sigsev.patch
+Patch0: %{name}-retr_term.patch
+Patch1: %{name}-sigsegv.patch
URL: http://team.pld.org.pl/~mis/poldek/
-Requires: rpm >= 4.0.2-62
-Requires: sed
+BuildRequires: /usr/bin/pod2man
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: bzip2-devel
-%{?_with_curl:BuildRequires: curl-devel >= 7.8}
-BuildRequires: openssl-devel
+%{?with_static:BuildRequires: bzip2-static}
+%{?with_curl:BuildRequires: curl-devel >= 7.8}
+%{?with_curl:%{?with_static:BuildRequires: curl-static}}
+%{?with_static:BuildRequires: db1-static}
+%{?with_static:BuildRequires: db3-static}
+BuildRequires: openssl-devel >= 0.9.6m
+%{?with_static:BuildRequires: openssl-static}
BuildRequires: pcre-devel
+%{?with_static:BuildRequires: pcre-static}
BuildRequires: popt-devel
+%{?with_static:BuildRequires: popt-static}
BuildRequires: readline-devel
BuildRequires: rpm-devel >= 4.0.2-62
+%{?with_static:BuildRequires: rpm-static}
BuildRequires: zlib-devel
-BuildRequires: /usr/bin/pod2man
-%{?_with_static:BuildRequires: bzip2-static}
-%{?_with_curl:%{?_with_static:BuildRequires: curl-static}}
-%{?_with_static:BuildRequires: openssl-static}
-%{?_with_static:BuildRequires: pcre-static}
-%{?_with_static:BuildRequires: popt-static}
-%{?_with_static:BuildRequires: rpm-static}
-%{?_with_static:BuildRequires: zlib-static}
+%{?with_static:BuildRequires: zlib-static}
+Requires: rpm >= 4.0.2-62
+Requires: sed
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
interface with command line autocompletion and history, similar to the
shell mode of Perl's CPAN.
-%{?_with_static:This version is statically linked.}
+%{?with_static:This version is statically linked.}
-%{?_without_imode:This version hasn't got interactive mode.}
+%{!?with_imode:This version hasn't got interactive mode.}
%description -l pl
poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
z dope³nianiem komend i histori±, podobny do trybu shell perlowego
modu³u CPAN.
-%{?_with_static:Ta wersja jest konsolidowana statycznie.}
+%{?with_static:Ta wersja jest konsolidowana statycznie.}
-%{?_without_imode:Ta wersja nie posiada trybu interaktywnego.}
+%{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
%prep
%setup -q
-%patch0 -p0
-%patch1 -p0
-%patch2 -p0
+%patch0 -p1
+%patch1 -p0
%build
if ! grep -q AM_GNU_GETTEXT_VERSION configure.in ; then
%{__autoconf}
%{__automake}
%configure \
- %{?_with_static:--enable-static} \
- %{?_without_imode:--disable-imode} \
- %{?_with_curl:--with-curl}
+ %{?with_static:--enable-static} \
+ %{!?with_imode:--disable-imode} \
+ %{?with_curl:--with-curl}
%{__make}
%install
install -d $RPM_BUILD_ROOT%{_sysconfdir}
# no strip cause program's beta stage and core may be useful
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-%{?_with_static:rm -f $RPM_BUILD_ROOT/%{_bindir}/rpmvercmp}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{?with_static:rm -f $RPM_BUILD_ROOT/%{_bindir}/rpmvercmp}
sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT/etc/%{name}.conf
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerpostun -- poldek <= 0.18.3-1
+if ! grep -q promoteepoch /etc/poldek.conf ; then
+ echo promoteepoch = yes >>/etc/poldek.conf
+fi
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README* NEWS TODO *sample* conf/poldekrc*