aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:23 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:23 +0000
commite14cedea84900b8de3e16dcb96abbd27d590085b (patch)
tree94a3970c54d8693d7c32198b72bb120c08af532a /modules/buildsystem
parentf354bdaf4612d737a5243b9cc93f0fe9e6fc492c (diff)
downloadpuppet-e14cedea84900b8de3e16dcb96abbd27d590085b.tar
puppet-e14cedea84900b8de3e16dcb96abbd27d590085b.tar.gz
puppet-e14cedea84900b8de3e16dcb96abbd27d590085b.tar.bz2
puppet-e14cedea84900b8de3e16dcb96abbd27d590085b.tar.xz
puppet-e14cedea84900b8de3e16dcb96abbd27d590085b.zip
buildsystem::var::distros: change $distros structure
The $distros variable is hash containing settings about the distributions. It was something like this : $distro = { 'cauldron' => { 'arch' => [ 'i586', 'x86_64' ], 'medias' => { 'core' => [ 'release' ], }, 'base_medias' => [ 'core/release' ], }, } It is now something like this : $distro = { 'cauldron' => { 'arch' => [ 'i586', 'x86_64' ], 'medias' => { 'core' => { 'repos' => { 'release' => {}, }, }, }, 'base_medias' => [ 'core/release' ], }, } This should allow setting more infos about each medias / repos, that can be used in order to generate media.cfg config files.
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/create_upload_dir.rb4
-rw-r--r--modules/buildsystem/manifests/var/distros.pp24
-rw-r--r--modules/buildsystem/templates/iurt.conf4
3 files changed, 23 insertions, 9 deletions
diff --git a/modules/buildsystem/manifests/create_upload_dir.rb b/modules/buildsystem/manifests/create_upload_dir.rb
index f3e16a3e..c95c9b10 100644
--- a/modules/buildsystem/manifests/create_upload_dir.rb
+++ b/modules/buildsystem/manifests/create_upload_dir.rb
@@ -14,10 +14,10 @@ hostclass "buildsystem::create_upload_dir" do
scope.lookupvar('buildsystem::var::distros::distros').each{|rel, distro|
file [uploads_dir, st, rel].join('/'), :ensure => 'directory', :owner => owner, :group => group
medias = distro['medias']
- medias.each{|media, repos|
+ medias.each{|media, m|
file [uploads_dir, st, rel, media].join('/'), :ensure => 'directory', :owner => owner, :group => group
- for repo in repos do
+ for repo in m['repos'].keys do
if st == 'done'
file [uploads_dir, st, rel, media, repo].join('/'), :ensure => 'directory', :owner => owner, :group => group, :mode => 0775
else
diff --git a/modules/buildsystem/manifests/var/distros.pp b/modules/buildsystem/manifests/var/distros.pp
index d815b18a..d06e31c9 100644
--- a/modules/buildsystem/manifests/var/distros.pp
+++ b/modules/buildsystem/manifests/var/distros.pp
@@ -1,11 +1,25 @@
# $distros:
# a hash variable containing distributions informations indexed by
# distribution name. Each distribution is itself an hash containing
-# the following keys:
-# - medias: an hash containing the different medias / repositories
-# - base_media: a list of medias that will be used by iurt to build
-# the chroots
-# - arch: list of arch supported by this distro
+# the following infos:
+# {
+# # the 'cauldron' distribution
+# 'cauldron' => {
+# # list of arch supported by 'cauldron'
+# 'arch' => [ 'i586', 'x86_64' ],
+# 'medias' => {
+# # the 'core' media
+# 'core' => {
+# 'repos' => {
+# # the 'release' repo in the 'core' media
+# 'release' => {},
+# },
+# },
+# },
+# # the list of media used by iurt to build the chroots
+# 'base_medias' => [ 'core/release' ],
+# },
+# }
class buildsystem::var::distros(
$distros
) { }
diff --git a/modules/buildsystem/templates/iurt.conf b/modules/buildsystem/templates/iurt.conf
index 8536d89f..f29f598b 100644
--- a/modules/buildsystem/templates/iurt.conf
+++ b/modules/buildsystem/templates/iurt.conf
@@ -2,8 +2,8 @@
{
supported_arch => [ '<%= distro['arch'].join("', '") %>' ],
all_media =>{
-<%- distro['medias'].each{|media, repos| -%>
- '<%= media %>' => [ '<%= repos.join("', '") %>' ],
+<%- distro['medias'].each{|media, m| -%>
+ '<%= media %>' => [ '<%= m['repos'].keys.join("', '") %>' ],
<%-
} -%>
},