[Mageia-sysadm] [859] add script made by pascal to check packages that have missing deps ( temporary, quick and dirty )
root at mageia.org
root at mageia.org
Thu Jan 20 16:55:48 CET 2011
Revision: 859
Author: misc
Date: 2011-01-20 16:55:48 +0100 (Thu, 20 Jan 2011)
Log Message:
-----------
add script made by pascal to check packages that have missing deps ( temporary, quick and dirty )
Modified Paths:
--------------
puppet/modules/buildsystem/manifests/init.pp
Added Paths:
-----------
puppet/modules/buildsystem/files/
puppet/modules/buildsystem/files/missing-deps.sh
Added: puppet/modules/buildsystem/files/missing-deps.sh
===================================================================
--- puppet/modules/buildsystem/files/missing-deps.sh (rev 0)
+++ puppet/modules/buildsystem/files/missing-deps.sh 2011-01-20 15:55:48 UTC (rev 859)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright 2011, Pascal Terjan <pterjan at 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
Property changes on: puppet/modules/buildsystem/files/missing-deps.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: puppet/modules/buildsystem/manifests/init.pp
===================================================================
--- puppet/modules/buildsystem/manifests/init.pp 2011-01-19 16:08:41 UTC (rev 858)
+++ puppet/modules/buildsystem/manifests/init.pp 2011-01-20 15:55:48 UTC (rev 859)
@@ -262,4 +262,20 @@
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",
+ }
+ }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110120/f51bdb63/attachment-0001.html>
More information about the Mageia-sysadm
mailing list