download.eclipse.org archive does not preserve directory structure
Summary
If I archive a directory that is already on archive.eclipse.org, it archives it into a subdirectory, losing directory structure and causing the https://www.eclipse.org/downloads/download.php script to not be able to find it. This issue led to https://www.eclipse.org/lists/epp-dev/msg06591.html
Steps to reproduce
- Create a new directory on download.eclipse.org
- Create two files in that directory
- Archive one of those files - note how the directory structure has been created on archive.eclipse.org
- Archive the directory created in step 1
What is the current bug behavior?
- On archive.eclipse.org the directory name will be doubled. The file from step 3 will be in upper dir, the other in the nested one
What is the expected correct behavior?
- The files in the directory are archived to the same relative location on archive.eclipse.org
- Failing that, an error because the directory exists.
Relevant logs and/or screenshots
You can run this script to setup the condition (step 1 and 2) - this is job#101 in https://ci.eclipse.org/packaging/job/jonah-releng-test/
You can see the result of running all the steps in https://archive.eclipse.org/technology/epp/archivetest/
ssh genie.packaging@projects-storage.eclipse.org /bin/bash << EOF
set -u # run with unset flag error so that missing parameters cause build failure
set -e # error out on any failed commands
set -x # echo all commands used for debugging purposes
rm -rf /home/data/httpd/archive.eclipse.org/technology/epp/archivetest
rm -rf /home/data/httpd/download.eclipse.org/technology/epp/archivetest
mkdir -p /home/data/httpd/download.eclipse.org/technology/epp/archivetest
touch /home/data/httpd/download.eclipse.org/technology/epp/archivetest/file1
touch /home/data/httpd/download.eclipse.org/technology/epp/archivetest/file2
EOF