]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
(#14657) Fix filename when there is a period in the PPA
authorBranan Purvine-Riley <branan@puppetlabs.com>
Wed, 23 May 2012 00:18:40 +0000 (17:18 -0700)
committerBranan Purvine-Riley <branan@puppetlabs.com>
Wed, 23 May 2012 00:22:18 +0000 (17:22 -0700)
manifests/ppa.pp

index 64c65bbd09e41d595b902135d6fd5222138fb114..6b38e52d63164b8249adea6e2b5142829c54050d 100644 (file)
@@ -12,8 +12,9 @@ define apt::ppa(
     fail('lsbdistcodename fact not available: release parameter required')
   }
 
-  $filename_without_slashes = regsubst($name,'/','-','G')
-  $filename_without_ppa     = regsubst($filename_without_slashes, '^ppa:','','G')
+  $filename_without_slashes = regsubst($name, '/', '-', G)
+  $filename_without_dots    = regsubst($filename_without_slashes, '\.', '_', G)
+  $filename_without_ppa     = regsubst($filename_without_dots, '^ppa:', '', G)
   $sources_list_d_filename  = "${filename_without_ppa}-${release}.list"
 
   if ! defined(Package['python-software-properties']) {