diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-07-09 15:17:24 +0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-07-24 20:06:40 +0200 |
commit | dbfc6276c4aa50b79f1cf27cfc24badc0b18da8f (patch) | |
tree | 60930339ad301b41ac793237ff347ea95b45b267 /gbp/pkg | |
parent | e374ee5a2381ba30056c1fa33bdb515d99ec704e (diff) |
Change UpstreamSource to have PkgPolicy
The UpstreamSource class now gets a PkgPolicy in it's initialization.
Also, introduces new DebiaUpstreamSource class which is taken in use in
the scripts.
The PkgPolicy is not yet used for anything in UpstreamSource.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/pkg')
-rw-r--r-- | gbp/pkg/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/pkg/__init__.py b/gbp/pkg/__init__.py index 1fd17418..2e24648a 100644 --- a/gbp/pkg/__init__.py +++ b/gbp/pkg/__init__.py @@ -179,8 +179,9 @@ class UpstreamSource(object): @cvar _unpacked: path to the unpacked source tree @type _unpacked: string """ - def __init__(self, name, unpacked=None): + def __init__(self, name, unpacked=None, pkg_policy=PkgPolicy): self._orig = False + self._pkg_policy = pkg_policy self._path = name self.unpacked = unpacked @@ -317,7 +318,7 @@ class UpstreamSource(object): except gbpc.CommandExecFailed: # repackArchive already printed an error raise GbpError - return UpstreamSource(newarchive) + return type(self)(newarchive) @staticmethod def known_compressions(): |