[asterisk-commits] mjordan: testsuite/asterisk/trunk r3913 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jul 13 16:00:28 CDT 2013
Author: mjordan
Date: Sat Jul 13 16:00:26 2013
New Revision: 3913
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3913
Log:
Update version string parsing to handle Debian style version suffixes
If an Asterisk version string follows the following nomenclature:
"1.8.13.1~dfsg-2"
An exception will be thrown.
The version string parsing assumes that for "normal" Asterisk versions,
any additional tags added to a version are a "feature", and that those
features are denoted by a hyphen as opposed to a tilde. Debian will
append a "~dfsg[<num>]" when a source tarball needs to be repackaged,
normally due to not complying with the DFSG (thank you Tzafrir for
the explanation!)
This patch updates the version parsing to split the version string into
number and feature parts on both a '~' and a '-'. It also adds dfsg to
the accepted "features" list.
(closes issue ASTERISK-21320)
Reported by: Tzafrir Cohen
patches:
Fix-parsing-a-dfsg-version.patch uploaded by Tzafrir Cohen (license 5035)
Modified:
asterisk/trunk/lib/python/asterisk/version.py
Modified: asterisk/trunk/lib/python/asterisk/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/version.py?view=diff&rev=3913&r1=3912&r2=3913
==============================================================================
--- asterisk/trunk/lib/python/asterisk/version.py (original)
+++ asterisk/trunk/lib/python/asterisk/version.py Sat Jul 13 16:00:26 2013
@@ -29,7 +29,7 @@
This class handles Asterisk version strings.
"""
- supported_features = [ 'cert', 'digiumphones' ]
+ supported_features = [ 'cert', 'digiumphones', 'dfsg' ]
supported_modifiers = [ 'rc', 'beta' ]
@@ -104,7 +104,7 @@
raw_version = raw_version.replace('Asterisk ', '')
- tokens = raw_version.split('-')
+ tokens = re.split('[-~]', raw_version)
count = 0
while (count < len(tokens)):
token = tokens[count]
More information about the asterisk-commits
mailing list