docs: update pq manpages regarding pq command meta tags

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GbpOptionParser: allow using the default 'dest' attribute

Make it possible to add options without explicitly defining the 'dest'
attribute - in which case the default of OptionParser is used.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/rev_parse: use _git_inout()

instead of the deprecated _git_getoutput() method.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: raise GitRepositoryError instead of GbpError

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: Implement status method

Simple wrapper to the git-status command.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: allow repo inititialization from subdir

This allows initialization of a GitRepository object, even if the
current working directory (or path given to GitRepository) is not the
top level directory of the git repository.

Don't guess the git meta data dir, but, take it as reported by git
itself.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.add_files: use GitArgs

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.add_files: consistently update ALL tracked files

Use the --all option of git-add so that all tracked files are updated in
all conditions. Previously deletion of tracked files was not staged, for
example.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp.git: Reimplement rfc822 date parsing without dateutil

In order to get rid of dependency to dateutil.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
common/buildpackage: support for different archive formats

Adds support for defining the archive format of the output of
git_archive_single(), e.g. 'zip'. Defaults to 'tar', as before.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/_git_inout: implement support for filtering

Support filtering of the output of git command through a python
function.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Change compressor cmdline opts in compressor_opts to a list

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: rewrite git_archive()

Add support for filtering. That is, allow the caller to pipe the output
of git-archive through a filter command, usually a compression program.
This utilizes the new filtering functionality of the _git_inout()
method.

Also, gets rid of the hackish use of 'cwd' option.

The 'output' is now considered to be relative to the caller's cwd, not
the git repo dir. This should be more intuitive.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage/git_archive_single: use GitRepository.archive()

Use GitRepository.archive() method like git_archive_submodules() does.
This makes it possible to call git_archive_single() independent of the
callers current working directory.

Get rid of the pipe in git_archive_single() and utilize the filter
function of archive() method of GitRepository, instead.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage/dump_tree: use GitRepository.archive()

Make dump_tree() utilize the GitRepository.archive() method - similarly
to git_archive_submodules() - instead of ad-hoc Python pipes. This makes
dump_tree() work independent of the callers current working directory.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: add diff_status method

This is a method of getting the filename and status information of a
diff. That is, a list of files that changed and their status, "added",
"modified" etc.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
docs: enable building html docs with docbook2html

This is useful if sgml2x package is not available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Move get_compression() out of pkg.PkgPolicy class

Renames the function to parse_archive_filename() and changes it's
return values. Filename parsing is merely generic functionality, not
tied to any packaging policy.

The function now returns the base name of the file (that is, filename
without, archive and compression extensions), archive format and
compression method. Adds supported archive formats 'tar' and 'zip' and
file extension aliases, e.g. 'tgz'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
import-orig: simplify repack_source() and tmpdir handling

Now a tmpdir is always created and sources are always unpacked into
there.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
import-orig: move repacked_tarball_name() out from common

Moves repacked_tarball_name() from scripts/common back to the
Debian-specific script. The logic is too Debian-specific for RPM, after
all.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>