Refactoring of package metadata regex matching

Lets compile the pattern into one regex instead of calling 4 different
patterns.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Refactor resetting of uid/gid so that it is reusable

We need this for the topmost directory but we don't want to have the
pattern matching active at that time.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Fix handling of --include option

In most cases the --include option was not working correctly. Especially it
broke backward compatibility when the argument is not a pattern.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Fix handling of --exclude option

In most cases the --exclude option was not working correctly. Especially it
broke backward compatibility when the argument is not a pattern.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Refactor subdir handling of tarchecker's to prevent code duplication

This way the knowledge of what directory entries are present in the
sub-directory is kept in one place instead of three.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Merge pull request #61 from jblunck/fix_include_exclude

Fix --include/--exclude after python rewrite
Merge pull request #62 from jblunck/fix_hgtest

Fix Mercurial version format strings in unittest
Extend fixture to create commits with a specific timestamp

This is the required preparation of the framework for the tests that check
tar_scm for always creating a binary identical tarball from the same commit.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Use commit timestamp as mtime for files and directories in tarball

Otherwise the tarball will not be binary identical even if it is created
from the same source tag. In some cases this will lead to unnecessary
rebuilds.

Signed-off-by: Jan Blunck <jblunck@infradead.org>