import rpm
import subprocess as sub
import distutils
+import fileinput
update_repo="http://www.planux.com/updates"
update_cache="/var/cache/updatemanager"
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'])
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):
# 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