-
Notifications
You must be signed in to change notification settings - Fork 293
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
Hardlinks are dereferenced in generated archives #1896
Conversation
f7c6c6e
to
0b8c317
Compare
} | ||
|
||
_, err = tw.Write(buf) | ||
_, err = io.Copy(tw, tr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this line could throw the same error reported here
0b8c317
to
9f8044d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jjbustamante it's cool to see this taking shape. I left a couple comments in case it's helpful
e3a6ac6
to
074967a
Compare
232de13
to
76fb460
Compare
Signed-off-by: Juan Bustamante <[email protected]>
Co-authored-by: Natalie Arellano <[email protected]> Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
76fb460
to
5f5f2af
Compare
Signed-off-by: Juan Bustamante <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @jjbustamante - I left one comment/question about the test assertion, but this seems just about ready. Hats off to you for figuring out the Windows stuff.
Signed-off-by: Juan Bustamante <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1896 +/- ##
==========================================
- Coverage 79.69% 79.64% -0.05%
==========================================
Files 172 174 +2
Lines 13046 13126 +80
==========================================
+ Hits 10396 10453 +57
- Misses 1995 2010 +15
- Partials 655 663 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
Summary
This PR adds a fix to handle hardlinks included into a buildpack when
pack buildpack package
is executed.Output
Before
large-file
andlarge-file2
references the same file with a hardlink, we can notice the size of the buildpack image is bigger than expected because the hardlink is lost during the image creation.Using dive, we can see:
After
After the fix is applied, the final image size is as expected not duplicating the files
Using dive, we can see:
Documentation
Related
Resolves #1286