summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-08-23 17:17:54 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-08-24 11:37:49 +0900
commitc94a87c3793a66f51e5998e198fadf3af644720b (patch)
tree23fc3c748f61b57700d3475641a70a3074ca47b4
parent87895f4774bb1fdb9f8828f1e33e6bba8f99f800 (diff)
downloadsystem-plugin-c94a87c3793a66f51e5998e198fadf3af644720b.tar.gz
system-plugin-c94a87c3793a66f51e5998e198fadf3af644720b.tar.bz2
system-plugin-c94a87c3793a66f51e5998e198fadf3af644720b.zip
Upgrade: Back rpm db up for Tizen 3.0
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>
-rwxr-xr-xupgrade/update-image.sh4
-rwxr-xr-xupgrade/update-init.sh4
2 files changed, 8 insertions, 0 deletions
diff --git a/upgrade/update-image.sh b/upgrade/update-image.sh
index 55ad4a2..fd20bcf 100755
--- a/upgrade/update-image.sh
+++ b/upgrade/update-image.sh
@@ -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/*
diff --git a/upgrade/update-init.sh b/upgrade/update-init.sh
index 5c414ad..f2de67d 100755
--- a/upgrade/update-init.sh
+++ b/upgrade/update-init.sh
@@ -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