]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-debuginfo.patch
- don't run find-debuginfo if not needed
[packages/rpm.git] / rpm-debuginfo.patch
1 diff -urN rpm-4.3.org/macros.in rpm-4.3/macros.in
2 --- rpm-4.3.org/macros.in       2004-05-31 17:16:23.251095072 +0200
3 +++ rpm-4.3/macros.in   2004-05-31 17:35:47.653079064 +0200
4 @@ -118,15 +118,20 @@
5  %debug_package \
6  %ifnarch noarch\
7  %global __debug_package 1\
8 -%package debug\
9 +%package debuginfo\
10  Summary: Debug information for package %{name}\
11 +Summary(pl): Informacje dla debuggera dla pakietu %{name}\
12  Group: Development/Debug\
13  AutoReqProv: 0\
14 -%description debug\
15 +%description debuginfo\
16  This package provides debug information for package %{name}.\
17  Debug information is useful when developing applications that use this\
18  package or when debugging this package.\
19 -%files debug -f debugfiles.list\
20 +%description debuginfo -l pl\
21 +Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
22 +Informacje te s± przydatne przy rozwijaniu aplikacji u¿ywaj±cych tego\
23 +pakietu oraz przy odpluskwianiu samego pakietu.\
24 +%files debuginfo -f debugfiles.list\
25  %defattr(-,root,root)\
26  %endif\
27  %{nil}
28 @@ -844,7 +849,11 @@
29  %__spec_install_pre    %{___build_pre}
30  %__spec_install_body   %{___build_body}
31  %__spec_install_post\
32 +%if %{?_enable_debug_packages:1}%{!?_enable_debug_packages:0}\
33 +%if %{_enable_debug_packages}\
34  %{?__debug_package:%{__debug_install_post}}\
35 +%endif\
36 +%endif\
37  %{__arch_install_post}\
38  %{__os_install_post}\
39  %{nil}
40 @@ -1250,7 +1259,12 @@
41  unset DISPLAY ||:\
42  %{nil}
43  
44 -%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
45 +%install \
46 +%if %{?_enable_debug_packages:1}%{!?_enable_debug_packages:0}\
47 +%if %{_enable_debug_packages}\
48 +%{?buildsubdir:%{debug_package}}\
49 +%endif\
50 +%endif\
51  %%install\
52  LANG=C\
53  export LANG\
54 @@ -1407,7 +1421,7 @@
55      %{?verbose:set -x;} \
56      if [ -d "$RPM_BUILD_ROOT" ]; then \
57         echo "Strip executable binaries, archives and shared object files."; \
58 -       filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \
59 +       filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*\.debug" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \
60         elfexelist=`echo $filelist | xargs -r file | \
61                 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \
62         elfsharedlist=`echo $filelist | xargs -r file | \
63 diff -urN rpm-4.3.org/scripts/find-debuginfo.sh rpm-4.3/scripts/find-debuginfo.sh
64 --- rpm-4.3.org/scripts/find-debuginfo.sh       2004-05-31 17:16:16.146175184 +0200
65 +++ rpm-4.3/scripts/find-debuginfo.sh   2004-05-31 17:16:51.153853208 +0200
66 @@ -26,12 +26,14 @@
67  
68         mkdir -p "${debugdn}"
69         echo extracting debug info from $f
70 -       /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
71 +       /usr/bin/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
72         if test -w "$f"; then
73 -               eu-strip -f "${debugfn}" "$f" || :
74 +               eu-strip -f "${debugfn}" -o "$f.tmp" "$f" || :
75 +               rm -f "$f.tmp"
76         else
77                 chmod u+w "$f"
78 -               eu-strip -f "${debugfn}" "$f" || :
79 +               eu-strip -f "${debugfn}" -o "$f.tmp" "$f" || :
80 +               rm -f "$f.tmp"
81                 chmod u-w "$f"
82         fi
83  done
This page took 0.093399 seconds and 4 git commands to generate.