rpm.sanityCheck(): added; it warns about missing initpre scripts
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 25 Jul 2005 15:46:40 +0000 (15:46 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 25 Jul 2005 15:46:40 +0000 (15:46 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2166 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vserver-build.functions.rpm

index a479877..f9204db 100644 (file)
@@ -124,3 +124,18 @@ function rpmlist.initByDistribution()
 
     eval "$1"='( "${_rlid_res[@]}" )'
 }
+
+
+## Usage: rpm.sanityCheck
+function rpm.sanityCheck
+{
+    test -x "$BUILD_INITPRE" || colorize warn warning $"\
+WARNING: you are going to use an rpm-based installation method without
+  having an 'initpre' script. Such a script is highly recommend to
+  workaround bugs in rpm which can cause messages like
+
+  | error: unpacking of archive failed on file /usr/bin/X11;42dd8791:
+
+  Please read http://linux-vserver.org/HowToRegisterNewDistributions
+  for information how to add support for your own distribution."
+}