PCA pre_process_download_batch doesn't unseal volumes
I have:
- ([x] when completed)
-
searched https://gitlab.com/duplicity/duplicity/-/issues for similar issues. If you find a similar issue and the issue is still open, add a comment to the existing issue instead of opening a new one. If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. -
tested that this issue still occurs on the latest stable snap (install instructions: https://snapcraft.io/duplicity), please include the snap version ( snap info duplicity | grep installed) output:installed: x.xx.xx (xx) -
ideally, tested that this issue still occurs on the latest edge snap, if you can test without risking your data. Please include the snap version output: installed: x.xx.xx (xx)
Summary
pcabackend's pre_process_download_batch doesn't unseal volumes, resulting in unseal being launched only when _get is called. I think this is due to the use of subfolders:
- pre_process_download_batch is called with one remote_filenames : ['duplicity-full.20221105T180552Z.vol1.difftar.gpg']
- __list_objs(ffilter=lambda x: util.fsdecode(x[u'name']) in u_remote_filenames) returns no object as the names from get_container contains the subfolder : [{'hash': 'e6c50921feea2569e7ad54f9bd782def', 'name': 'Photos 2004/duplicity-full-signatures.20221105T180552Z.sigtar.gpg', 'bytes': 2859195, 'policy_retrieval_delay': None, 'last_modified': '2022-11-05T18:06:37.569650', 'content_type': 'application/octet-stream', 'policy_retrieval_state': 'sealed'}, {'hash': '31d89bedacabdc3fde1ab1aa0efd5e65', 'name': 'Photos 2004/duplicity-full.20221105T180552Z.manifest.gpg', 'bytes': 1508, 'policy_retrieval_delay': None, 'last_modified': '2022-11-05T18:06:41.581540', 'content_type': 'application/octet-stream', 'policy_retrieval_state': 'sealed'}, {'hash': '85f16130502c640475ac81a658823780', 'name': 'Photos 2004/duplicity-full.20221105T180552Z.vol1.difftar.gpg', 'bytes': 135152260, 'policy_retrieval_delay': None, 'last_modified': '2022-11-05T18:06:00.816550', 'content_type': 'application/octet-stream', 'policy_retrieval_state': 'sealed'}]
Environment
Debian bookworm
duplicity 0.8.22
duplicity verify --compare-data -vi "pca://Photos/Photos 2003" "~/Images/Photos 2003"
Steps to reproduce
(How one can reproduce the issue - this is very important)
What is the current bug behaviour?
(What actually happens)
What is the expected correct behaviour?
(What you should see instead)
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Possible fixes
Add the prefix to every remote_filename in pre_process_download_batch objs = self.__list_objs(ffilter=lambda x: util.fsdecode(x[u'name']) in [self.prefix+s for s in u_remote_filenames]) The attached patch seems to work for me : pcabackend.diff