LibraryOfCongress / bagger

The Bagger application packages data files according to the BagIt specification.
Other
120 stars 19 forks source link

bag with partial payload & local data #39

Closed serious-steve closed 7 years ago

serious-steve commented 7 years ago

I have a question regarding bags which contain fetch.txt but also some files in the data/ dir. I couldn't find a way to create those in bagger, they either are entirely holey or entirely whole. I created such a bag manually and opened it in bagger. It is reported as compliant, incomplete and invalid, but it cannot be used. The payload defined in fetch.txt cannot be retrieved be retrieved to the data/ dir.

Isn't it possible to retrieve it, and check completeness and validity thereafter? I find it very useful to have such bag and need to know if existing python/java implementations can treat this kind of bags properly.

bag1.zip

johnscancella commented 7 years ago

I couldn't find a way to create those in bagger, they either are entirely holey or entirely whole.

that is correct. Bagger does not contain this functionality

It is reported as compliant, incomplete and invalid, but it cannot be used.

it is invalid because you are missing a file in addition to the file specified in the fetch.txt (data/ubuntu.img).

Isn't it possible to retrieve it, and check completeness and validity thereafter?

Not in Bagger. If you need to retrieve files use the java command line tool bagit fillholey <BAG DIR> Note that the python command line tool does not contain the ability to retrieve missing files, so you must use the java command line tool. You can download it here

serious-steve commented 7 years ago

Thanks for clarification. I forgot to remove the data/ubuntu.img from the manifest :1st_place_medal: I created another example bag and ran what you suggested bagit fillholey /tmp/bag2 and it works. So I can consider the bag as compliant which is what I wanted to be sure about thanks bag2.zip