rpms/rpm/devel find-debuginfo.sh,1.1,1.2 rpm.spec,1.243,1.244

Panu Matilainen (pmatilai) fedora-extras-commits at redhat.com
Thu Aug 9 07:09:09 UTC 2007


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23017

Modified Files:
	find-debuginfo.sh rpm.spec 
Log Message:
- fix new find-debuginfo.sh on noarch packages by Roland McGrath



Index: find-debuginfo.sh
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/find-debuginfo.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- find-debuginfo.sh	8 Aug 2007 10:06:16 -0000	1.1
+++ find-debuginfo.sh	9 Aug 2007 07:08:36 -0000	1.2
@@ -178,7 +178,7 @@
      		     \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
 		     -print |
 file -N -f - | sed -n -e 's/^\(.*\):[ 	]*.*ELF.*, not stripped/\1/p' |
-xargs stat -c '%h %D_%i %n' |
+xargs --no-run-if-empty stat -c '%h %D_%i %n' |
 while read nlinks inum f; do
   get_debugfn "$f"
   [ -f "${debugfn}" ] && continue
@@ -244,23 +244,29 @@
   fi
 done
 
-mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
-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 | xargs -0 chmod a+rx
-
-gendirs=src
-((nout > 0)) || gendirs='lib src'
-for d in $gendirs; do
-  (cd ${RPM_BUILD_ROOT}/usr/$d; find debug -type d) |
-  sed "s,^,%dir /usr/$d/," >> $LISTFILE
-done
+if [ -s "$SOURCEFILE" ]; then
+  mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
+  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 |
+  xargs --no-run-if-empty -0 chmod a+rx
+fi
 
-(cd ${RPM_BUILD_ROOT}/usr
- find lib/debug ! -type d
- find src/debug -mindepth 1 -maxdepth 1
-) | sed 's,^,/usr/,' >> $LISTFILE
+if [ -d ${RPM_BUILD_ROOT}/usr/lib -o -d ${RPM_BUILD_ROOT}/usr/src ]; then
+  gendirs=src
+  ((nout > 0)) || gendirs='lib src'
+  for d in $gendirs; do
+    test ! -d ${RPM_BUILD_ROOT}/usr/$d ||
+    (cd ${RPM_BUILD_ROOT}/usr/$d; find debug -type d) |
+    sed "s,^,%dir /usr/$d/," >> $LISTFILE
+  done
+
+  (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
+  ) | sed 's,^,/usr/,' >> $LISTFILE
+fi
 
 # Append to $1 only the lines from stdin not already in the file.
 append_uniq()


Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -r1.243 -r1.244
--- rpm.spec	8 Aug 2007 11:16:17 -0000	1.243
+++ rpm.spec	9 Aug 2007 07:08:36 -0000	1.244
@@ -14,7 +14,7 @@
 Name: rpm
 Version: 4.4.2.1
 %{expand: %%define rpm_version %{version}}
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source: rpm-%{rpm_version}.tar.gz
@@ -460,6 +460,9 @@
 %{__includedir}/popt.h
 
 %changelog
+* Thu Aug  9 2007 Panu Matilainen <pmatilai at redhat.com> - 4.4.2.1-4
+- fix new find-debuginfo.sh on noarch packages by Roland McGrath
+
 * Wed Aug  8 2007 Panu Matilainen <pmatilai at redhat.com> - 4.4.2.1-3
 - make peace with new glibc checks on open() wrt internal bdb and rpm itself
 




More information about the fedora-extras-commits mailing list