Accepting request 694739 from home:hellcp:rust
- Backport rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch for correct generation of dependencies by other dep generators OBS-URL: https://build.opensuse.org/request/show/694739 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=494
This commit is contained in:
parent
e1f89e4f7e
commit
34d956065f
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 16 08:40:11 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
|
||||
|
||||
- Backport rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
||||
for correct generation of dependencies by other dep generators
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 7 15:42:17 CET 2019 - mls@suse.de
|
||||
|
||||
|
3
rpm.spec
3
rpm.spec
@ -128,6 +128,7 @@ Patch114: source_date_epoch_buildtime.diff
|
||||
Patch117: findsupplements.diff
|
||||
Patch118: dwz-compression.patch
|
||||
Patch119: getncpus.diff
|
||||
Patch120: rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
||||
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
||||
Patch6465: auto-config-update-riscv64.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -226,7 +227,7 @@ rm -f rpmdb/db.h
|
||||
%patch -P 93 -P 94 -P 99
|
||||
%patch -P 100 -P 102 -P 103 -P 108
|
||||
%patch -P 109 -P 114 -P 117 -P 118
|
||||
%patch -P 119
|
||||
%patch -P 119 -P 120
|
||||
|
||||
%ifarch aarch64 ppc64le riscv64
|
||||
%patch6464
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 0d2176c9a3ae44fd0a67c9983b1a5ba0a00388fd Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Mon, 15 Oct 2018 19:49:57 +0200
|
||||
Subject: [PATCH] rpmfc: push name/epoch/version/release macro before invoking
|
||||
depgens
|
||||
|
||||
Fixes: https://github.com/rpm-software-management/rpm/issues/502
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
build/rpmfc.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git build/rpmfc.c build/rpmfc.c
|
||||
index 2fbfc69ab..eccd6582a 100644
|
||||
--- build/rpmfc.c
|
||||
+++ build/rpmfc.c
|
||||
@@ -1334,9 +1334,31 @@ static rpmRC rpmfcApplyExternal(rpmfc fc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+typedef const struct macroExport_s {
|
||||
+ const char * name;
|
||||
+ rpmTagVal tag;
|
||||
+} * macroExport;
|
||||
+
|
||||
+static struct macroExport_s const macroExportList[] = {
|
||||
+ { "name", RPMTAG_NAME },
|
||||
+ { "epoch", RPMTAG_EPOCH },
|
||||
+ { "version", RPMTAG_VERSION },
|
||||
+ { "release", RPMTAG_RELEASE },
|
||||
+ { NULL, 0 }
|
||||
+};
|
||||
+
|
||||
rpmRC rpmfcApply(rpmfc fc)
|
||||
{
|
||||
rpmRC rc;
|
||||
+ Package pkg = fc->pkg;
|
||||
+ macroExport me;
|
||||
+ for (me = macroExportList; me->name; me++) {
|
||||
+ char *val = headerGetAsString(pkg->header, me->tag);
|
||||
+ if (val) {
|
||||
+ rpmPushMacro(NULL, me->name, NULL, val, RMIL_SPEC);
|
||||
+ free(val);
|
||||
+ }
|
||||
+ }
|
||||
/* If new-fangled dependency generation is disabled ... */
|
||||
if (!rpmExpandNumeric("%{?_use_internal_dependency_generator}")) {
|
||||
/* ... then generate dependencies using %{__find_requires} et al. */
|
||||
@@ -1347,6 +1369,9 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
/* ... otherwise generate per-file dependencies */
|
||||
rc = rpmfcApplyInternal(fc);
|
||||
}
|
||||
+ for (me = macroExportList; me->name; me++)
|
||||
+ if (headerIsEntry(pkg->header, me->tag))
|
||||
+ rpmPopMacro(NULL, me->name);
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user