2009-02-19 22:19:42 +01:00
|
|
|
From: Jan Blunck <jblunck@suse.de>
|
|
|
|
Subject: Let debuginfo packages provide the build-id
|
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
This patch lets debuginfo packages provide build-id like follows:
|
2009-02-19 22:19:42 +01:00
|
|
|
|
|
|
|
debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517
|
|
|
|
|
|
|
|
Users can therefore ask zypper to install the correct debuginfo package with:
|
|
|
|
|
|
|
|
zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517"
|
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
--- ./macros.in.orig 2011-05-11 15:59:08.000000000 +0000
|
|
|
|
+++ ./macros.in 2011-05-11 15:59:31.000000000 +0000
|
|
|
|
@@ -182,7 +182,8 @@
|
2009-02-19 22:19:42 +01:00
|
|
|
%package debuginfo\
|
|
|
|
Summary: Debug information for package %{name}\
|
|
|
|
Group: Development/Debug\
|
|
|
|
-AutoReqProv: 0\
|
|
|
|
+AutoReq: 0\
|
|
|
|
+AutoProv: 1\
|
|
|
|
#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
|
|
|
|
%description debuginfo\
|
|
|
|
This package provides debug information for package %{name}.\
|
2011-05-16 18:07:44 +02:00
|
|
|
--- ./scripts/debuginfo.prov.orig 2011-05-11 15:59:31.000000000 +0000
|
|
|
|
+++ ./scripts/debuginfo.prov 2011-05-11 15:59:31.000000000 +0000
|
2009-02-19 22:19:42 +01:00
|
|
|
@@ -0,0 +1,12 @@
|
|
|
|
+#!/bin/sh
|
|
|
|
+
|
|
|
|
+while read instfile ; do
|
|
|
|
+ case $instfile in
|
|
|
|
+ */usr/lib/debug/.build-id/*.debug)
|
|
|
|
+ if [ -f "$instfile" ] ; then
|
|
|
|
+ BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p')
|
|
|
|
+ echo "debuginfo(build-id) = $BUILDID"
|
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+done
|