Remove unused imports
Return boolean types from is_ methods

instead of a match object or None
Better document how one derives from PkgTypes
Allow for upper case characters in the upstream version

Closes: #703694
Purging of the build dir should be configurable via a config file

so introdice --git[-no]-purge which is consistent with the other
boolean options and deprecate --git-dont-purge.

Closes: #702200
ComponentTestBase: close streamhandler when stopping log capture

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
packaging: Add man as dependency

Required by GitRepository._cmd_has_feature() method.

Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
gbp-pull: update tags, too

To make sure that the tags are in sync with the remote.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests/component: pylint fixes

Add module docstring and wrap one overlong line.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: skip test_Changelog if 'dch' tool is not available

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
setup: possibility to skip nosetest requirements

Makes it possible to not require test requirements by defining
WITHOUT_NOSETESTS environment variable when running setup.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/_cmd_has_feature: more intelligent parsing

More intelligent parsing of the git output (man page). Try to
parse optional options like '--[no-]standard-notes' of git-show
correctly. In this example both 'no-standard-notes' and 'standard-notes'
would be available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitArgs: utilize the add() method in other add_X methods

Only use the add() method for updating the argument list. This makes the
code more robust and makes all add method variant types support the same
argument types.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
ComponentTestBase: capability to check files of repo

Makes it possible to check that the correct files are present in
the working copy of the repo.

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

To get correct report if coverage is invoked directly (not through
nose/disttools) in order to get an xml report, for example.

Currently only used for restricting the coverage output to the gbp
python package. That is, same thing that 'cover-package' option in
setup.cfg does.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests.test_GitRepository: import and setup gbp.log

In order to initialize gbp logging properly. Fixes false positives when
the GitRepository tests are run alone.

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>
Support unit tests on Ubuntu: allow "ubuntu" as part of version

In tests/11_test_dch_main.py, there are checks for package names. This
change adds "ubuntu" and related release bane strings ORed in regexp
match to the patterns that are expecteds in assert statements.

Signed-off-by: Olev Kartau <olev.kartau@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.show: use _git_inout()

Instead of the deprecated _git_getoutput() method. Also, capture stderr
and put the error message to the exception, instead.

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>