On Sat, Sep 12, 2026 at 06:36:11PM +0200, Gerald Pfeifer wrote:
> maintainer-scripts:
>       * update_web_docs_git: Stop generating .pdf.gz copies of
>       .pdf files.

This change broke the installation of the web docs.

We don't compress *.pdf files anymore (good), but then there is in the
  # And copy the resulting files to the web server
section
  if cmp -s file1 file2; then
    :
  else
    cp $file $DOCSDIR/$file
    cp $file.gz $DOCSDIR/$file.gz
  fi
and that fails if the *.pdf.gz file isn't there, see
https://gcc.gnu.org/pipermail/gccadmin/2026q3/024564.html
...
Renaming ./gcc/Target_002dSpecific-Options.html to 
./gcc/Target-Specific-Options.html
Renaming 
./gcc/Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html to 
./gcc/Objective-C-and-Objective-C_002b_002b-Dialect-Options.html
cp: cannot stat 'cppinternals.pdf.gz': No such file or directory
So, all we got there was cppinternals.pdf but not other pdf files, nor
*.tar.gz etc.

The following patch fixes it, tested by running the script patched
with this patch by hand as gccadmin - the onlinedocs seem to be ok again.

Ok for trunk?

2026-09-17  Jakub Jelinek  <[email protected]>

        * update_web_docs_git: Ignore installation of $file.gz files
        which don't exist.

--- a/maintainer-scripts/update_web_docs_git    2026-09-12 16:36:52.941625950 
+0000
+++ b/maintainer-scripts/update_web_docs_git    2026-09-17 11:41:42.855212283 
+0000
@@ -297,7 +297,7 @@ for file in */*.html *.ps *.pdf *.tar; d
     :
   else
     cp $file $DOCSDIR/$file
-    cp $file.gz $DOCSDIR/$file.gz
+    [ -f $file.gz ] && cp $file.gz $DOCSDIR/$file.gz
   fi
 done
 


        Jakub

Reply via email to