public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - fix new find-debuginfo.sh on noarch packages by Roland McGrath
Date: Mon, 23 Nov 2026 09:24:20 GMT	[thread overview]
Message-ID: <179542586081.1.4579064688660245462.rpms-rpm-3c2319fe6e41@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 3c2319fe6e412dab273b0587f64244db7d361122
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2007-08-09T07:08:36+00:00
Stats  : +27/-18 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/3c2319fe6e412dab273b0587f64244db7d361122?branch=pmatilai-v6

Log:
- fix new find-debuginfo.sh on noarch packages by Roland McGrath

---
diff --git a/find-debuginfo.sh b/find-debuginfo.sh
index e62c5ae..63d195c 100755
--- a/find-debuginfo.sh
+++ b/find-debuginfo.sh
@@ -178,7 +178,7 @@ find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \
      		     \( -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 @@ do
   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()

diff --git a/rpm.spec b/rpm.spec
index 6755e60..682f6c3 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -14,7 +14,7 @@ Summary: The RPM package management system
 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 @@ exit 0
 %{__includedir}/popt.h
 
 %changelog
+* Thu Aug  9 2007 Panu Matilainen <pmatilai@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@redhat.com> - 4.4.2.1-3
 - make peace with new glibc checks on open() wrt internal bdb and rpm itself
 

                 reply	other threads:[~2026-11-23  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542586081.1.4579064688660245462.rpms-rpm-3c2319fe6e41@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox