From 85447d4e89fcc6ceee24eb678f3661f8ea1290dd Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 8 Aug 2013 12:29:39 -0400 Subject: [PATCH] Fix duplicate file warnings. The find-debuginfo.sh script will return duplicate entries of certain files even though the input is uinque. This results in rpm build warnings like this: ~~~ Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64 warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug ~~~ The solutions is to make the output file list uinque by post processing it after it is output by find-debuginfo.sh. The solution removes the warnings and produces no visible change in the output rpms. --- glibc.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/glibc.spec b/glibc.spec index c24f62d..bd35de6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1322,8 +1322,25 @@ egrep -v "$auxarches_debugsources" \ # the common debuginfo package. list_debug_archives >> debuginfocommon.filelist +# It happens that find-debuginfo.sh produces duplicate entries even +# though the inputs are unique. Therefore we sort and unique the +# entries in the debug file lists. This avoids the following warnings: +# ~~~ +# Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64 +# warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug +# warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug +# warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug +# warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug +# ~~~ +sort -u debuginfocommon.filelist > debuginfocommon2.filelist +mv debuginfocommon2.filelist debuginfocommon.filelist + %endif # %{debuginfocommonarches} +# Remove any duplicates output by a buggy find-debuginfo.sh. +sort -u debuginfo.filelist > debuginfo2.filelist +mv debuginfo2.filelist debuginfo.filelist + %endif # 0%{?_enable_debug_packages} # Remove the `dir' info-heirarchy file which will be maintained