Commit Graph

2 Commits

Author SHA1 Message Date
Nalin Dahyabhai bee80f0e36 tarFilterer: handle multiple archives
When processing .dockerignore files, we produce mini-archives for each
individual item being copied as part of a directory tree, so if we pass
them through a tarFilterer, it needs to not give up when it hits the end
of the first archive that it sees.

Add a flag to the tarFilterer that it sets when it closes the writing
end of the pipe that it's reading, and if the flag isn't set when the
reader finds an EOF, have the reader gear up to read another archive
instead of just refusing to process any more data.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-07-28 15:51:36 -04:00
Nalin Dahyabhai aad1fc5878 CompositeDigester: add the ability to filter tar streams
Rework CompositeDigester so that it can handle type "".
Add a newTarFilterer() inspired by imagebuilder's, that we'll be able to
use to adjust headers before digesting them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-07-17 12:07:39 -04:00