111 lines
3.5 KiB
Diff
111 lines
3.5 KiB
Diff
From 8559f43fe16789fd23e620fdf4c5c0ee9584cefa Mon Sep 17 00:00:00 2001
|
|
From: Eric Gerbier <gerbier@users.sourceforge.net>
|
|
Date: Sun, 13 Oct 2024 11:07:26 +0200
|
|
Subject: [PATCH] bugfix : the comment-missing option can only apply on
|
|
installed packages
|
|
|
|
---
|
|
man/en/rpmrebuild.1.in | 1 +
|
|
man/fr_FR.UTF-8/rpmrebuild.1.in | 1 +
|
|
man/fr_FR/rpmrebuild.1.in | 1 +
|
|
rpmrebuild_files.sh | 9 ++-------
|
|
rpmrebuild_parser.src | 12 ++++++++++++
|
|
5 files changed, 17 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/man/en/rpmrebuild.1.in b/man/en/rpmrebuild.1.in
|
|
index 535f46d..197325d 100644
|
|
--- a/man/en/rpmrebuild.1.in
|
|
+++ b/man/en/rpmrebuild.1.in
|
|
@@ -31,6 +31,7 @@ set files posix capabilities as installed files
|
|
.TP
|
|
\fB\-c, \-\-comment\-missing\fP=<\fIyes\fP|\fIno\fP>
|
|
comment out in the specfile missing files. Default: \fBno\fP.
|
|
+only applies on installed rpm, not on package files
|
|
.TP
|
|
\fB\-D, \-\-define\fP=<\fIdefines\fP>
|
|
defines to be passed to rpmbuild.
|
|
diff --git a/man/fr_FR.UTF-8/rpmrebuild.1.in b/man/fr_FR.UTF-8/rpmrebuild.1.in
|
|
index a991a27..e72cb71 100644
|
|
--- a/man/fr_FR.UTF-8/rpmrebuild.1.in
|
|
+++ b/man/fr_FR.UTF-8/rpmrebuild.1.in
|
|
@@ -29,6 +29,7 @@ utiliser les capacités posix des fichiers installés
|
|
.TP
|
|
\fB\-c, \-\-comment\-missing\fP=<\fIyes\fP|\fIno\fP>
|
|
commente les fichiers manquants dans le fichier specfile. Defaut: \fBno\fP (non).
|
|
+ne s'applique qu'aux packages installés, pas aux fichiers
|
|
.TP
|
|
\fB\-D, \-\-define\fP=<\fIdefines\fP>
|
|
définition(s) à passer au programme \fBrpmbuild\fP.
|
|
diff --git a/man/fr_FR/rpmrebuild.1.in b/man/fr_FR/rpmrebuild.1.in
|
|
index 1a02194..663f8f1 100644
|
|
--- a/man/fr_FR/rpmrebuild.1.in
|
|
+++ b/man/fr_FR/rpmrebuild.1.in
|
|
@@ -29,6 +29,7 @@ utiliser les capacit
|
|
.TP
|
|
\fB\-c, \-\-comment\-missing\fP=<\fIyes\fP|\fIno\fP>
|
|
commente les fichiers manquants dans le fichier specfile. Defaut: \fBno\fP (non).
|
|
+ne s'applique qu'aux packages installÚs, pas aux fichiers
|
|
.TP
|
|
\fB\-D, \-\-define\fP=<\fIdefines\fP>
|
|
définition(s) à passer au programme \fBrpmbuild\fP.
|
|
diff --git a/rpmrebuild_files.sh b/rpmrebuild_files.sh
|
|
index 3655234..af9c3f3 100755
|
|
--- a/rpmrebuild_files.sh
|
|
+++ b/rpmrebuild_files.sh
|
|
@@ -107,6 +107,8 @@ while :; do
|
|
*\\*) file=${file//\\/\\\\} ;;
|
|
*) ;;
|
|
esac
|
|
+
|
|
+ # COMMENT_MISSING only applies on installed rpm
|
|
miss_str=""
|
|
if [ "$RPMREBUILD_COMMENT_MISSING" = "yes" ]; then
|
|
if [ -e "$file" ]; then
|
|
@@ -122,13 +124,6 @@ while :; do
|
|
lang_str=""
|
|
else
|
|
lang_str="%lang($file_lang) "
|
|
- if [ -e "$file" ]; then
|
|
- miss_str=""
|
|
- else
|
|
- if [ ! -h "$file" ]; then
|
|
- miss_str='# MISSING: '
|
|
- fi
|
|
- fi
|
|
fi
|
|
|
|
# %dir handling
|
|
diff --git a/rpmrebuild_parser.src b/rpmrebuild_parser.src
|
|
index 46c640b..3357840 100755
|
|
--- a/rpmrebuild_parser.src
|
|
+++ b/rpmrebuild_parser.src
|
|
@@ -1473,6 +1473,7 @@ function CommandLineParsing
|
|
##############################################################################
|
|
function CheckOptions
|
|
{
|
|
+ # RPMREBUILD_NOTESTINSTALL
|
|
if [ -n "$RPMREBUILD_package_install" ]
|
|
then
|
|
# force package test
|
|
@@ -1482,6 +1483,17 @@ function CheckOptions
|
|
# no test if work on files (not installed)
|
|
RPMREBUILD_NOTESTINSTALL="1"
|
|
fi
|
|
+
|
|
+ # RPMREBUILD_COMMENT_MISSING can not apply on rpm files
|
|
+ if [ -n "$RPMREBUILD_package_flag" ]
|
|
+ then
|
|
+ if [ "$RPMREBUILD_COMMENT_MISSING" = 'yes' ]
|
|
+ then
|
|
+ RPMREBUILD_COMMENT_MISSING='no'
|
|
+ Warning '(CheckOptions) COMMENT_MISSING can not be used on rpm file'
|
|
+ fi
|
|
+ fi
|
|
+
|
|
return 0
|
|
}
|
|
###############################################################################
|
|
--
|
|
2.46.0
|
|
|