summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-06-22 22:53:34 +0000
committerNicolas Vigier <boklm@mageia.org>2011-06-22 22:53:34 +0000
commitbb0655af283b7a10b31d4d32ebd7c6f980524fff (patch)
tree1b4315b2925dfb1980a4043cf6b932a30cc84452
parenta9ed0fee3413f0c27b544065234f5ecb8df08e52 (diff)
downloadmgatools-bb0655af283b7a10b31d4d32ebd7c6f980524fff.tar
mgatools-bb0655af283b7a10b31d4d32ebd7c6f980524fff.tar.gz
mgatools-bb0655af283b7a10b31d4d32ebd7c6f980524fff.tar.bz2
mgatools-bb0655af283b7a10b31d4d32ebd7c6f980524fff.tar.xz
mgatools-bb0655af283b7a10b31d4d32ebd7c6f980524fff.zip
add hdlist generation, update of MD5SUM file, and mirror from bootstrap to mirror directory
-rw-r--r--functions23
-rw-r--r--mga-move-update17
-rw-r--r--mgatools.conf2
3 files changed, 40 insertions, 2 deletions
diff --git a/functions b/functions
index 9891247..418bf6f 100644
--- a/functions
+++ b/functions
@@ -28,3 +28,26 @@ function inlist()
return 1
}
+function update_hdlist()
+{
+ repository="$1"
+ /usr/bin/genhdlist2 -v --versioned --allow-empty-media --file-deps "$repository/../../media_info/file-deps" "$repository"
+}
+
+function update_common_MD5SUM()
+{
+ distrorelease="$1"
+ for arch in $arches
+ do
+ pushd "$distribdir/$distrorelease/$arch/media/media_info"
+ /usr/bin/md5sum hdlist_* synthesis.* > MD5SUM
+ popd
+ done
+}
+
+function mirror_repository()
+{
+ distrorelease="$1"
+ /usr/bin/rsync $mirror_rsync_options "$distribdir/$distrorelease" "$finaldistribdir/$distrorelease"
+}
+
diff --git a/mga-move-update b/mga-move-update
index e82e575..2916b09 100644
--- a/mga-move-update
+++ b/mga-move-update
@@ -1,7 +1,6 @@
#!/bin/sh
. /usr/share/mgatools/functions
-moveupdate_allowed_group=mga-qa
if [ $# != 3 ]
then
@@ -58,6 +57,19 @@ function movepkg()
done
}
+function post()
+{
+ for arch in $arches
+ do
+ update_hdlist "$distribdir/$distrorelease/$arch/media/$section/updates_testing"
+ update_hdlist "$distribdir/$distrorelease/$arch/media/$section/updates"
+ update_hdlist "$distribdir/$distrorelease/$arch/media/debug/$section/updates_testing"
+ update_hdlist "$distribdir/$distrorelease/$arch/media/debug/$section/updates"
+ done
+ update_common_MD5SUM $distrorelease
+ mirror_repository $distrorelease
+}
+
mailcontent=$(mktemp)
for arch in $arches
do
@@ -65,11 +77,12 @@ do
movepkg "$distribdir/$distrorelease/$arch/media/debug/$section/updates_testing" "$distribdir/$distrorelease/$arch/media/debug/$section/updates/" "$srcpkg" "$mailcontent"
done
-if [ -n $dryrun ]
+if [ -n "$dryrun" ]
then
cat "$mailcontent"
else
/usr/bin/mailx -s "mga-move-update $distrorelease $section $srcname" -S "from=moveupdate_mailfrom" "$moveupdate_mailto" < "$mailcontent"
+ post
fi
rm -f "$mailcontent"
diff --git a/mgatools.conf b/mgatools.conf
index 2fd5acc..6467b35 100644
--- a/mgatools.conf
+++ b/mgatools.conf
@@ -9,6 +9,8 @@ else
fi
moveupdate_mailfrom="$requestuser <root@mageia.org>"
distribdir=/distrib/bootstrap/distrib
+finaldistribdir=/distrib/mirror/distrib
distroreleases='1'
distrosections='core nonfree tainted'
arches='i586 x86_64'
+mirror_rsync_options="--dry-run --delete -alH"