mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 10:23:04 +00:00
Revert "Patch: allow forcing AutoReq on top of %%__noautoreq"
This reverts commit 92afe09f91
.
This commit is contained in:
parent
92afe09f91
commit
e7c58a5354
2 changed files with 1 additions and 91 deletions
|
@ -1,86 +0,0 @@
|
||||||
From d3fe91a3be1b0f05ef0b1a48da1e2ee7528637f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
|
||||||
Date: Tue, 16 Apr 2019 10:07:38 +0300
|
|
||||||
Subject: [PATCH] Force AutoReq on top of noautoreq
|
|
||||||
|
|
||||||
Allow overriding %%__noautoreq by %%__forceautoreq
|
|
||||||
and %%__noautoreqfiles by %%__forceautoreqfiles
|
|
||||||
|
|
||||||
Will be used in the samba package
|
|
||||||
|
|
||||||
diff --git a/lib/rpmfc.c b/lib/rpmfc.c
|
|
||||||
index 8049ff5..2239a9e 100644
|
|
||||||
--- a/lib/rpmfc.c
|
|
||||||
+++ b/lib/rpmfc.c
|
|
||||||
@@ -976,7 +976,8 @@ fprintf(stderr, "*** rpmfcMergePR(%p, %p) %s\n", context, ds, tagName(rpmdsTagN(
|
|
||||||
case RPMTAG_REQUIRENAME:
|
|
||||||
if (!_filter_values
|
|
||||||
|| (!fc->skipReq
|
|
||||||
- && !rpmfcMatchRegexps(fc->Rmires, fc->Rnmire, ds->N[0], 'R')))
|
|
||||||
+ && !rpmfcMatchRegexps(fc->Rmires, fc->Rnmire, ds->N[0], 'R'))
|
|
||||||
+ || rpmfcMatchRegexps(fc->FARmires, fc->FARnmire, ds->N[0], 'R'))
|
|
||||||
{
|
|
||||||
/* Add to package requires. */
|
|
||||||
rc = rpmdsMerge(&fc->requires, ds);
|
|
||||||
@@ -1097,6 +1098,12 @@ rpmRC rpmfcApply(rpmfc fc)
|
|
||||||
if (fc->RFnmire > 0)
|
|
||||||
rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoreqfiles patterns.\n"),
|
|
||||||
fc->RFnmire);
|
|
||||||
+ /* files matching __forceautoreqfiles will overwrite matches in __noautoreqfiles */
|
|
||||||
+ fc->FQRnmire = 0;
|
|
||||||
+ fc->FQRmires = rpmfcExpandRegexps("%{?__forceautoreqfiles}", &fc->FQRnmire);
|
|
||||||
+ if (fc->FQRnmire > 0)
|
|
||||||
+ rpmlog(RPMLOG_DEBUG, D_("added %d %%__forceautoreqfiles patterns.\n"),
|
|
||||||
+ fc->FQRnmire);
|
|
||||||
fc->Pnmire = 0;
|
|
||||||
fc->Pmires = rpmfcExpandRegexps("%{?__noautoprov}", &fc->Pnmire);
|
|
||||||
if (fc->Pnmire > 0)
|
|
||||||
@@ -1107,6 +1114,12 @@ rpmRC rpmfcApply(rpmfc fc)
|
|
||||||
if (fc->Rnmire > 0)
|
|
||||||
rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoreq patterns.\n"),
|
|
||||||
fc->Rnmire);
|
|
||||||
+ /* reqs matching __forceautoreq will overwrite __noautoreq */
|
|
||||||
+ fc->FARnmire = 0;
|
|
||||||
+ fc->FARmires = rpmfcExpandRegexps("%{?__forceautoreq}", &fc->FARnmire);
|
|
||||||
+ if (fc->FARnmire > 0)
|
|
||||||
+ rpmlog(RPMLOG_DEBUG, D_("added %d %%__forceautoreq patterns.\n"),
|
|
||||||
+ fc->FARnmire);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure something didn't go wrong previously! */
|
|
||||||
@@ -1171,6 +1184,18 @@ assert(fc->fn != NULL);
|
|
||||||
fc->skipReq = 1;
|
|
||||||
/*@innerbreak@*/ break;
|
|
||||||
}
|
|
||||||
+ /* Now check that file is not in list of files from expanded %%__forceautoreqfiles
|
|
||||||
+ * If yes, then remove skipReq */
|
|
||||||
+ if ((mire = (miRE)fc->FQRmires) != NULL)
|
|
||||||
+ for (j = 0; j < fc->FQRnmire; j++, mire++) {
|
|
||||||
+ fn = fc->fn[fc->ix] + fc->brlen;
|
|
||||||
+ if ((xx = mireRegexec(mire, fn, 0)) < 0)
|
|
||||||
+ /*@innercontinue@*/ continue;
|
|
||||||
+ rpmlog(RPMLOG_NOTICE, _("Forcing %s requires detection\n"),
|
|
||||||
+ fn);
|
|
||||||
+ fc->skipReq = 0;
|
|
||||||
+ /*@innerbreak@*/ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
xx = (*fcat->func) (fc);
|
|
||||||
diff --git a/lib/rpmfc.h b/lib/rpmfc.h
|
|
||||||
index b5d5430..ff29d79 100644
|
|
||||||
--- a/lib/rpmfc.h
|
|
||||||
+++ b/lib/rpmfc.h
|
|
||||||
@@ -110,6 +110,12 @@ struct rpmfc_s {
|
|
||||||
/*@null@*/
|
|
||||||
void * RFmires; /*!< Filter patterns from %{__noautoreqfile} */
|
|
||||||
int RFnmire;
|
|
||||||
+/*@null@*/
|
|
||||||
+ void * FQRmires; /*!< Filter patterns from %{__forceautoreqfile} */
|
|
||||||
+ int FQRnmire;
|
|
||||||
+/*@null@*/
|
|
||||||
+ void * FARmires; /*!< Filter patterns from %{__forceautoreq} */
|
|
||||||
+ int FARnmire;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
6
rpm.spec
6
rpm.spec
|
@ -61,7 +61,7 @@ Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: %{libver}.%{minorver}
|
Version: %{libver}.%{minorver}
|
||||||
Release: %{?prereldate:0.%{prereldate}.}88
|
Release: %{?prereldate:0.%{prereldate}.}87
|
||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
Group: System/Configuration/Packaging
|
Group: System/Configuration/Packaging
|
||||||
Url: http://rpm5.org/
|
Url: http://rpm5.org/
|
||||||
|
@ -533,7 +533,6 @@ Patch520: rpm-5.4.10-Multithreaded-XZ.patch
|
||||||
Patch521: rpm-5.4.10-Use-multithreaded-XZ-by-default-for-both-binary-and-.patch
|
Patch521: rpm-5.4.10-Use-multithreaded-XZ-by-default-for-both-binary-and-.patch
|
||||||
Patch522: rpm-5.4.10-multithreaded-xz-memlimit.patch
|
Patch522: rpm-5.4.10-multithreaded-xz-memlimit.patch
|
||||||
Patch523: rpm-5.4.10-Parse-private-dependencies-from-pkgconfig-files.patch
|
Patch523: rpm-5.4.10-Parse-private-dependencies-from-pkgconfig-files.patch
|
||||||
Patch524: rpm-5.4.10-Force-AutoReq-on-top-of-noautoreq.patch
|
|
||||||
|
|
||||||
BuildRequires: autoconf >= 2.57
|
BuildRequires: autoconf >= 2.57
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
|
@ -1203,9 +1202,6 @@ This package contains the RPM API documentation generated in HTML format.
|
||||||
%patch521 -p1 -b .MultithreadedXZbyDefault
|
%patch521 -p1 -b .MultithreadedXZbyDefault
|
||||||
%patch522 -p1 -b .MultithreadedXZ32bitMemLimit
|
%patch522 -p1 -b .MultithreadedXZ32bitMemLimit
|
||||||
%patch523 -p1 -b .ParsePkgconfigPrivate
|
%patch523 -p1 -b .ParsePkgconfigPrivate
|
||||||
# rpm-5.4.10-Force-AutoReq-on-top-of-noautoreq.patch
|
|
||||||
# Apply it with offsets which appear because of a lot of previous patches
|
|
||||||
patch -p1 < %{PATCH524}
|
|
||||||
|
|
||||||
#required by P55, P80, P81, P94..
|
#required by P55, P80, P81, P94..
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
|
Loading…
Add table
Reference in a new issue