[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix DEVEL=1 build
From: |
Mark H Weaver |
Subject: |
Re: [PATCH] Fix DEVEL=1 build |
Date: |
Thu, 05 Oct 2023 22:11:45 -0400 |
Hi Yuchen,
Yuchen Pei <id@ypei.org> writes:
> [...] IIRC it is pretty simple:
> some non-existing directory component in $file_to_append
>
> for example, we have
> data/files-to-append/l10n/it/browser/browser/preferences/preferences.ftl
>
> which in the cat command expands to
>
> cat data/files-to-append/l10n/it/browser/browser/preferences/preferences.ftl
> >> l10n/it/browser/browser/preferences/preferences.ftl
>
> at least part of the l10n/it/browser/browser/preferences/ does not exist
> yet when this cat command is attempted.
I see now. Thanks for explaining it.
In general, I'd prefer that 'makeicecat' not modify its own Git checkout
under any circumstances. I want to be able to run it from the Git
checkout I'm currently editing[1]. I want to be able to run it in
DEVEL=1 and later in DEVEL=0 from the same checkout. Also, when testing
a DEVEL=1 build, I want the sole langpack to be complete, including the
translations of the "IceCat-specific privacy settings" in
<about:preferences>.
So, I'd prefer a fix along these lines: (untested)
--8<---------------cut here---------------start------------->8---
--- a/makeicecat
+++ b/makeicecat
@@ -344,6 +344,10 @@ apply_patches()
shopt -u nullglob
for file_to_append in $(cd "${DATADIR}"/files-to-append; find . -type f
-print); do
+ # In DEVEL mode, some of the files to append will not be
+ # present, namely files in omitted locales. Silently skip
+ # those files. When not in DEVEL mode, catch all errors.
+ (( DEVEL )) && [[ ! -f $file_to_append ]] && continue
echo Appending new data to the end of file: $file_to_append
cat "${DATADIR}"/files-to-append/$file_to_append >> $file_to_append
done
--8<---------------cut here---------------end--------------->8---
What do you think?
Regards
Mark
[1] Note that 'makeicecat' need not be run from its own directory.
Intead, I recommend to create an empty directory, cd into it, and
then run 'makeicecat' from that directory using a command like:
"../gnuzilla/makeicecat".
- Re: [PATCH] Fix DEVEL=1 build, Mark H Weaver, 2023/10/05
- Re: [PATCH] Fix DEVEL=1 build, Yuchen Pei, 2023/10/05
- Re: [PATCH] Fix DEVEL=1 build,
Mark H Weaver <=
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, Mark H Weaver, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/20
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/20
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, Mark H Weaver, 2023/10/11
- Re: [PATCH] Fix DEVEL=1 build, bill-auger, 2023/10/11