File bsc1248618-pesign-repackage.spec.in-Stop-repacking-process-when.patch of Package pesign-obs-integration.40552
From 4d22c01719344b74d90b5ef4fc74799a6c0e3ac9 Mon Sep 17 00:00:00 2001
From: Chun-Yi Lee <jlee@suse.com>
Date: Sat, 30 Aug 2025 11:01:18 +0800
Subject: [PATCH] pesign-repackage.spec.in: Stop repacking process when no RPMs
be found
In some cases that we did not find supported RPMs which include *.ko
or *.efi files. We shouldl stop repacking process.
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
---
pesign-repackage.spec.in | 7 +++++++
1 file changed, 7 insertions(+)
Index: pesign-obs-integration-10.2+git20230612.4699910/pesign-repackage.spec.in
===================================================================
--- pesign-obs-integration-10.2+git20230612.4699910.orig/pesign-repackage.spec.in
+++ pesign-obs-integration-10.2+git20230612.4699910/pesign-repackage.spec.in
@@ -84,6 +84,13 @@ for rpm in %_sourcedir/*.rpm; do
rpms=("${rpms[@]}" "$rpm")
done
popd
+if [ ${#rpms[@]} -eq 0 ]; then
+ echo "No repackage RPMs found, exiting."
+ # Found that _build_create_debug can not disable debug package building
+ # in this case. So removed rpm-debuginfo.specpart here. (bsc#1248618)
+ rm -f %buildroot/../SPECPARTS/rpm-debuginfo.specpart
+ exit 0
+fi
# Copy files other than the meta files and RPMs to %_topdir/OTHER
OTHER_FILES=`find %_sourcedir/ -maxdepth 1 -type f \
-not -regex '.*\.\(rpm\|spec\|rsasign\|sig\|crt\)' \