diff options
author | jbj <devnull@localhost> | 2003-01-27 17:45:53 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-01-27 17:45:53 +0000 |
commit | 4cab573997627bc9210a4c345da380a3ba83d2b8 (patch) | |
tree | 0f4f85ba81c9dc2e6b1dd7eafb4f5954930432ec | |
parent | c87fa0b0298dda7ae49e3b079a7d464934188fe2 (diff) | |
download | librpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.tar.gz librpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.tar.bz2 librpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.zip |
- fix: more debugedit.c problems.
CVS patchset: 6029
CVS date: 2003/01/27 17:45:53
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | doc/rpmbuild.8 | 2 | ||||
-rw-r--r-- | po/cs.po | 2 | ||||
-rw-r--r-- | po/da.po | 2 | ||||
-rw-r--r-- | po/de.po | 2 | ||||
-rw-r--r-- | po/fi.po | 2 | ||||
-rw-r--r-- | po/fr.po | 2 | ||||
-rw-r--r-- | po/gl.po | 2 | ||||
-rw-r--r-- | po/is.po | 2 | ||||
-rw-r--r-- | po/ja.po | 2 | ||||
-rw-r--r-- | po/ko.po | 2 | ||||
-rw-r--r-- | po/no.po | 2 | ||||
-rw-r--r-- | po/pl.po | 2 | ||||
-rw-r--r-- | po/pt.po | 2 | ||||
-rw-r--r-- | po/pt_BR.po | 2 | ||||
-rw-r--r-- | po/ro.po | 2 | ||||
-rw-r--r-- | po/rpm.pot | 2 | ||||
-rw-r--r-- | po/ru.po | 2 | ||||
-rw-r--r-- | po/sk.po | 2 | ||||
-rw-r--r-- | po/sl.po | 4 | ||||
-rw-r--r-- | po/sr.po | 2 | ||||
-rw-r--r-- | po/sv.po | 2 | ||||
-rw-r--r-- | po/tr.po | 2 | ||||
-rw-r--r-- | rpm.spec.in | 7 | ||||
-rw-r--r-- | tools/debugedit.c | 136 |
25 files changed, 150 insertions, 40 deletions
@@ -113,6 +113,7 @@ - file conflict checks with colors. - fix: debugedit.c problem. - permit anaconda to choose "presentation order". + - fix: more debugedit.c problems. 4.0.4 -> 4.1: - loosely wire beecrypt library into rpm. diff --git a/doc/rpmbuild.8 b/doc/rpmbuild.8 index cf39d7378..e6aa18d3f 100644 --- a/doc/rpmbuild.8 +++ b/doc/rpmbuild.8 @@ -181,7 +181,7 @@ for configuration details. When building the package, interpret \fIPLATFORM\fR as \fBarch-vendor-os\fR and set the macros \fB%_target\fR, -\fB%_target_arch\fR, and +\fB%_target_cpu\fR, and \fB%_target_os\fR accordingly. .SS "REBUILD AND RECOMPILE OPTIONS" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-07-24 10:02+0100\n" "Last-Translator: Milan Kerslager <kerslage@linux.cz>\n" "Language-Team: Czech <cs@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-04-05 23:03GMT\n" "Last-Translator: Claus Hindsgaul <claus_h@image.dk>\n" "Language-Team: Danish <dansk@klid.dk>\n" @@ -37,7 +37,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1998-08-03 18:02+02:00\n" "Last-Translator: Karl Eichwalder <ke@SuSE.DE>\n" "Language-Team: German <de@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1998-05-02 21:41:47-0400\n" "Last-Translator: Raimo Koski <rkoski@pp.weppi.fi>\n" "Language-Team: Finnish <linux@sot.com>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.1\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-01-13 22:31+0100\n" "Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n" "Language-Team: Galician <trasno@ceu.fi.udc.es>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-07-12 13:25+0000\n" "Last-Translator: Richard Allen <ra@hp.is>\n" "Language-Team: is <kde-isl@mmedia.is>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1999-12-01 22:49 +JST\n" "Last-Translator: Kanda Mitsuru <kanda@nn.iij4u.or.jp>\n" "Language-Team: JRPM <jrpm@linux.or.jp>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.4\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2002-03-04 17:17+0900\n" "Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n" "Language-Team: GNU Translation project <ko@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-06-27 12:24+0200\n" "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n" "Language-Team: Norwegian <no@li.org>\n" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1999-05-25 17:00+0100\n" "Last-Translator: Pawe³ Dziekoñski <pdziekonski@mml.ch.pwr.wroc.pl>\n" "Language-Team: Polish <pl@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2002-02-14 10:51+0000\n" "Last-Translator: José Nuno Coelho Sanarra Pires <jncp@rnl.ist.utl.pt>\n" "Language-Team: pt <morais@kde.org\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 4f369d071..40aca5291 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1999-04-10 12:00+EST\n" "Last-Translator: Cristian Gafton <gafton@redhat.com>\n" "Language-Team: Romanian <ro@li.org>\n" diff --git a/po/rpm.pot b/po/rpm.pot index ae7034f97..c9c1f5267 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2002-08-27 13:36-0400\n" "Last-Translator: Eugene Kanter, <eugene@blackcatlinux.com>\n" "Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 1999-04-08 21:37+02:00\n" "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n" "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n" @@ -1,12 +1,12 @@ # -*- mode:po; coding:iso-latin-2; -*- Slovenian messages for Redhat pkg. mngr. # Copyright (C) 2000 Free Software Foundation, Inc. # Primo¾ Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 2000. -# $Id: sl.po,v 1.368 2003/01/25 21:00:01 jbj Exp $ +# $Id: sl.po,v 1.369 2003/01/27 17:46:37 jbj Exp $ # msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2000-10-08 19:05+0200\n" "Last-Translator: Grega Fajdiga <gregor.fajdiga@telemach.net>\n" "Language-Team: Slovenian <sl@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.1\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2002-08-19 22:26+0200\n" "Last-Translator: Göran Uddeborg <goeran@uddeborg.pp.se>\n" "Language-Team: Swedish <sv@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: rpm 4.0.3\n" -"POT-Creation-Date: 2003-01-25 15:52-0500\n" +"POT-Creation-Date: 2003-01-27 12:37-0500\n" "PO-Revision-Date: 2001-07-05 08:02+300\n" "Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n" "Language-Team: Turkish <tr@li.org>\n" diff --git a/rpm.spec.in b/rpm.spec.in index 953ae29f9..a2a40292e 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -20,7 +20,7 @@ Name: rpm %define version @VERSION@ Version: %{version} %{expand: %%define rpm_version %{version}} -Release: 0.61 +Release: 0.62 Group: System Environment/Base Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz Copyright: GPL @@ -470,7 +470,10 @@ exit 0 %{__includedir}/popt.h %changelog -* Wed Jan 22 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.61 +* Mon Jan 27 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.67 +- fix: more debugedit.c problems. + +* Sat Jan 25 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.61 - permit anaconda to choose "presentation order". * Wed Jan 22 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.60 diff --git a/tools/debugedit.c b/tools/debugedit.c index cea971243..26f4f544a 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -38,6 +38,8 @@ #include "hashtab.h" +#define DW_TAG_partial_unit 0x3c + char *base_dir = NULL; char *dest_dir = NULL; char *list_file = NULL; @@ -424,6 +426,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) unsigned char opcode_base; uint_32 value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); + size_t abs_file_cnt = 0, abs_dir_cnt = 0; if (phase != 0) return 0; @@ -509,7 +512,11 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) return 1; } if (*file == '/') - memcpy (s, file, file_len + 1); + { + memcpy (s, file, file_len + 1); + if (dest_dir && has_prefix (file, base_dir)) + ++abs_file_cnt; + } else if (*dirt[value] == '/') { memcpy (s, dirt[value], dir_len); @@ -556,28 +563,90 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) read_uleb128 (ptr); read_uleb128 (ptr); } + ++ptr; if (dest_dir) { - ptr = dir; - while (*ptr != 0) + unsigned char *srcptr, *buf = NULL; + size_t base_len = strlen (base_dir); + size_t dest_len = strlen (dest_dir); + + if (dest_len == base_len) + abs_file_cnt = 0; + if (abs_file_cnt) + { + srcptr = buf = malloc (ptr - dir); + memcpy (srcptr, dir, ptr - dir); + ptr = dir; + } + else + ptr = srcptr = dir; + while (*srcptr != 0) { - if (*ptr == '/' && has_prefix (ptr, base_dir)) + size_t len = strlen (srcptr) + 1; + + if (*srcptr == '/' && has_prefix (srcptr, base_dir)) { - size_t base_len = strlen (base_dir); - size_t dest_len = strlen (dest_dir); + memcpy (ptr, dest_dir, dest_len); + if (dest_len < base_len) + { + memmove (ptr + dest_len, srcptr + base_len, + len - base_len); + ptr += dest_len - base_len; + ++abs_dir_cnt; + } + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); + } + else if (ptr != srcptr) + memmove (ptr, srcptr, len); + srcptr += len; + ptr += len; + } + + if (abs_dir_cnt + abs_file_cnt != 0) + { + size_t len = (abs_dir_cnt + abs_file_cnt) * (base_len - dest_len); + if (len == 1) + error (EXIT_FAILURE, 0, "-b arg has to be either the same length as -d arg, or more than 1 char shorter"); + memset (ptr, 'X', len - 1); + ptr += len - 1; + *ptr++ = '\0'; + } + *ptr++ = '\0'; + ++srcptr; + + while (*srcptr != 0) + { + size_t len = strlen (srcptr) + 1; + + if (*srcptr == '/' && has_prefix (srcptr, base_dir)) + { memcpy (ptr, dest_dir, dest_len); if (dest_len < base_len) { - memmove (ptr + dest_len, ptr + base_len, - strlen (dir + base_len) + 1); + memmove (ptr + dest_len, srcptr + base_len, + len - base_len); + ptr += dest_len - base_len; } elf_flagdata (debug_sections[DEBUG_STR].elf_data, ELF_C_SET, ELF_F_DIRTY); } - ptr = strchr (ptr, 0) + 1; + else if (ptr != srcptr) + memmove (ptr, srcptr, len); + srcptr += len; + ptr += len; + dir = srcptr; + read_uleb128 (srcptr); + read_uleb128 (srcptr); + read_uleb128 (srcptr); + if (ptr != dir) + memmove (ptr, dir, srcptr - dir); + ptr += srcptr - dir; } + *ptr = '\0'; + free (buf); } return 0; } @@ -613,13 +682,14 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) } } - if (debug_sections[DEBUG_STR].data && - t->attr[i].attr == DW_AT_comp_dir && - form == DW_FORM_strp) + if (t->attr[i].attr == DW_AT_comp_dir && + form == DW_FORM_strp && + debug_sections[DEBUG_STR].data) { char *dir; dir = debug_sections[DEBUG_STR].data + do_read_32 (ptr); + free (comp_dir); comp_dir = strdup (dir); if (phase == 1 && dest_dir && has_prefix (dir, base_dir)) @@ -637,7 +707,45 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) ELF_C_SET, ELF_F_DIRTY); } } - + else if ((t->tag == DW_TAG_compile_unit + || t->tag == DW_TAG_partial_unit) + && t->attr[i].attr == DW_AT_name + && form == DW_FORM_strp + && debug_sections[DEBUG_STR].data) + { + char *name; + + name = debug_sections[DEBUG_STR].data + do_read_32 (ptr); + if (*name == '/' && comp_dir == NULL) + { + char *enddir = strrchr (name, '/'); + + if (enddir != name) + { + comp_dir = malloc (enddir - name + 1); + memcpy (comp_dir, name, enddir - name); + comp_dir [enddir - name] = '\0'; + } + else + comp_dir = strdup ("/"); + } + + if (phase == 1 && dest_dir && has_prefix (name, base_dir)) + { + base_len = strlen (base_dir); + dest_len = strlen (dest_dir); + + memcpy (name, dest_dir, dest_len); + if (dest_len < base_len) + { + memmove (name + dest_len, name + base_len, + strlen (name + base_len) + 1); + } + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); + } + } + switch (form) { case DW_FORM_addr: @@ -1115,5 +1223,3 @@ main (int argc, char *argv[]) return 0; } - - |