aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-29 22:05:25 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-29 22:05:25 +0000
commitf28bf7c0ee4036d8ac77ea67e0878b0463dc316d (patch)
tree860ada7c1c0e17bf29971d167578752164367cf8
parent630824f1137eec2b42291952ad00739239a17121 (diff)
downloadpuppet-f28bf7c0ee4036d8ac77ea67e0878b0463dc316d.tar
puppet-f28bf7c0ee4036d8ac77ea67e0878b0463dc316d.tar.gz
puppet-f28bf7c0ee4036d8ac77ea67e0878b0463dc316d.tar.bz2
puppet-f28bf7c0ee4036d8ac77ea67e0878b0463dc316d.tar.xz
puppet-f28bf7c0ee4036d8ac77ea67e0878b0463dc316d.zip
Fix medias order in media.cfg
-rw-r--r--deployment/mga_buildsystem/manifests/config.pp28
-rw-r--r--modules/buildsystem/manifests/var/distros.pp10
-rw-r--r--modules/buildsystem/templates/media.cfg4
3 files changed, 30 insertions, 12 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp
index 8cc68578..2dcc1566 100644
--- a/deployment/mga_buildsystem/manifests/config.pp
+++ b/deployment/mga_buildsystem/manifests/config.pp
@@ -59,44 +59,52 @@ class mga_buildsystem::config {
'release' => {
'media_type' => [ 'release' ],
'requires' => [],
+ 'order' => 0,
+ },
+ 'updates' => {
+ 'media_type' => [ 'updates' ],
+ 'updates_for' => 'release',
+ 'requires' => [ 'release' ],
+ 'order' => 1,
},
'updates_testing' => {
'media_type' => [ 'testing' ],
'noauto' => '1',
'requires' => [ 'updates' ],
- },
- 'backports_testing' => {
- 'media_type' => [ 'testing' ],
- 'noauto' => '1',
- 'requires' => [ 'backports' ],
+ 'order' => 2,
},
'backports' => {
'media_type' => [ 'backports' ],
'noauto' => '1',
'requires' => [ 'updates' ],
+ 'order' => 3,
},
- 'updates' => {
- 'media_type' => [ 'updates' ],
- 'updates_for' => 'release',
- 'requires' => [ 'release' ],
+ 'backports_testing' => {
+ 'media_type' => [ 'testing' ],
+ 'noauto' => '1',
+ 'requires' => [ 'backports' ],
+ 'order' => 4,
},
}
$std_medias = {
'core' => {
'repos' => $std_repos,
'media_type' => [ 'official', 'free' ],
+ 'order' => 0,
},
'nonfree' => {
'repos' => $std_repos,
'media_type' => [ 'official' ],
'noauto' => '1',
'requires' => [ 'core' ],
+ 'order' => 1,
},
'tainted' => {
'repos' => $std_repos,
'media_type' => [ 'official' ],
'noauto' => '1',
'requires' => [ 'core' ],
+ 'order' => 2,
},
}
$std_base_media = [ 'core/release', 'core/updates' ]
@@ -106,10 +114,12 @@ class mga_buildsystem::config {
'updates' => {
'media_type' => [ 'updates' ],
'requires' => [ 'release' ],
+ 'order' => 0,
},
},
'media_type' => [ 'infra' ],
'requires' => [ 'core' ],
+ 'order' => 0,
},
}
$std_macros = {
diff --git a/modules/buildsystem/manifests/var/distros.pp b/modules/buildsystem/manifests/var/distros.pp
index 4d884de9..e1079e40 100644
--- a/modules/buildsystem/manifests/var/distros.pp
+++ b/modules/buildsystem/manifests/var/distros.pp
@@ -17,13 +17,17 @@
# 'release' => {
# 'media_type' => [ 'release' ],
# 'noauto' => '1',
+# # the 'release' repo should be listed first in media.cfg
+# 'order' => 0,
# },
# # the 'updates' repo
-# 'release' => {
+# 'updates' => {
# 'media_type' => [ 'updates' ],
# 'noauto' => '1',
# # the 'updates' repo requires the 'release' repo
# 'requires' => [ 'release' ],
+# # the 'updates' repo should be listed after 'release' in media.cfg
+# 'order' => 1,
# },
# },
# # media_type for media.cfg
@@ -31,6 +35,8 @@
# # if noauto is set to '1' either in medias or repos,
# # the option will be added to media.cfg
# 'noauto' => '1',
+# # list 'core' first in media.cfg
+# 'order' => 0,
# },
# # the 'non-free' media
# 'non-free' => {
@@ -40,6 +46,8 @@
# 'media_type' => [ 'official', 'non-free' ],
# # the 'non-free' media requires the 'core' media
# 'requires' => [ 'core' ],
+# # list 'non-free' second
+# 'order' => 1,
# }
# },
# # the list of media used by iurt to build the chroots
diff --git a/modules/buildsystem/templates/media.cfg b/modules/buildsystem/templates/media.cfg
index fb4e0680..203e5ebf 100644
--- a/modules/buildsystem/templates/media.cfg
+++ b/modules/buildsystem/templates/media.cfg
@@ -33,9 +33,9 @@ arch=<%= @arch %>
xml-info=1
<%-
-distro['medias'].keys.sort.each{|medianame|
+distro['medias'].keys.sort { |x,y| distro['medias'][x]['order'] <=> distro['medias'][y]['order'] }.each{|medianame|
media = distro['medias'][medianame]
- media['repos'].keys.sort.each{|reponame|
+ media['repos'].keys.sort { |x,y| media['repos'][x]['order'] <=> media['repos'][y]['order'] }.each{|reponame|
repo = media['repos'][reponame]
media_type = []
if media['media_type'] != nil