Nice!

You beat me to the fix ;-)

I was staring at just how gawd awful find-debuginfo.sh really is.

That script is really really twisty and in need of writing in C, not shell.

73 de Jeff

On May 18, 2011, at 9:32 AM, Pinto Elia wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>  ____________________________________________________________________________
> 
>  Server: rpm5.org                         Name:   Pinto Elia
>  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
>  Module: rpm                              Date:   18-May-2011 15:32:50
>  Branch: HEAD                             Handle: 2011051813324901
> 
>  Modified files:
>    rpm                     CHANGES
>    rpm/scripts             find-debuginfo.sh
> 
>  Log:
>    Sort file list for debuginfo extraction.
>    (inspired by Robert Schiele 
> http://lists.rpm.org/pipermail/rpm-list/2011-May/000894.html)
> 
>    Submitted by: Elia Pinto
> 
>  Summary:
>    Revision    Changes     Path
>    1.3642      +2  -0      rpm/CHANGES
>    1.15        +7  -7      rpm/scripts/find-debuginfo.sh
>  ____________________________________________________________________________
> 
>  patch -p0 <<'@@ .'
>  Index: rpm/CHANGES
>  ============================================================================
>  $ cvs diff -u -r1.3641 -r1.3642 CHANGES
>  --- rpm/CHANGES      16 May 2011 00:33:13 -0000      1.3641
>  +++ rpm/CHANGES      18 May 2011 13:32:49 -0000      1.3642
>  @@ -1,4 +1,6 @@
>   5.4.0 -> 5.4.1:
>  +    - devzero2000: Sort file list for debuginfo extraction. 
>  +      (inspired by Robert Schiele 
> http://lists.rpm.org/pipermail/rpm-list/2011-May/000894.html)
>       - proyvind: update doxygen input filename paths.
>       - proyvind: fix assertion error when trying to install packages without
>       required permissions.
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/find-debuginfo.sh
>  ============================================================================
>  $ cvs diff -u -r1.14 -r1.15 find-debuginfo.sh
>  --- rpm/scripts/find-debuginfo.sh    10 Aug 2010 12:18:52 -0000      1.14
>  +++ rpm/scripts/find-debuginfo.sh    18 May 2011 13:32:50 -0000      1.15
>  @@ -176,7 +176,7 @@
>   # Strip ELF binaries
>   find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
>                            \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
>  -                 -print |
>  +                 -print | LANG=C sort |
>   file -N -f - | sed -n -e 's/^\(.*\):[       ]*.*ELF.*, not stripped/\1/p' |
>   xargs --no-run-if-empty stat -c '%h %D_%i %n' |
>   while read nlinks inum f; do
>  @@ -232,7 +232,7 @@
> 
>   # For each symlink whose target has a .debug file,
>   # make a .debug symlink to that file.
>  -find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print |
>  +find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print | LANG=C sort |
>   while read f
>   do
>     t=$(readlink -m "$f").debug
>  @@ -249,19 +249,19 @@
>     LC_ALL=C sort -z -u "$SOURCEFILE" | egrep -v -z 
> '(<internal>|<built-in>)$' |
>     (cd "$RPM_BUILD_DIR"; cpio -pd0mL "${RPM_BUILD_ROOT}/usr/src/debug")
>     # stupid cpio creates new directories in mode 0700, fixup
>  -  find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
>  +  find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 | LANG=C sort |
>     xargs --no-run-if-empty -0 chmod a+rx
>   fi
> 
>   if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; 
> then
>     ((nout > 0)) ||
>     test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
>  -  (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
>  +  (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) | LANG=C sort |
>     sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
> 
>     (cd "${RPM_BUILD_ROOT}/usr"
>  -   test ! -d lib/debug || find lib/debug ! -type d
>  -   test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1
>  +   test ! -d lib/debug || find lib/debug ! -type d | LANG=C sort
>  +   test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1 | LANG=C 
> sort
>     ) | sed 's,^,/usr/,' >> "$LISTFILE"
>   fi
> 
>  @@ -321,7 +321,7 @@
>   done
>   if ((nout > 0)); then
>     # Now add the right %dir lines to each output list.
>  -  (cd "${RPM_BUILD_ROOT}"; find usr/lib/debug -type d) |
>  +  (cd "${RPM_BUILD_ROOT}"; find usr/lib/debug -type d) | LANG=C sort
>     sed 's#^.*$#\\@^/&/@{h;s@^.*$@%dir /&@p;g;}#' |
>     LC_ALL=C sort -ur > "${LISTFILE}.dirs.sed"
>     i=0
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-...@rpm5.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to