diff options
Diffstat (limited to 'modules/buildsystem/templates')
-rw-r--r-- | modules/buildsystem/templates/iurt.conf | 5 | ||||
-rw-r--r-- | modules/buildsystem/templates/media.cfg | 15 | ||||
-rw-r--r-- | modules/buildsystem/templates/mgarepo.conf | 12 | ||||
-rw-r--r-- | modules/buildsystem/templates/vhost_repository.conf | 3 |
4 files changed, 23 insertions, 12 deletions
diff --git a/modules/buildsystem/templates/iurt.conf b/modules/buildsystem/templates/iurt.conf index ef67e567..b0ed5879 100644 --- a/modules/buildsystem/templates/iurt.conf +++ b/modules/buildsystem/templates/iurt.conf @@ -2,8 +2,9 @@ { supported_arch => [ '<%= distro['arch'].join("', '") %>' ], all_media =>{ -<%- distro['medias'].each{|media, m| -%> - '<%= media %>' => [ '<%= m['repos'].keys.join("', '") %>' ], +<%- distro['medias'].keys.sort.each{|media| -%> + '<%= media %>' => [ '<%= + distro['medias'][media]['repos'].keys.sort.join("', '") %>' ], <%- } -%> }, diff --git a/modules/buildsystem/templates/media.cfg b/modules/buildsystem/templates/media.cfg index 3ac06bce..bdd5d813 100644 --- a/modules/buildsystem/templates/media.cfg +++ b/modules/buildsystem/templates/media.cfg @@ -15,7 +15,8 @@ end def media_out(name, media_hash) media_out = "[%s]\n" % name - media_hash.each{|key, value| + media_hash.keys.sort.each{|key| + value = media_hash[key] if value != nil media_out += "%s=%s\n" % [ key, value ] end @@ -32,8 +33,10 @@ arch=<%= @arch %> xml-info=1 <%- -distro['medias'].each{|medianame, media| - media['repos'].each{|reponame, repo| +distro['medias'].keys.sort.each{|medianame| + media = distro['medias'][medianame] + media['repos'].keys.sort.each{|reponame| + repo = media['repos'][reponame] media_types = [] if media['media_types'] != nil media_types += media['media_types'] @@ -100,8 +103,10 @@ distro['medias'].each{|medianame, media| } } if distro['based_on'] != nil - distro['based_on'].each{|bdistroname, bdistro| - bdistro.each{|medianame, media| + distro['based_on'].keys.sort.each{|bdistroname| + bdistro = distro['based_on'][bdistroname] + bdistro.keys.sort.each{|medianame| + media = bdistro[medianame] for reponame in media -%><%= media_out [ bdistroname, medianame, reponame ].join('/'), diff --git a/modules/buildsystem/templates/mgarepo.conf b/modules/buildsystem/templates/mgarepo.conf index d92c6cd1..cecec703 100644 --- a/modules/buildsystem/templates/mgarepo.conf +++ b/modules/buildsystem/templates/mgarepo.conf @@ -11,7 +11,8 @@ trunk-dir = <%= default_distro %> <%- conf = scope.lookupvar('buildsystem::var::mgarepo::conf') if conf['global'] != nil - conf['global'].each{|key,value| + conf['global'].keys.sort.each{|key| + value = conf['global'][key] -%><%= key %> = <%= value %> <%- } @@ -39,7 +40,8 @@ default = <%= default_distro %> host = <%= scope.lookupvar('buildsystem::var::mgarepo::submit_host') %> <%- - distros.each{|d, distro| + distros.keys.sort.each{|d| + distro = distros[d] -%> [submit <%= d %>] target = <%= sched_home_dir %>/repsys/srpms @@ -55,12 +57,14 @@ rpm-macros = global <%= d %> mkrel(c:) = %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release} <%- - distros.each{|d, distro| + distros.keys.sort.each{|d| + distro = distros[d] -%> [macros <%= d %>] distro_release = <%= distro['version'] %> <%- - distro['macros'].each{|macro, value| + distro['macros'].keys.sort.each{|macro| + value = distro['macros'][macro] -%><%= macro %> = <%= value %> <%- } %> <%- } diff --git a/modules/buildsystem/templates/vhost_repository.conf b/modules/buildsystem/templates/vhost_repository.conf index 167c026e..6b5b67e5 100644 --- a/modules/buildsystem/templates/vhost_repository.conf +++ b/modules/buildsystem/templates/vhost_repository.conf @@ -8,7 +8,8 @@ distros = scope.lookupvar('buildsystem::var::distros::distros') ServerName <%= scope.lookupvar('buildsystem::var::repository::hostname') %> DocumentRoot <%= mirror_root %> <%- - distros.each{|distroname,distro| + distros.keys.sort.each{|distroname| + distro = distros[distroname] allow_from = distro['repo_allow_from'] != nil ? distro['repo_allow_from'] : [ 'all' ] %> Alias /bootstrap/<%= distroname %>/ "<%= bootstrap_reporoot %>/<%= distroname %>/" |