|
Igor Gnatenko |
889695 |
From 1cd1d45798a30b95bd5535463002c148bf04e7e2 Mon Sep 17 00:00:00 2001
|
|
Igor Gnatenko |
53960f |
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Igor Gnatenko |
53960f |
Date: Fri, 28 Jul 2017 18:32:06 +0200
|
|
Igor Gnatenko |
53960f |
Subject: [PATCH] reference proper debug files whenever RemovePathPostfixes is
|
|
Igor Gnatenko |
53960f |
used
|
|
Igor Gnatenko |
53960f |
|
|
Igor Gnatenko |
53960f |
Closes: https://github.com/rpm-software-management/rpm/issues/280
|
|
Igor Gnatenko |
889695 |
Reviewed-by: Mark Wielaard <mark@klomp.org>
|
|
Igor Gnatenko |
53960f |
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Igor Gnatenko |
889695 |
(cherry picked from commit 98efb7f6dc222ed175516298a34e807053d125f4)
|
|
Igor Gnatenko |
53960f |
---
|
|
Igor Gnatenko |
53960f |
build/files.c | 13 +++++++++++++
|
|
Igor Gnatenko |
53960f |
1 file changed, 13 insertions(+)
|
|
Igor Gnatenko |
53960f |
|
|
Igor Gnatenko |
53960f |
diff --git a/build/files.c b/build/files.c
|
|
Igor Gnatenko |
889695 |
index 42709a549..3b93ac559 100644
|
|
Igor Gnatenko |
53960f |
--- a/build/files.c
|
|
Igor Gnatenko |
53960f |
+++ b/build/files.c
|
|
Igor Gnatenko |
889695 |
@@ -2791,6 +2791,19 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
|
|
Igor Gnatenko |
889695 |
namel = strlen(name);
|
|
Igor Gnatenko |
53960f |
if (namel > 6 && !strcmp(name + namel - 6, ".debug"))
|
|
Igor Gnatenko |
53960f |
namel -= 6;
|
|
Igor Gnatenko |
53960f |
+
|
|
Igor Gnatenko |
53960f |
+ /* fileRenameMap doesn't necessarily have to be initialized */
|
|
Igor Gnatenko |
53960f |
+ if (pkg->fileRenameMap) {
|
|
Igor Gnatenko |
889695 |
+ const char **names = NULL;
|
|
Igor Gnatenko |
53960f |
+ int namec = 0;
|
|
Igor Gnatenko |
53960f |
+ fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL);
|
|
Igor Gnatenko |
53960f |
+ if (namec) {
|
|
Igor Gnatenko |
53960f |
+ if (namec > 1)
|
|
Igor Gnatenko |
53960f |
+ rpmlog(RPMLOG_WARNING, _("%s was mapped to multiple filenames"), name);
|
|
Igor Gnatenko |
53960f |
+ name = *names;
|
|
Igor Gnatenko |
53960f |
+ namel = strlen(name);
|
|
Igor Gnatenko |
53960f |
+ }
|
|
Igor Gnatenko |
53960f |
+ }
|
|
Igor Gnatenko |
53960f |
|
|
Igor Gnatenko |
53960f |
/* generate path */
|
|
Igor Gnatenko |
53960f |
rasprintf(&path, "%s%s%.*s%s.debug", buildroot, DEBUG_LIB_DIR, namel, name, uniquearch);
|