aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/mga_buildsystem/manifests/config.pp26
-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
4 files changed, 44 insertions, 14 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp
index 3526bf1e..66e64ac0 100644
--- a/deployment/mga_buildsystem/manifests/config.pp
+++ b/deployment/mga_buildsystem/manifests/config.pp
@@ -20,15 +20,31 @@ class mga_buildsystem::config {
}
$std_arch = ['i586', 'x86_64']
- $std_repos = ['release','updates_testing','backports_testing','backports','updates']
+ $std_repos = {
+ 'release' => {},
+ 'updates_testing' => {},
+ 'backports_testing' => {},
+ 'backports' => {},
+ 'updates' => {},
+ }
$std_medias = {
- 'core' => $std_repos,
- 'nonfree' => $std_repos,
- 'tainted' => $std_repos,
+ 'core' => {
+ 'repos' => $std_repos,
+ },
+ 'nonfree' => {
+ 'repos' => $std_repos,
+ },
+ 'tainted' => {
+ 'repos' => $std_repos,
+ },
}
$std_base_media = [ 'core/release', 'core/updates' ]
$infra_medias = {
- 'infra' => ['release'],
+ 'infra' => {
+ 'repos' => {
+ 'release' => {},
+ },
+ },
}
class { 'buildsystem::var::distros':
distros => {
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("', '") %>' ],
<%-
} -%>
},