teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.12.0-golang-debuginfo.patch

Florian Festi 7307a5
From 363c015da5cbf315df267dc53580290984039804 Mon Sep 17 00:00:00 2001
Florian Festi 7307a5
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Florian Festi 7307a5
Date: Wed, 15 Apr 2015 09:51:08 +0200
Florian Festi 7307a5
Subject: [PATCH] Make sure references to go sources in debuginfo packages go
Florian Festi 7307a5
 to the installed path and not the source file in the build environment.
Florian Festi 7307a5
Florian Festi 7307a5
 - Resolves: rhbz#1184221
Florian Festi 7307a5
---
Florian Festi 7307a5
 tools/debugedit.c | 4 ++--
Florian Festi 7307a5
 1 file changed, 2 insertions(+), 2 deletions(-)
Florian Festi 7307a5
Florian Festi 7307a5
diff --git a/tools/debugedit.c b/tools/debugedit.c
Florian Festi 7307a5
index 0f85885..cf89312 100644
Florian Festi 7307a5
--- a/tools/debugedit.c
Florian Festi 7307a5
+++ b/tools/debugedit.c
Florian Festi 7307a5
@@ -480,7 +480,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase)
Florian Festi 7307a5
   unsigned char *endcu, *endprol;
Florian Festi 7307a5
   unsigned char opcode_base;
Florian Festi 7307a5
   uint32_t value, dirt_cnt;
Florian Festi 7307a5
-  size_t comp_dir_len = strlen (comp_dir);
Florian Festi 7307a5
+  size_t comp_dir_len = !comp_dir ? 0 : strlen (comp_dir);
Florian Festi 7307a5
   size_t abs_file_cnt = 0, abs_dir_cnt = 0;
Florian Festi 7307a5
 
Florian Festi 7307a5
   if (phase != 0)
Florian Festi 7307a5
@@ -950,7 +950,7 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
Florian Festi 7307a5
 	}
Florian Festi 7307a5
     }
Florian Festi 7307a5
 
Florian Festi 7307a5
-  if (found_list_offs && comp_dir)
Florian Festi 7307a5
+  if (found_list_offs)
Florian Festi 7307a5
     edit_dwarf2_line (dso, list_offs, comp_dir, phase);
Florian Festi 7307a5
 
Florian Festi 7307a5
   free (comp_dir);
Florian Festi 7307a5
-- 
Florian Festi 7307a5
2.1.0
Florian Festi 7307a5