summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-04-29 14:45:44 +0200
committerGuido Günther <agx@sigxcpu.org>2013-04-29 14:48:24 +0200
commit45c2346f6a52aec196dd89b8d09d8b06d05b8867 (patch)
tree2ca5e6855cddf445e7667537a452411e4f751f4f
parentaee9284d3dba4ab415321a2e389d62fe49ff9b91 (diff)
ChangeLog: Remove is_native
to avoid accidental usage. Use DebianSource.is_native instead.
-rw-r--r--gbp/deb/changelog.py6
-rw-r--r--gbp/deb/source.py2
-rw-r--r--tests/test_Changelog.py9
3 files changed, 1 insertions, 16 deletions
diff --git a/gbp/deb/changelog.py b/gbp/deb/changelog.py
index 2d2f0168..2857431f 100644
--- a/gbp/deb/changelog.py
+++ b/gbp/deb/changelog.py
@@ -168,12 +168,6 @@ class ChangeLog(object):
"""
return self._cp.has_key('Epoch')
- def is_native(self):
- """
- Whether this is a native Debian package
- """
- return not '-' in self.version
-
@property
def author(self):
"""
diff --git a/gbp/deb/source.py b/gbp/deb/source.py
index 0944ce1a..1e873129 100644
--- a/gbp/deb/source.py
+++ b/gbp/deb/source.py
@@ -69,7 +69,7 @@ class DebianSource(object):
pass # Fall back to changelog parsing
try:
- return self.changelog.is_native()
+ return not '-' in self.changelog.version
except IOError as e:
raise DebianSourceError("Failed to determine source format: %s" % e)
diff --git a/tests/test_Changelog.py b/tests/test_Changelog.py
index 55cbcada..30f25e52 100644
--- a/tests/test_Changelog.py
+++ b/tests/test_Changelog.py
@@ -56,7 +56,6 @@ def test_parse_debian_only():
Methods tested:
- L{gbp.deb.changelog.ChangeLog.__init__}
- - L{gbp.deb.changelog.ChangeLog.is_native}
Properties tested:
- L{gbp.deb.changelog.ChangeLog.version}
@@ -81,8 +80,6 @@ def test_parse_debian_only():
True
>>> cl.epoch
>>> cl.upstream_version
- >>> cl.is_native()
- True
"""
def test_parse_no_eopch():
@@ -92,7 +89,6 @@ def test_parse_no_eopch():
Methods tested:
- L{gbp.deb.changelog.ChangeLog.__init__}
- L{gbp.deb.changelog.ChangeLog.has_epoch}
- - L{gbp.deb.changelog.ChangeLog.is_native}
Properties tested:
- L{gbp.deb.changelog.ChangeLog.version}
@@ -120,8 +116,6 @@ def test_parse_no_eopch():
'1.0'
>>> cl.has_epoch()
False
- >>> cl.is_native()
- False
"""
def test_parse_eopch():
@@ -131,7 +125,6 @@ def test_parse_eopch():
Methods tested:
- L{gbp.deb.changelog.ChangeLog.__init__}
- L{gbp.deb.changelog.ChangeLog.has_epoch}
- - L{gbp.deb.changelog.ChangeLog.is_native}
Properties tested:
- L{gbp.deb.changelog.ChangeLog.version}
@@ -160,8 +153,6 @@ def test_parse_eopch():
'1.2.0'
>>> cl.has_epoch()
True
- >>> cl.is_native()
- False
"""
def test_parse_name():