From: Prarit Bhargava <prarit(a)redhat.com>
redhat/configs: Fix rm warning on error
When an unset config is found, process_configs.sh cleans up and returns an
error. In this case the .newconfigs file is not created and errors
like
rm: cannot remove '.newoptions18': No such file or directory
rm: cannot remove '.newoptions16': No such file or directory
rm: cannot remove '.newoptions17': No such file or directory
are output to the user.
Since we output the "real" error at the end of the output, these errors
can be safely ignored.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/configs/process_configs.sh b/redhat/configs/process_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/process_configs.sh
+++ b/redhat/configs/process_configs.sh
@@ -262,7 +262,7 @@ function process_config()
rm .newoptions"${count}"
RETURNCODE=1
fi
- rm .newoptions"${count}"
+ rm -f .newoptions"${count}"
grep -E 'config.*warning' .listnewconfig"${count}" >
.warnings"${count}"
if test -n "$CHECKWARNINGS" && test -s .warnings"${count}"
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1778