Forráskód Böngészése

- synchronize aux.prereq.sh platform checks with official list as of OpenPKG 2.0 - fix disk space detection in aux.prereq.sh script

Ralf S. Engelschall 21 éve
szülő
commit
5e312072a5
3 módosított fájl, 53 hozzáadás és 27 törlés
  1. 2 0
      openpkg/HISTORY
  2. 50 26
      openpkg/aux.prereq.sh
  3. 1 1
      openpkg/openpkg.spec

+ 2 - 0
openpkg/HISTORY

@@ -2,6 +2,8 @@
 2004
 ====
 
+20040507 synchronize aux.prereq.sh platform checks with official list as of OpenPKG 2.0
+20040507 fix disk space detection in aux.prereq.sh script
 20040506 finally remove <prefix>/bin/{rpm,rpm2cpio} wrappers in preparation to OpenPKG 2.1
 20040505 rc: skip .snap (FreeBSD 5) and .snapshot (NetApp) directories in *.rpmxxx checking
 20040501 use better GCC detection in "rpmtool cflags" (taken over from "gcc" package)

+ 50 - 26
openpkg/aux.prereq.sh

@@ -35,41 +35,65 @@ platform_tech=`sh ./shtool platform -n -L -S "" -C "+" -F "%<at>-%<st>"`
 #
 #   CHECK: amount of platform support
 #
-support=no
 case "$platform_prod:$product_tech" in
-    #   platforms known to be fully supported
-    *-freebsd4.[789]:* | *-freebsd5.[01]:* |\
-    *-solaris2.6:* | *-solaris[89]:* |\
-    *-redhat9:* | *-suse8.2:* | *-debian2.2:* | *-debian3.0:* )
-        support=yes
+    #   official "forecasted" platforms
+    *-macosx*:*        |\
+    *-hpux*:*          |\
+    *-aix*:*           |\
+    *-irix*:*          )
+        support=forecasted
         ;;
-    #   platforms which are similar and so maybe supported
-    *-freebsd*:* | *-solaris*:* | *:*-linux* )
-        support=maybe
+    #   official "tentative" platforms
+    *-gentoo1.4.3:*    |\
+    *-debian3.1:*      |\
+    *-solaris10:*      )
+        support=tentative
         ;;
-    #   platforms which could be still or already support
-    *-unixware*:* | *-tru64*:* | *-hpux*:* | *-darwin*:* )
-        support=maybe
+    #   official "supported" platforms
+    *-freebsd4.9:*     |\
+    *-freebsd5.2:*     |\
+    *-debian3.0:*      |\
+    *-fedora1:*        |\
+    *-rhel3:*          |\
+    *-suse9.0:*        |\
+    *-solaris[89]:*    )
+        support=supported
         ;;
-    #   platforms which are known to be not supported
+    #   official "obsolete" platforms
+    *-debian2.2:*      |\
+    *-rhl9:*           |\
+    *-suse8.2:*        |\
+    *-solaris2.6:*     )
+        support=obsolete
+        ;;
+    #   official "deprecated" platforms
+    *-unixware*:*      |\
+    *-tru64*:*         )
+        support=deprecated
+        ;;
+    #   auspicious platforms
+    *-freebsd*:*       |\
+    *-solaris*:*       |\
+    *:*-linux*         )
+        support=auspicious
+        ;;
+    #   unknown platforms
     *:* )
-        support=no
+        support=unknown
         ;;
 esac
 case "$support" in
-    yes   ) support="Congratulations, definitely supported" ;;
-    maybe ) support="Good luck, maybe supported" ;;
-    no    ) support="Sorry, not known to be supported" ;;
+    forecasted ) support="forecasted (still not known to work)" ;;
+    tentative  ) support="tentative (should already work)"      ;;
+    supported  ) support="supported"                            ;;
+    obsolete   ) support="obsolete (should still work)"         ;;
+    deprecated ) support="deprecated (no longer known to work)" ;;
+    auspicious ) support="auspicious (expect to work)"          ;;
+    unknown    ) support="unknown (expect not to work)"         ;;
 esac
 echo "++ platform product:    $platform_prod"
 echo "++ platform technology: $platform_tech"
-echo "++ platform support:    [$support]"
-case "$support" in
-    no )
-        echo "ERROR: platform not supported" 1>&2
-        exit 1
-        ;;
-esac
+echo "++ platform support:    $support"
 
 #
 #   CHECK: diskspace requirement
@@ -79,12 +103,12 @@ if [ ".$mode" = .source ]; then
     fs_need=150000
 else
     fs_path="" # FIXME
-    fs_need="" # FIXME
+    fs_need=0  # FIXME
 fi
 fs_free=""
 case "$platform_tech" in
     *-freebsd* | *-linux* | *-sunos* )
-       fs_free=`cd $fs_path && /bin/df -k . | sed -n -e '$p' | awk '{ print $4; }'`
+       fs_free=`cd $fs_path && /bin/df -k . | sed -n -e '$p' | sed -e 's;^[^ ]*;;' -e 's; *;;' | awk '{ print $3; }'`
        ;;
 esac
 if [ ".$fs_free" != . ]; then

+ 1 - 1
openpkg/openpkg.spec

@@ -39,7 +39,7 @@
 #   o any cc(1)
 
 #   the package version/release
-%define       V_openpkg  20040506
+%define       V_openpkg  20040507
 
 #   the used software versions
 %define       V_rpm      4.2.1