Missing patches silently ignored in -current emacs.SlackBuilds script
by azcomm from LinuxQuestions.org on (#6EMFK)
While investigating building a slightly customized version of emacs (I hope to enable native compilation and imagemagick) I noticed that there are two patch files referenced from the -current SlackBuild scripts which are not present in the source area. The build runs to completion as-is, and it appears that the commands used to apply those patches will not fail when the patches are completely missing despite having '|| exit 1' statements.
Is it expected that missing patches will be ignored by SlackBuild scripts?
More details:
I am using the exact set of source files at https://mirrors.slackware.com/slackw...ource/e/emacs/, (currently) without any modifications. To build I am just downloading the files to an otherwise empty directory and executing 'emacs.SlackBuild'.
The two patch lines in the script are:
Code:zcat $CWD/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/emacs.glibc-2.34.patch.gz | patch -p1 --verbose || exit 1Breaking down those lines, the 'zcat' command returns 1 due to the file being missing, but the subsequent patch returns 0 despite being given no input. Since 'set -o pipefail' is not present only the final return value is considered from the piped portion before the '||' and the script continues merrily onward.
The following message is present in the terminal log:
Code:gzip: <snip>/emacs/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz: No such file or directory
Hmm... I can't seem to find a patch in there anywhere.
Is it expected that missing patches will be ignored by SlackBuild scripts?
More details:
I am using the exact set of source files at https://mirrors.slackware.com/slackw...ource/e/emacs/, (currently) without any modifications. To build I am just downloading the files to an otherwise empty directory and executing 'emacs.SlackBuild'.
The two patch lines in the script are:
Code:zcat $CWD/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/emacs.glibc-2.34.patch.gz | patch -p1 --verbose || exit 1Breaking down those lines, the 'zcat' command returns 1 due to the file being missing, but the subsequent patch returns 0 despite being given no input. Since 'set -o pipefail' is not present only the final return value is considered from the piped portion before the '||' and the script continues merrily onward.
The following message is present in the terminal log:
Code:gzip: <snip>/emacs/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz: No such file or directory
Hmm... I can't seem to find a patch in there anywhere.