Skip to content

Commit

Permalink
Merge pull request ostreedev#191 from cgwalters/dirmeta-followup
Browse files Browse the repository at this point in the history
tar/export: Do emit dirmeta for `/sysroot`
  • Loading branch information
cgwalters committed Dec 17, 2021
2 parents cb45b45 + 59e7a12 commit 2d1805c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/tar/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@ impl<'a, W: std::io::Write> OstreeTarWriter<'a, W> {
for item in dirs {
let (name, contents_csum, meta_csum) = item.to_tuple();
let name = name.to_str();
// Special hack because tar stream for containers can't have duplicates.
if is_root && name == SYSROOT {
continue;
}
let metadata = {
hex::encode_to_slice(meta_csum, &mut hexbuf)?;
let meta_csum = std::str::from_utf8(&hexbuf)?;
Expand All @@ -362,6 +358,10 @@ impl<'a, W: std::io::Write> OstreeTarWriter<'a, W> {
// Safety: We passed the correct variant type just above
ostree::DirMetaParsed::from_variant(meta_v).unwrap()
};
// Special hack because tar stream for containers can't have duplicates.
if is_root && name == SYSROOT {
continue;
}
hex::encode_to_slice(contents_csum, &mut hexbuf)?;
let dirtree_csum = std::str::from_utf8(&hexbuf)?;
let subpath = &dirpath.join(name);
Expand Down

0 comments on commit 2d1805c

Please sign in to comment.