Upgrade: Back rpm db up for Tizen 3.0 07/85007/2
authorSunmin Lee <sunm.lee@samsung.com>
Tue, 23 Aug 2016 08:17:54 +0000 (17:17 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Wed, 24 Aug 2016 02:37:49 +0000 (11:37 +0900)
Because rpm db is in RW partition (/opt/var/lib/rpm),
in the upgrade operation rpm db should be changed as
2.4 -> 3.0.
To do this, when create the upgrade image the rpm db should
be backed up and moved to RW path of 2.4 in the upgrade process.

Change-Id: If940abe0132dffcaaa0bc791ceecd3662946d68c
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
upgrade/update-image.sh
upgrade/update-init.sh

index 55ad4a2..fd20bcf 100755 (executable)
@@ -3,5 +3,9 @@
 # Modify normal image to upgrade image
 #
 
+# Back rpm db up for Tizen 3.0
+mkdir /system-update/data/rpm
+cp -arf /var/lib/rpm/* /system-update/data/rpm
+
 # remove RW partitions' files
 rm -rf /opt/*
index 5c414ad..f2de67d 100755 (executable)
@@ -13,3 +13,7 @@ then
        gum-utils --offline --delete-user --uid=5001
        gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
 fi
+
+# Copy 3.0 rpm db
+rm -rf /var/lib/rpm/*
+cp -arf /system-update/data/rpm/* /var/lib/rpm