archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: createtransfers.py script does not check for existence of existing sample zips #268

Open ross-spencer opened 5 years ago

ross-spencer commented 5 years ago

Expected behaviour

When the sample zip files are created, the existing ones should be overwritten so the data produced by the script is always up to date. When the new zips are overwritten the previous zip files should not also be wrapped in the new zip.

Current behaviour

Each time we run the script with an existing set of files already available, the previous set gets wrapped in the new zip. See this output from zipinfo as an example:

zipinfo windows_1252.zip 
Archive:  windows_1252.zip
Zip file size: 1724 bytes, number of entries: 4
drwxrwxr-x  2.0 unx        0 b- stor 18-Sep-26 15:52 windows_1252/
drwxrwxr-x  2.0 unx        0 b- stor 18-Sep-26 15:52 windows_1252/søster/
-rw-rw-r--  2.0 unx     1408 b- defN 18-Sep-25 12:28 windows_1252/windows_1252.zip
-rw-rw-r--  2.0 unx       98 b- defN 18-Sep-26 15:52 windows_1252/søster/cp1252_encoded_dirs.txt
4 files, 1506 bytes uncompressed, 1184 bytes compressed:  21.4%

Steps to reproduce

Run the makefile to produce simple transfers twice and observe the contents of the zip files created. (This only seems to affect the zip files created for variously-encoded-directories)


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

ross-spencer commented 5 years ago

After deleting the zip files and running make simple again we see this listing, sans zip:

artefactual@am18bionic:~/archivematica-sampledata$ zipinfo TestTransfers/sample-zip-packages/variously-encoded-dirs/windows_1252/windows_1252.zip 
Archive:  TestTransfers/sample-zip-packages/variously-encoded-dirs/windows_1252/windows_1252.zip
Zip file size: 487 bytes, number of entries: 3
drwxrwxr-x  2.0 unx        0 b- stor 18-Oct-11 20:29 windows_1252/
drwxrwxr-x  2.0 unx        0 b- stor 18-Oct-11 20:29 windows_1252/søster/
-rw-rw-r--  2.0 unx       98 b- defN 18-Oct-11 20:29 windows_1252/søster/cp1252_encoded_dirs.txt
3 files, 98 bytes uncompressed, 81 bytes compressed:  17.3%