From dc7810df3f802d71ed07b17fa644b083b3f29201 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 10 Apr 2013 14:23:57 -0400 Subject: [PATCH] Fixed version update --- swup.py | 4 +++- system-update.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/swup.py b/swup.py index 2474007..d36fae5 100755 --- a/swup.py +++ b/swup.py @@ -14,6 +14,7 @@ import zipfile import rpm import subprocess as sub import distutils +import fileinput update_repo="http://www.planux.com/updates" update_cache="/var/cache/updatemanager" @@ -97,6 +98,7 @@ def parse_updates(): attr = update.attrib up['id'] = attr['id'] up['checksum'] = update.xpath("checksum")[0].text + up['version'] = update.xpath("version")[0].text up['title'] = update.xpath("title")[0].text loc = update.xpath("location")[0] up['location'] = "%s" % ( loc.attrib['href']) @@ -235,7 +237,7 @@ def install_update(update_data): os.mkdir("%s/installed" % (update_cache)) shutil.copyfile("%s/download/%s/content/%s" %(update_cache, update_id, update_id), "%s/installed/%s" % (update_cache, update_id)) - print "Finished installing %s." % update_id + print "Finished installing %s. (from %s to %s)" % (update_id, current_version, u['version']) for line in fileinput.input("/etc/os-release", inplace=1): print line.replace(current_version, u["version"]), for line in fileinput.input("/etc/tizen-release", inplace=1): diff --git a/system-update.sh b/system-update.sh index 7c6bff6..b3bc46c 100755 --- a/system-update.sh +++ b/system-update.sh @@ -7,10 +7,12 @@ rm /system-update # call updater +plymouth update --status="Updating..." + for i in `ls /var/cache/updatemanager/install`; do UPDATE=$(echo $i | sed -e 's/^[0-9]*-//') mkdir -p /var/cache/zypp/packages/$UPDATE/rpms - /usr/bin/swup -i $UPDATE | tee /var/log/system-update.log + /usr/bin/swup -i $UPDATE 2>&1 | tee /var/log/system-update.log rm /var/cache/updatemanager/install/$i done -- 2.7.4