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
lib/src/tar/write: make sure we add the links when filtering the tar #251
Conversation
5f0bb35
to
52dfdbc
Compare
The output of:
Shows:
|
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.
Awesome, thanks so much for tracking this down!
lib/src/tar/write.rs
Outdated
// Need to use the entry.link_name not the header.link_name | ||
// as it is shortened for some reason... | ||
let target_link = entry.link_name()?; |
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 think it'd be cleanest if we dispatched on the entry type, like this:
match entry.header().entry_type() {
tar::EntryType::Link | tar::EntryType::Symlink => { /* use append_link() * }
o => { dest.append_data(&mut header, normalized, entry }
}
or so?
It's also worth referencing e.g. alexcrichton/tar-rs#192 here
Co-authored-by: Colin Walters <walters@verbum.org>
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!
This pulls in ostreedev/ostree-rs-ext#251 at least which I believe is the patch which fixes the errors we're seeing when package layering in some cases. xref https://bugzilla.redhat.com/show_bug.cgi?id=2095528
No description provided.