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>
# 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/*
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