Over time we had some cases where orphaned files from the libstdc++
documentation (manual) still appeared on our web site under
https://gcc.gnu.org/onlinedocs/libstdc++.
Jonathan and me played a bit of whack-a-mole over the years addressing
things manually. Earlier this year I realized this was caused by our
update_web_docs_libstdcxx_git script (and it's predecessors for SVN and
CVS since 2001) using cpio to copy data in place - which adds, and never
deletes anything no longer in the origin directory.
This addresses it by switching from cpio to rsync.
Updated in the gccadmin account on gcc.gnu.org, successfully tested there
(first with rsync --dry-run, than without), and pushed.
Yeah.
This means you folks (libstdc++) can now add and delete files in the
manual as you wish, and the copy on the web should follow suit within
less than 24 hours.
Gerald
rsync generally is a more commonly used tool for syncing data - among
others it retains time stamps and is able to remove orphaned files on
the receiver side.
We just need to exclude some directories and a symlink from being
removed as "orphaned", since they originate elsewhere.
maintainer-scripts:
* update_web_docs_libstdcxx_git: Copy our "inner" documentation
into the web area using rsync instead of cpio and remove orphaned
files.
---
maintainer-scripts/update_web_docs_libstdcxx_git | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/maintainer-scripts/update_web_docs_libstdcxx_git
b/maintainer-scripts/update_web_docs_libstdcxx_git
index 570e7fffb13..6fbf2f84ecb 100755
--- a/maintainer-scripts/update_web_docs_libstdcxx_git
+++ b/maintainer-scripts/update_web_docs_libstdcxx_git
@@ -35,8 +35,9 @@ cd $WORKDIR
git -C $GITROOT archive master $GETTHIS | tar xf -
cd $GETTHIS
-# copy the tree to the onlinedocs area, preserve directory structure
-find . -depth -print | cpio -pd $WWWDIR 2>&1 | egrep -v "$FILTER"
+# Copy the tree to the libstdc++ onlinedocs area and remove orphans (taking
+# care to keep some directories coming from a different source).
+rsync -ahv --delete-after -f '- /images/*' -f '- /libstdc*' -f '-
latest-doxygen' . $WWWDIR 2>&1 | egrep -v "$FILTER"
err=${PIPESTATUS[1]}
if [ $err -gt 0 ]; then
@@ -45,4 +46,3 @@ fi
cd /
/bin/rm -rf $WORKDIR
-
--
2.50.1