aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-20 15:55:48 +0000
committerMichael Scherer <misc@mageia.org>2011-01-20 15:55:48 +0000
commit4704b7860db3a18c3c3828a632f86c537ec5d9e0 (patch)
tree589001d4349347c251349b8614e9a308d117df13
parent531483a88af183ac05c19fc01b2890bc2d8e3f64 (diff)
downloadpuppet-4704b7860db3a18c3c3828a632f86c537ec5d9e0.tar
puppet-4704b7860db3a18c3c3828a632f86c537ec5d9e0.tar.gz
puppet-4704b7860db3a18c3c3828a632f86c537ec5d9e0.tar.bz2
puppet-4704b7860db3a18c3c3828a632f86c537ec5d9e0.tar.xz
puppet-4704b7860db3a18c3c3828a632f86c537ec5d9e0.zip
add script made by pascal to check packages that have missing deps ( temporary, quick and dirty )
-rwxr-xr-xmodules/buildsystem/files/missing-deps.sh25
-rw-r--r--modules/buildsystem/manifests/init.pp16
2 files changed, 41 insertions, 0 deletions
diff --git a/modules/buildsystem/files/missing-deps.sh b/modules/buildsystem/files/missing-deps.sh
new file mode 100755
index 00000000..7e59cb45
--- /dev/null
+++ b/modules/buildsystem/files/missing-deps.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright 2011, Pascal Terjan <pterjan@gmail.com>
+#
+# This program is free software. It comes without any warranty, to
+# the extent permitted by applicable law. You can redistribute it
+# and/or modify it under the terms of the Do What The Fuck You Want
+# To Public License, Version 2, as published by Sam Hocevar. See
+# http://sam.zoy.org/wtfpl/COPYING for more details.
+#
+# Creates missing-deps.$arch.txt for each arch, listing broken
+# dependencies inside the associated media.
+
+repo="/distrib/bootstrap/distrib/cauldron"
+
+missing() {
+ arch=$1
+ d="${repo}/${arch}"
+ urpmf --requires --use-distrib $d : | cut -d: -f2- | sed 's/\[.*//' | sort -u | xargs urpmq -p --use-distrib $d 2>&1 >/dev/null | sed -n 's/No package named //p'
+}
+
+for arch in i586 x86_64
+do
+ missing $arch > missing-deps.$arch.txt
+done
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index 1ff60d16..e68245cd 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -262,4 +262,20 @@ class buildsystem {
content => template("buildsystem/mgacreatehome")
}
}
+
+ class check_missing_deps {
+ file { "/usr/local/bin/missing-deps.sh":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 700,
+ content => "puppet:///modules/buildsystem/missing-deps.sh",
+ }
+
+ # FIXME hardcoded path
+ cron { "check missing deps":
+ command => "cd /var/www/bs/data && /usr/local/bin/missing-deps.sh",
+ minute => "*/15",
+ }
+ }
}