This commit was generated by cvs2svn to compensate for changes in r2562,
[util-vserver.git] / scripts / vserver-build.functions.rpm
index 9aa499d..528e4ab 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver-build.functions.rpm,v 1.8 2005/04/16 21:20:45 ensc Exp $        --*- sh -*--
+# $Id: vserver-build.functions.rpm 2311 2006-09-13 22:18:55Z dhozac $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -52,6 +52,7 @@ function rpm.initFilesystem
 {
     test -z "$WORKAROUND_106057" || mkdir -p "$RPMDB_PATH"
     mkdir -p "$VDIR$RPMDB_PATH"
+    mkdir -p "$VDIR/var/lock/rpm"
 
     test -z "$WORKAROUND_APT_DBPATH" || {
        mkdir -p "$VDIR/var/lib"
@@ -124,3 +125,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."
+}