-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch files not listed in payload manifest #99
Comments
Hi Thomas, Thanks for submitting this. You are correct that the specification regarding the fetch component does not allow for hashes and that it needs to be put in the manifest file. I don't use the fetch feature that much so it doesn't get as much testing as it probably should. I took a look at the code, and there needs to be some logic added to |
This should be fixed in release 5.0.4 |
Hi John, Thanks for adding the fix that fast. I've tested the new version but there still seems to be an issue as during "real usage" (outside the test world) the check for fetch paths does not work. I guess the reason are problems while dealing with relative paths, but let's go back to 'given-when-then' style: Given
When
Then
All other combinations, e.g. using Paths.get("data/default/out.html") or Paths.get("/Users/jejkal/NetBeansProjects/RepoInteropTool/testBag/data/default/out.html") as FetchFile path cause PayloadWriter not to identify the payload as FetchFile as 'fetchPaths.contains(relativePayloadPath.normalize())' assumes to have paths relative to the bag data dir in the list. In the test work everything works fine as in PayloadTestWriterTest#testWritePayloadFilesMinusFetchFiles() you are providing 'rootDir' as argument 'bagDataDir' whereas PayloadWriter#writeVersionDependentPayloadFiles(final Bag bag, final Path outputDir) uses bag.getRootDir().resolve("data") Thanks for your help. Regards, |
Thanks for finding this. Now whatever path you give in the fetch item should be what it uses in the fetch.txt. This change will be in the 5.0.5 release |
that format for fetch file is correct This reverts commit e7e76da.
Hi,
I'm using bagit-java (5.0.3) and today I've reached a point where I'm wondering if the library is breaking (a little bit) with the BagIt standard. Let's try to formulate my problem in 'given-when-then' style. ;-)
Given
When
Then
Obviously, it is also not possible to provide (manually) hashes for files that should be fetched by the bag consumer. According to the example in the BagIt specification (see https://tools.ietf.org/html/draft-kunze-bagit-08#section-5.2) fetch items are listed in 'manifest-.txt'.
Are there plans or is there the possibility to fix this behaviour or was it implemented in that way on purpose?
Regards,
Thomas
The text was updated successfully, but these errors were encountered: