--- /dev/null
+Introduction
+============
+
+This is a proof of concept software update tool. A few things implemented
+here will go somewhere else, everything is implemented in the script to
+allow testing, it does not mean this tool is the right place for those
+features.
+
+
+Requirements:
+=============
+- deltarpm
+- Python modules: You probably will need to install a few python module to get this going, including
+python-rpm.
+
+
+Getting Started
+==============
+
+change variables:
+
+update_repo="file:///home/nashif/system-updates/repo"
+update_cache="/tmp/updates"
+
+
+update_repo should point to the path where you have checked out the tree.
+update_cache is a test directory where all data is downloaded and extracted
+
+> ./swup.py -h
+Usage: swup.py [options]
+
+Options:
+ -h, --help show this help message and exit
+ -V, --os-version Current OS Version
+ -l, --list-updates List updates
+ -d, --download-only Download only
+ -i LABEL, --install=LABEL
+ Install update
+ -a, --install-all Install all updates
+ -r, --recommended Install recommended updates only
+ -q, --quiet don't print status messages to stdout
+
+
+You can now list updates, download them and prepare them, but still not install them.
+
+
+
+
--- /dev/null
+Name: swup
+Version: 0.1
+Release: 0
+License: GPL-2.0+
+Summary: Software Update Tool
+Url: http://www.tizen.org
+Group: System/Management
+Source: %{name}-%{version}.tar.bz2
+Requires: deltarpm
+Requires: python-lxml
+
+%description
+Software Update Tool.
+
+%prep
+%setup -q
+
+%build
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%files
+%defattr(-,root,root)
+
+%changelog
+
target_rpm = "%s-%s-%s.%s.rpm" % (hdr['name'], hdr['version'], hdr['release'], hdr['arch'])
target_location = "%s/downloads/%s/packages/%s" % (update_cache, u['id'], target_rpm)
version = "_%s.%s.drpm" % (hdr['release'], hdr['arch'])
- print version
+ #print version
original_rpm = "%s.%s.rpm" %( delta.replace(version, ""), hdr['arch'] )
original_rpm = original_rpm.replace("_%s" % hdr['version'], "")
print " %s" %original_rpm
(options, args) = parser.parse_args()
+if not os.path.exists(update_cache):
+ os.mkdir("%s" % update_cache)
+ os.mkdir("%s/downloads" % update_cache)
+
if options.osver:
os_release = get_current_version()
print os_release['version_id'].strip('"')