[Rpm-maint] [Suse patch] debugedit: include compilation directory if used
Michael, any idea what the case behind this patch was? It's not that I object to it or anything, I just have no clue what this is supposed to be doing :) - Panu - --- Include compilation directory in source file list if used. --- tools/debugedit.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) --- tools/debugedit.c.orig 2007-04-08 22:55:58.0 +0200 +++ tools/debugedit.c 2007-04-09 01:34:51.0 +0200 @@ -488,6 +488,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, uint_32 value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; + int comp_dir_used = 0; if (phase != 0) return 0; @@ -586,6 +587,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, } else { + comp_dir_used = 1; memcpy (s, comp_dir, comp_dir_len); s[comp_dir_len] = '/'; memcpy (s + comp_dir_len + 1, dirt[value], dir_len); @@ -624,7 +626,31 @@ edit_dwarf2_line (DSO *dso, uint_32 off, read_uleb128 (ptr); } ++ptr; - + + if (comp_dir_used list_file_fd != -1 + (base_dir == NULL || has_prefix (comp_dir, base_dir))) +{ + char *p; + size_t size; + ssize_t ret; + + size = comp_dir_len + 1; + p = comp_dir; + if (base_dir) + { + p += strlen (base_dir); + size -= strlen (base_dir); + } + while (size 0) + { + ret = write (list_file_fd, p, size); + if (ret == -1) + break; + size -= ret; + p += ret; + } +} + if (dest_dir) { unsigned char *srcptr, *buf = NULL; ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [Suse patch] debugedit: include compilation directory if used
On Fri, 2007-06-08 at 14:43 +0200, Michael Schroeder wrote: On Fri, Jun 08, 2007 at 02:25:23PM +0300, Panu Matilainen wrote: Michael, any idea what the case behind this patch was? It's not that I object to it or anything, I just have no clue what this is supposed to be doing :) I just asked Andreas Schwab, the guy who created the patch. He said that it is needed so that one can translate relative pathnames to absolute ones. (CC to Andreas, maybe he can shed some more light on this.) I think we have fixed the bug in a different way see: changeset: 5965:68f3eb1cad71 user:Paul Nasrat [EMAIL PROTECTED] date:Mon Apr 23 10:49:31 2007 +0100 summary: Fix debugedit for relative paths (#23) changeset: 5941:4bafdb5ffdbf user:Paul Nasrat [EMAIL PROTECTED] date:Thu Mar 15 15:59:55 2007 + summary: Fix for debugedit with ../../ in paths Paul ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [Suse patch] debugedit: include compilation directory if used
Michael Schroeder [EMAIL PROTECTED] writes: On Fri, Jun 08, 2007 at 02:25:23PM +0300, Panu Matilainen wrote: Michael, any idea what the case behind this patch was? It's not that I object to it or anything, I just have no clue what this is supposed to be doing :) I just asked Andreas Schwab, the guy who created the patch. He said that it is needed so that one can translate relative pathnames to absolute ones. (CC to Andreas, maybe he can shed some more light on this.) compilation directory + relative file name must be a valid file name, which can only be true when the compilation directory exits. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely different. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint