Initial support for AIX big archive format. #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem description
This branch add basic support for AIX AR big format archive as documented here: https://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/ar_big.htm
Changes description
A new archive class was created since the format is different than BSD/GNU.
file type is reported as HEADER_GENERIC
file header for each file from archive is variable and this is why it is parsed from 2 read operations.
I have switched some methods from hidden (__X) to private (_X) so that I can reuse them in the new code.
New code is written with PEP8 and PEP257 (for docstring) styleguide...with the exception of tab indentation.
Please let me know if I should use other styleguide.
The code is written using TDD and this is why all tests are placed in a single file. There is no dedicated test file for failures. All tests for the new format are located in a single file, with docstring documenting the purpose of each tests. Also, no external / system files were used for testing, all file content is in memory or generated in tests.
How to try and test the changes
Please check that changes make sense and let me know if anything needs changes.
If you want to check a real file here are some files copied from an AIX system:
Simple archive libg.a
https://dl.dropboxusercontent.com/u/174543/aix-ar/libg.a
libpam with 2 members, with initial padding and 1 with padded header and anotehr without padded header
https://dl.dropboxusercontent.com/u/174543/aix-ar/libpam.a
shr.0 from libpam.a extracted using aix ar tool:
https://dl.dropboxusercontent.com/u/174543/aix-ar/shr.o
Thanks!