소스 검색

make "openpkg uuid update" processing more robust to prevent problems

Ralf S. Engelschall 19 년 전
부모
커밋
7bc30c0b9d
2개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 0
      openpkg/HISTORY
  2. 9 6
      openpkg/uuid.sh

+ 1 - 0
openpkg/HISTORY

@@ -2,6 +2,7 @@
 2006
 ====
 
+20060517 make "openpkg uuid update" processing more robust to prevent problems
 20060517 fix output of "openpkg build" wrapper script
 20060515 fix building of OpenSSL by reducing used Perl features (integer.pm, Cwd.pm)
 20060514 fix building of OpenSSL by reducing used Perl features (find.pl, strict.pm)

+ 9 - 6
openpkg/uuid.sh

@@ -173,11 +173,14 @@ do_update () {
             echo "uuid: calculating OpenPKG Registry UUID (UUID_REGISTRY):"
             echo "uuid: << $prog_uuid -v1 $opt"
         fi
-        UUID_REGISTRY=`$prog_uuid -v1 $opt`
-        if [ ".$opt_v" = .yes ]; then
-            echo "uuid: >> $UUID_REGISTRY (NOT REPEATABLE)"
+        uuid=`$prog_uuid -v1 $opt`
+        if [ ".$UUID_REGISTRY" != ".$uuid" -a ".$uuid" != . ]; then
+            UUID_REGISTRY="$uuid"
+            if [ ".$opt_v" = .yes ]; then
+                echo "uuid: >> $UUID_REGISTRY (NOT REPEATABLE)"
+            fi
+            changed=yes
         fi
-        changed=yes
     fi
 
     #   update instance UUID
@@ -211,7 +214,7 @@ do_update () {
     if [ ".$opt_v" = .yes ]; then
         echo "uuid: >> $uuid"
     fi
-    if [ ".$UUID_INSTANCE" != ".$uuid" ]; then
+    if [ ".$UUID_INSTANCE" != ".$uuid" -a ".$uuid" != . ]; then
         UUID_INSTANCE="$uuid"
         changed=yes
     fi
@@ -244,7 +247,7 @@ do_update () {
     if [ ".$opt_v" = .yes ]; then
         echo "uuid: >> $uuid"
     fi
-    if [ ".$UUID_PLATFORM" != ".$uuid" ]; then
+    if [ ".$UUID_PLATFORM" != ".$uuid" -a ".$uuid" != . ]; then
         UUID_PLATFORM="$uuid"
         changed=yes
     fi