launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11611
[Merge] lp:~sinzui/launchpad/support-apk-types into lp:launchpad
Curtis Hovey has proposed merging lp:~sinzui/launchpad/support-apk-types into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1046024 in Launchpad itself: "product release finder ignores .apk files"
https://bugs.launchpad.net/launchpad/+bug/1046024
For more details, see:
https://code.launchpad.net/~sinzui/launchpad/support-apk-types/+merge/122757
The product release finder does not support android packages. Projects
and organisations like Canonical cannot automatically upload new
releases on remote servers.
--------------------------------------------------------------------
RULES
Pre-implementation: karni
* We agreed that the proper file name u1f-google-1.2.4.apk
should be found by the PRF and the milestone will be names 1.2.4
* Update flavor_pattern used by extract_version to support .apk
QA
* Set the file release pattern for a series to
http://people.canonical.com/~karni/android/u1f/u1f-google-1.*.apk
* Run ./cronscripts/product-release-finder.py
* Verify the series has a milestone for 1.2.4 with an apk release file.
LINT
Linting changed files:
lib/lp/registry/scripts/productreleasefinder/finder.py
lib/lp/registry/tests/test_prf_finder.py
TEST
./bin/test -vvc -t extract_version lp.registry.tests.test_prf_finder
IMPLEMENTATION
Updated the RE to recognise .apk as a valid release extension.
lib/lp/registry/scripts/productreleasefinder/finder.py
lib/lp/registry/tests/test_prf_finder.py
--
https://code.launchpad.net/~sinzui/launchpad/support-apk-types/+merge/122757
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/support-apk-types into lp:launchpad.
=== modified file 'lib/lp/registry/scripts/productreleasefinder/finder.py'
--- lib/lp/registry/scripts/productreleasefinder/finder.py 2012-04-16 23:02:44 +0000
+++ lib/lp/registry/scripts/productreleasefinder/finder.py 2012-09-04 20:54:20 +0000
@@ -44,12 +44,12 @@
'sparc',
])
flavor_pattern = re.compile(r"""
- (~ # Packaging target
- |_[a-z][a-z]_[A-Z][A-Z] # or language version
- |_(%s) # or processor version
- |[\.-](win32|OSX) # or OS version
- |\.(deb|noarch|rpm|dmg|exe) # or packaging version
- ).* # to the end of the string
+ (~ # Packaging target
+ |_[a-z][a-z]_[A-Z][A-Z] # or language version
+ |_(%s) # or processor version
+ |[\.-](win32|OSX) # or OS version
+ |\.(deb|noarch|rpm|dmg|exe|apk) # or packaging version
+ ).* # to the end of the string
""" % processors, re.VERBOSE)
@@ -196,14 +196,13 @@
self.ztm.abort()
raise
-
def handleRelease(self, product_name, series_name, url):
"""If the given URL looks like a release tarball, download it
and create a corresponding ProductRelease."""
filename = urlparse.urlsplit(url)[2]
slash = filename.rfind("/")
if slash != -1:
- filename = filename[slash+1:]
+ filename = filename[slash + 1:]
self.log.debug("Filename portion is %s", filename)
version = extract_version(filename)
=== modified file 'lib/lp/registry/tests/test_prf_finder.py'
--- lib/lp/registry/tests/test_prf_finder.py 2012-01-20 15:42:44 +0000
+++ lib/lp/registry/tests/test_prf_finder.py 2012-09-04 20:54:20 +0000
@@ -402,6 +402,8 @@
self.assertEqual(version, '21-2')
version = extract_version('php-fpm-0.6~5.3.1.tar.gz')
self.assertEqual(version, '0.6')
+ version = extract_version('u1f-google-1.2.4.apk')
+ self.assertEqual(version, '1.2.4')
def test_extract_version_name_with_uppercase(self):
"""Verify that the file's version is lowercases."""
Follow ups