git ubuntu import: update pristine-tar imports to use common code
1) Modify orig_imported() to take a set of paths to tarballs and a
distribution name. It will see if the given tarballs have been imported
identically to the current repository for the given distribution.
2) Use the gitubuntu/dsc.py accessors for the orig tarball and component
tarballs.
1) pristine_tar_branches - a context manager that manipulates the
per-distro pristine-tar branches
2) pristine_tar_list - returns a list of imported tarballs for a given
distro
3) pristine_tar_extract - obtains the pristine-tar tarball corresponding
to a given srcpkg and version (the srcpkg is necessary as it is in the
tarball name) in a distro
Effectively, given a list of OrigSearchEntrys, iterate them, trying each
in order. If the build must succeed with one of them, fail out when it
doesn't. Convert 'changelog' source entries to the appropriate value
('debian' or 'ubuntu') based upon the actual changelog file.
This also adds APIs for symlinking in the parent directory (for when a
tarball is found in the cache, and we want to link to it).
Note, this also corrects how the cache is populated, by using the source
parameter to be part of the path so that debian and ubuntu caches are
different.
This will simply try to use tarballs from the parent directory, if they
match a simple regex. In future commits, this behavior will be extended
to leverage pristine-tar for verification.