From 212fd143d09263ee317c0b0cdf3df2885c36a073 Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Tue, 10 Oct 2017 19:53:28 +0300 Subject: [PATCH] Drop unused patches, clean spec' --- rpm-5.4.9-no-doc-conflicts.patch | 63 --------------------- rpm-5.4.9-non-pre-scripts-dont-fail.patch | 68 ----------------------- rpm.spec | 7 --- 3 files changed, 138 deletions(-) delete mode 100644 rpm-5.4.9-no-doc-conflicts.patch delete mode 100644 rpm-5.4.9-non-pre-scripts-dont-fail.patch diff --git a/rpm-5.4.9-no-doc-conflicts.patch b/rpm-5.4.9-no-doc-conflicts.patch deleted file mode 100644 index a6c185f..0000000 --- a/rpm-5.4.9-no-doc-conflicts.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- rpm-5.4.9/lib/transaction.c.doc_conflicts~ 2012-04-26 20:36:19.000000000 +0200 -+++ rpm-5.4.9/lib/transaction.c 2012-05-15 01:46:37.964693880 +0200 -@@ -68,6 +68,24 @@ - /*@access IDTX @*/ - /*@access FD_t @*/ - -+#if defined(RPM_VENDOR_MANDRIVA) -+static int is_a_doc_conflict(rpmfi fi) -+{ -+ const char *ignorelist[] = { -+ "/usr/share/man/", -+ "/usr/share/gtk-doc/html/", -+ "/usr/share/gnome/html/", -+ NULL -+ }; -+ const char *fn = rpmfiFN(fi); -+ const char **dnp; -+ for (dnp = ignorelist; *dnp != NULL; dnp++) -+ if (strstr(fn, *dnp) == fn) return 1; -+ -+ return 0; -+} -+#endif -+ - #ifdef __cplusplus - - #define FF_ISSET(_fflags, _FLAG) ((_fflags) & (RPMFILE_##_FLAG)) -@@ -164,6 +182,17 @@ static int handleInstInstalledFile(const - } - } - -+#if defined(RPM_VENDOR_MANDRIVA) -+ if(rpmExpandNumeric("%{?_legacy_compat_no_doc_conflicts}")) { -+ /* HACK: always install latest (arch-independent) man -+ pages and gtk/gnome html doc files. */ -+ if (rConflicts && is_a_doc_conflict(fi)) { -+ fi->actions[fx] = FA_CREATE; -+ rConflicts = 0; -+ } -+ } -+#endif -+ - if (rConflicts) { - HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); - rpmps ps = rpmtsProblems(ts); -@@ -429,6 +458,17 @@ assert(otherFi != NULL); - done = 1; - } - -+#if defined(RPM_VENDOR_MANDRIVA) -+ if(rpmExpandNumeric("%{?_legacy_compat_no_doc_conflicts}")) { -+ /* HACK: always install latest (arch-independent) man -+ pages and gtk/gnome html doc files. */ -+ if (rConflicts && is_a_doc_conflict(fi)) { -+ fi->actions[i] = FA_CREATE; -+ rConflicts = 0; -+ } -+ } -+#endif -+ - if (rConflicts) { - rpmpsAppend(ps, RPMPROB_NEW_FILE_CONFLICT, - rpmteNEVR(p), rpmteKey(p), diff --git a/rpm-5.4.9-non-pre-scripts-dont-fail.patch b/rpm-5.4.9-non-pre-scripts-dont-fail.patch deleted file mode 100644 index 5200a98..0000000 --- a/rpm-5.4.9-non-pre-scripts-dont-fail.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- rpm-5.4.9/lib/psm.c.scriptlet~ 2012-04-19 19:26:06.000000000 +0200 -+++ rpm-5.4.9/lib/psm.c 2012-05-15 01:43:59.841922573 +0200 -@@ -2195,6 +2195,10 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s - rpmRC rc = psm->rc; - int saveerrno; - int xx; -+ int non_pre_scripts_dont_fail = 0; -+#if defined(RPM_VENDOR_MANDRIVA) -+ non_pre_scripts_dont_fail = rpmExpandNumeric("%{?_legacy_compat_non_pre_scripts_dont_fail}"); -+#endif - - /* XXX hackery to assert(!scareMem) in rpmfiNew. */ - /*@-castexpose@*/ -@@ -2416,11 +2420,11 @@ assert(he->p.argv != NULL); - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) { - /* Run triggers in this package other package(s) set off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - - /* Run triggers in other package(s) this package sets off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - } - - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN)) -@@ -2759,16 +2763,16 @@ assert(psm->te != NULL); - - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) { - rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - } - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERIN)) { - /* Run triggers in other package(s) this package sets off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - - /* Run triggers in this package other package(s) set off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - } - - /* -@@ -2801,17 +2805,17 @@ assert(psm->te != NULL); - - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) { - rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - } - - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) { - /* Run triggers in other package(s) this package sets off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - - /* Run triggers in this package other package(s) set off. */ - rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); -- if (rc) break; -+ if(rc && !non_pre_scripts_dont_fail) break; - } - - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY)) diff --git a/rpm.spec b/rpm.spec index bcc254b..bbe5d20 100644 --- a/rpm.spec +++ b/rpm.spec @@ -76,18 +76,12 @@ Source0: ftp://ftp.jbj.org/pub/rpm-%{libver}.x/%{name}-%{srcver}.tar.gz # cpu-macros.tar.gz to push upstream would seem like a sane improvement. Source2: rpm.rpmlintrc Source3: cpu-os-macros.tar.gz -#Source4: legacy_compat.macros Source5: RPMBDB-0.1.tar.xz Source6: autosetup.macros # add squirrel3 support Patch0: rpm-5.4.10-squirrel3.patch # add makeinstall_qt macro to handle install from qmake-generated makefiles Patch1: rpm-5.4.10-makeinstall_qt.patch -# TODO: make conditional & disabled through macro by default (enable for legacy compatibility) -# status: to be removed later -#Patch2: rpm-5.4.9-non-pre-scripts-dont-fail.patch -# status: to be removed later -#Patch3: rpm-5.4.9-no-doc-conflicts.patch # fixes a typo in russian translation (#62333) # status: needs to be pushed back to the Russian i18n project Patch11: rpm-5.4.9-fix-russian-typo.patch @@ -1386,7 +1380,6 @@ install -d %{buildroot}/bin mv %{buildroot}%{_bindir}/rpm %{buildroot}/bin/rpm cp -r cpu-os-macros %{buildroot}%{_usrlibrpm}/platform -#install -m644 %{SOURCE4} -D %{buildroot}%{_sysconfdir}/%{name}/macros.d/legacy_compat.macros install -m644 %{SOURCE6} -D %{buildroot}%{_sysconfdir}/%{name}/macros.d/autosetup.macros %if %{with docs}