aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/buildsystem/manifests/config.pp10
-rw-r--r--modules/buildsystem/manifests/repoctl.pp8
-rw-r--r--modules/buildsystem/templates/repoctl.conf23
3 files changed, 20 insertions, 21 deletions
diff --git a/modules/buildsystem/manifests/config.pp b/modules/buildsystem/manifests/config.pp
deleted file mode 100644
index b038da21..00000000
--- a/modules/buildsystem/manifests/config.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class buildsystem::config(
- architectures = ['i586', 'x86_64'],
- dev_distros = ['cauldron'],
- stable_distros = ['1', '2'],
- distrosections = ['core', 'nonfree', 'tainted'],
- sectionsrepos = ['release', 'updates', 'updates_testing', 'backports',
- 'backports_testing']
-)
-{
-}
diff --git a/modules/buildsystem/manifests/repoctl.pp b/modules/buildsystem/manifests/repoctl.pp
index 8483b59b..21b4fd96 100644
--- a/modules/buildsystem/manifests/repoctl.pp
+++ b/modules/buildsystem/manifests/repoctl.pp
@@ -1,11 +1,5 @@
class buildsystem::repoctl {
- include buildsystem::config
-
- $distroreleases = [$buildsystem::config::dev_distros,
- $buildsystem::config::stable_distros]
- $distrosections = $buildsystem::config::distrosections
- $sectionsrepos = $buildsystem::config::sectionsrepos
- $arches = $buildsystem::config::architectures
+ include buildsystem::var::distros
package{ 'repoctl': }
diff --git a/modules/buildsystem/templates/repoctl.conf b/modules/buildsystem/templates/repoctl.conf
index e72d4c4e..9bd60836 100644
--- a/modules/buildsystem/templates/repoctl.conf
+++ b/modules/buildsystem/templates/repoctl.conf
@@ -2,6 +2,21 @@
bootstrap_root = scope.lookupvar('buildsystem::var::repository::bootstrap_root')
mirror_root = scope.lookupvar('buildsystem::var::repository::mirror_root')
distribdir = scope.lookupvar('buildsystem::var::repository::distribdir')
+distros = scope.lookupvar('buildsystem::var::distros::distros')
+arches = {}
+distrosections = {}
+sectionsrepos = {}
+distros.each{|distroname, distro|
+ distro['medias'].each{|medianame, media|
+ distrosections[medianame] = 1
+ media['repos'].each{|reponame, repo|
+ sectionsrepos[reponame] = 1
+ }
+ }
+ distro['arch'].each{|arch|
+ arches[arch] = 1
+ }
+}
-%>
dryrun=echo
if [ -z $SUDO_USER ]
@@ -16,10 +31,10 @@ rootdir=<%= bootstrap_root %>
finalrootdir=<%= mirror_root %>
distribdir=$rootdir/<%= distribdir %>
finaldistribdir=$finalrootdir/<%= distribdir %>
-distroreleases='<%= distroreleases.flatten.join(' ') -%>'
-distrosections='<%= distrosections.flatten.join(' ') -%>'
-sectionsrepos='<%= sectionsrepos.flatten.join(' ') -%>'
-arches='<%= arches.flatten.join(' ') -%>'
+distroreleases='<%= distros.keys.sort.join(' ') -%>'
+distrosections='<%= distrosections.keys.sort.join(' ') -%>'
+sectionsrepos='<%= sectionsrepos.keys.sort.join(' ') -%>'
+arches='<%= arches.keys.sort.join(' ') -%>'
mirror_rsync_options="-v --delete -alH"
timestampfile="mageia_timestamp"
sha1sumfile="mageia_sha1sum"