[mingw-filesystem] Get rid of the USE_OLD_METHOD hack in mingw-find-debuginfo

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 18:19:23 UTC 2012


commit f3b87dde70bb68fd831883caa2e04e8917255fd8
Author: Kalev Lember <kalevlember at gmail.com>
Date:   Tue Mar 6 19:59:11 2012 +0200

    Get rid of the USE_OLD_METHOD hack in mingw-find-debuginfo

 macros.mingw32          |    7 +------
 mingw-filesystem.spec   |    1 +
 mingw-find-debuginfo.sh |   18 +++++-------------
 3 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/macros.mingw32 b/macros.mingw32
index 9938813..e9afc97 100644
--- a/macros.mingw32
+++ b/macros.mingw32
@@ -237,13 +237,8 @@ package or when debugging this package.                                  \
 %_mingw32_cmake                %{mingw32_cmake}
 %_mingw32_description          %{mingw32_description}
 %_mingw32_debug_package        %{mingw32_debug_package}
+%_mingw32_debug_install_post   %{mingw_debug_install_post}
 
-# The old implementation of the _mingw32_debug_package macro isn't
-# forward-compatible with the new implementation using mingw_debug_package
-# so keep the old implementation here for backwards compatibility
-%_mingw32_debug_install_post   \
-   %{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir} old\
-%{nil}
 
 # This macro has been dropped from the new guidelines, keep
 # it here around for backwards compatibility
diff --git a/mingw-filesystem.spec b/mingw-filesystem.spec
index 3c02327..e3d05c3 100644
--- a/mingw-filesystem.spec
+++ b/mingw-filesystem.spec
@@ -246,6 +246,7 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
 %changelog
 * Tue Mar 06 2012 Kalev Lember <kalevlember at gmail.com> - 95-3
 - Merge copy-n-paste duplicate %%mingw32_debug_package code
+- Get rid of the USE_OLD_METHOD hack in mingw-find-debuginfo.sh
 
 * Tue Feb 28 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 95-2
 - Fixed broken summary tags
diff --git a/mingw-find-debuginfo.sh b/mingw-find-debuginfo.sh
index 4a5e4ff..72d3d60 100755
--- a/mingw-find-debuginfo.sh
+++ b/mingw-find-debuginfo.sh
@@ -6,8 +6,6 @@ if [ -z "$1" ] ; then BUILDDIR="."
 else BUILDDIR=$1
 fi
 
-if [ "$2" = "old" ] ; then USE_OLD_METHOD=true; else USE_OLD_METHOD=false; fi
-
 for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"`
 do
 	case $(mingw-objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
@@ -27,14 +25,8 @@ do
 	popd
 done
 
-if [ "$USE_OLD_METHOD" = "true" ] ; then
-	find $RPM_BUILD_ROOT -type f -name "*.exe.debug" -or -name "*.dll.debug" |
-            sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/debugfiles.list
-else
-	shift
-	for target in $@; do
-		prefix=`rpm --eval "%{${target}_prefix}"`
-		find $RPM_BUILD_ROOT$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" |
-			sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/${target}-debugfiles.list
-	done
-fi
+for target in $@; do
+	prefix=`rpm --eval "%{${target}_prefix}"`
+	find $RPM_BUILD_ROOT$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" |
+		sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/${target}-debugfiles.list
+done


More information about the scm-commits mailing list