Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/58093


Change subject: pbuilder: cowbuilder image are prefixed with "base-"
......................................................................

pbuilder: cowbuilder image are prefixed with "base-"

Change-Id: Iab49219366cfd7470e6bf571a4a5ba492271752e
---
M manifests/misc/package-builder.pp
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/58093/1

diff --git a/manifests/misc/package-builder.pp 
b/manifests/misc/package-builder.pp
index 32a7bcd..eb56014 100644
--- a/manifests/misc/package-builder.pp
+++ b/manifests/misc/package-builder.pp
@@ -91,11 +91,13 @@
                case $realpbuilder {
                        cowbuilder: {
                                $base_option = '--basepath'
+                               $file_prefix = 'base-'
                                $file_ext    = 'cow'
                                $packages    = [ 'cowbuilder' ]
                        }
                        pbuilder: {
                                $base_option = '--basetgz'
+                               $file_prefix = ''
                                $file_ext    = 'tgz'
                                $packages    = [ 'pbuilder' ]
                        }
@@ -106,7 +108,7 @@
 
                $othermirror = "--othermirror 'deb 
http://apt.wikimedia.org/wikimedia ${realdist}-wikimedia main universe' 
--othermirror 'deb-src http://apt.wikimedia.org/wikimedia ${realdist}-wikimedia 
main universe'"
                $components = "--components 'main universe'"
-               $image_file = "${pbuilder_root}/${realdist}.${file_ext}"
+               $image_file = 
"${pbuilder_root}/${file_prefix}${realdist}.${file_ext}"
 
                exec { "imaging $realdist for $realpbuilder":
                        command => "$realpbuilder --create --distribution 
${realdist} ${base_option} ${image_file} ${components} ${othermirror}",
@@ -159,8 +161,14 @@
                }
 
                case $pbuilder {
-                       cowbuilder: { $file_ext = 'cow' }
-                       pbuilder:   { $file_ext = 'tgz' }
+                       cowbuilder: {
+                               $file_prefix = 'base-'
+                               $file_ext = 'cow'
+                       }
+                       pbuilder: {
+                               $file_prefix = ''
+                               $file_ext = 'tgz'
+                       }
                        default: {
                                fail('Only package builder types supported are 
pbuilder and cowbuilder')
                        }
@@ -168,7 +176,7 @@
 
                file { "/var/cache/pbuilder/base.${file_ext}":
                        require => Image["${title}-${defaultdist}"],
-                       ensure => 
"/var/cache/pbuilder/${defaultdist}.${file_ext}"
+                       ensure => 
"/var/cache/pbuilder/${file_prefix}${defaultdist}.${file_ext}"
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/58093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab49219366cfd7470e6bf571a4a5ba492271752e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to