From 1bd27cd4d81cb6a268833f5a7a43457c5abf0105 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 24 Feb 2013 07:59:40 -0800 Subject: [PATCH] add getpacs --- .../libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm | Bin .../zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm | Bin swup.py | 84 ++++------- tools/getpacs | 52 +++++++ .../updateinfo/{example => examples}/alsa-lib.yaml | 0 .../{example => examples}/alsa-plugins.yaml | 0 .../{example => examples}/alsa-utils.yaml | 0 tools/updateinfo/{example => examples}/avahi.yaml | 0 .../{example => examples}/banshee-1.yaml | 0 tools/updateinfo/{example => examples}/bisho.yaml | 0 tools/updateinfo/{example => examples}/bluez.yaml | 0 tools/updateinfo/{example => examples}/bzip2.yaml | 0 .../{example => examples}/ca-certificates.yaml | 0 .../{example => examples}/cdv-headers.yaml | 0 tools/updateinfo/{example => examples}/cheese.yaml | 0 .../chrome-meego-extension.yaml | 0 .../updateinfo/{example => examples}/chromium.yaml | 0 .../chunckfive-accents-fonts.yaml | 0 .../{example => examples}/clutter-gst.yaml | 0 .../updateinfo/{example => examples}/clutter.yaml | 0 tools/updateinfo/{example => examples}/cogl.yaml | 0 .../updateinfo/{example => examples}/connman.yaml | 0 tools/updateinfo/{example => examples}/cpio.yaml | 0 .../updateinfo/{example => examples}/deltarpm.yaml | 0 .../updateinfo/{example => examples}/empathy.yaml | 0 tools/updateinfo/{example => examples}/eog.yaml | 0 .../evolution-data-server.yaml | 0 .../{example => examples}/evolution.yaml | 0 .../updateinfo/{example => examples}/fastinit.yaml | 0 .../{example => examples}/frozen-bubble.yaml | 0 .../gillius-collection-fonts.yaml | 0 tools/updateinfo/{example => examples}/gimp.yaml | 0 .../{example => examples}/gio-sharp2.yaml | 0 .../{example => examples}/glib-networking.yaml | 0 .../{example => examples}/gnome-bluetooth.yaml | 0 .../gnome-control-center-netbook.yaml | 0 .../{example => examples}/gnome-packagekit.yaml | 0 .../{example => examples}/gnome-screensaver.yaml | 0 .../gnome-settings-daemon.yaml | 0 .../{example => examples}/gnome-vfs2.yaml | 0 .../{example => examples}/grilo-plugins.yaml | 0 tools/updateinfo/{example => examples}/grilo.yaml | 0 .../gst-plugins-bad-free.yaml | 0 .../{example => examples}/gst-plugins-base.yaml | 0 .../{example => examples}/gst-plugins-good.yaml | 0 .../{example => examples}/gst-vabuffer.yaml | 0 .../{example => examples}/gstreamer.yaml | 0 tools/updateinfo/{example => examples}/gthumb.yaml | 0 .../{example => examples}/gtk-sharp-beans2.yaml | 0 .../updateinfo/{example => examples}/gtkhtml3.yaml | 0 tools/updateinfo/{example => examples}/gvfs.yaml | 0 .../hvd-comic-serif-fonts.yaml | 0 .../image-configurations.yaml | 0 .../{example => examples}/installer-shell.yaml | 0 .../{example => examples}/installer.yaml | 0 tools/updateinfo/{example => examples}/json-c.yaml | 0 .../{example => examples}/junction-fonts.yaml | 0 .../kernel-adaptation-connext.yaml | 0 .../kernel-adaptation-connext2.yaml | 0 .../kernel-adaptation-intel-automotive.yaml | 0 .../kernel-adaptation-pc.yaml | 0 tools/updateinfo/{example => examples}/kernel.yaml | 0 .../{example => examples}/league-gothic-fonts.yaml | 0 .../{example => examples}/libXrandr.yaml | 0 .../{example => examples}/libcdaudio.yaml | 0 .../updateinfo/{example => examples}/libcdio.yaml | 0 tools/updateinfo/{example => examples}/libdrm.yaml | 0 .../{example => examples}/libgdiplus0.yaml | 0 .../{example => examples}/libsocialweb.yaml | 0 tools/updateinfo/{example => examples}/libva.yaml | 0 tools/updateinfo/{example => examples}/libvpx.yaml | 0 .../{example => examples}/libwsbm-cdv.yaml | 0 .../updateinfo/{example => examples}/libzypp.yaml | 0 .../{example => examples}/media-explorer.yaml | 0 .../{example => examples}/meego-ivi-configs.yaml | 0 .../{example => examples}/meego-menus.yaml | 0 .../{example => examples}/meego-netbook-intro.yaml | 0 .../meego-netbook-settings.yaml | 0 .../{example => examples}/meego-netbook-theme.yaml | 0 .../meego-netbook-user-skel.yaml | 0 .../meego-panel-applications.yaml | 0 .../meego-panel-datetime.yaml | 0 .../{example => examples}/meego-panel-devices.yaml | 0 .../{example => examples}/meego-panel-myzone.yaml | 0 .../meego-panel-networks.yaml | 0 .../{example => examples}/meego-panel-people.yaml | 0 .../{example => examples}/meego-panel-status.yaml | 0 .../{example => examples}/meego-panel-web.yaml | 0 .../{example => examples}/meego-panel-zones.yaml | 0 .../{example => examples}/meego-ux-ivi.yaml | 0 .../meegotouch-inputmethodbridges.yaml | 0 .../mobile-broadband-provider-info.yaml | 0 .../{example => examples}/mutter-netbook.yaml | 0 tools/updateinfo/{example => examples}/mutter.yaml | 0 tools/updateinfo/{example => examples}/mx.yaml | 0 .../updateinfo/{example => examples}/nautilus.yaml | 0 .../{example => examples}/netbook-backgrounds.yaml | 0 .../{example => examples}/netbook-icon-theme.yaml | 0 .../{example => examples}/neverball.yaml | 0 tools/updateinfo/{example => examples}/ofono.yaml | 0 .../{example => examples}/open-sans-fonts.yaml | 0 .../{example => examples}/openconnect.yaml | 0 .../{example => examples}/package-groups.yaml | 0 .../{example => examples}/packagekit.yaml | 0 .../{example => examples}/pacrunner.yaml | 0 tools/updateinfo/{example => examples}/perl.yaml | 0 tools/updateinfo/{example => examples}/pidgin.yaml | 0 tools/updateinfo/{example => examples}/pixman.yaml | 0 .../{example => examples}/pulseaudio.yaml | 0 .../{example => examples}/raleway-fonts.yaml | 0 .../updateinfo/{example => examples}/sensorfw.yaml | 0 .../{example => examples}/shared-mime-info.yaml | 0 .../sorts-mill-goudy-fonts.yaml | 0 .../{example => examples}/syncevolution.yaml | 0 .../{example => examples}/system-config-date.yaml | 0 .../system-config-language.yaml | 0 .../system-config-printer.yaml | 0 tools/updateinfo/{example => examples}/tasks.yaml | 0 .../{example => examples}/telepathy-gabble.yaml | 0 .../{example => examples}/telepathy-glib.yaml | 0 .../{example => examples}/telepathy-haze.yaml | 0 .../{example => examples}/telepathy-idle.yaml | 0 .../{example => examples}/telepathy-logger.yaml | 0 .../telepathy-misson-control.yaml | 0 .../{example => examples}/telepathy-salut.yaml | 0 tools/updateinfo/{example => examples}/udev.yaml | 0 tools/updateinfo/{example => examples}/udisks.yaml | 0 .../{example => examples}/updateinfo.xml | 0 .../{example => examples}/usb-modeswitch-data.yaml | 0 .../{example => examples}/usb-modeswitch.yaml | 0 tools/updateinfo/{example => examples}/vino.yaml | 0 tools/updateinfo/{example => examples}/xfce.yaml | 0 .../{example => examples}/xorg-x11-drv-intel.yaml | 0 tools/updateinfo/{example => examples}/zypper.yaml | 0 tools/updateinfo/updateinfo.py | 153 ++++----------------- 135 files changed, 102 insertions(+), 187 deletions(-) rename {TZUP-2013-001-000 => examples/TZUP-2013-001-000}/delta/libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm (100%) rename {TZUP-2013-001-000 => examples/TZUP-2013-001-000}/delta/zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm (100%) create mode 100755 tools/getpacs rename tools/updateinfo/{example => examples}/alsa-lib.yaml (100%) rename tools/updateinfo/{example => examples}/alsa-plugins.yaml (100%) rename tools/updateinfo/{example => examples}/alsa-utils.yaml (100%) rename tools/updateinfo/{example => examples}/avahi.yaml (100%) rename tools/updateinfo/{example => examples}/banshee-1.yaml (100%) rename tools/updateinfo/{example => examples}/bisho.yaml (100%) rename tools/updateinfo/{example => examples}/bluez.yaml (100%) rename tools/updateinfo/{example => examples}/bzip2.yaml (100%) rename tools/updateinfo/{example => examples}/ca-certificates.yaml (100%) rename tools/updateinfo/{example => examples}/cdv-headers.yaml (100%) rename tools/updateinfo/{example => examples}/cheese.yaml (100%) rename tools/updateinfo/{example => examples}/chrome-meego-extension.yaml (100%) rename tools/updateinfo/{example => examples}/chromium.yaml (100%) rename tools/updateinfo/{example => examples}/chunckfive-accents-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/clutter-gst.yaml (100%) rename tools/updateinfo/{example => examples}/clutter.yaml (100%) rename tools/updateinfo/{example => examples}/cogl.yaml (100%) rename tools/updateinfo/{example => examples}/connman.yaml (100%) rename tools/updateinfo/{example => examples}/cpio.yaml (100%) rename tools/updateinfo/{example => examples}/deltarpm.yaml (100%) rename tools/updateinfo/{example => examples}/empathy.yaml (100%) rename tools/updateinfo/{example => examples}/eog.yaml (100%) rename tools/updateinfo/{example => examples}/evolution-data-server.yaml (100%) rename tools/updateinfo/{example => examples}/evolution.yaml (100%) rename tools/updateinfo/{example => examples}/fastinit.yaml (100%) rename tools/updateinfo/{example => examples}/frozen-bubble.yaml (100%) rename tools/updateinfo/{example => examples}/gillius-collection-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/gimp.yaml (100%) rename tools/updateinfo/{example => examples}/gio-sharp2.yaml (100%) rename tools/updateinfo/{example => examples}/glib-networking.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-bluetooth.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-control-center-netbook.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-packagekit.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-screensaver.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-settings-daemon.yaml (100%) rename tools/updateinfo/{example => examples}/gnome-vfs2.yaml (100%) rename tools/updateinfo/{example => examples}/grilo-plugins.yaml (100%) rename tools/updateinfo/{example => examples}/grilo.yaml (100%) rename tools/updateinfo/{example => examples}/gst-plugins-bad-free.yaml (100%) rename tools/updateinfo/{example => examples}/gst-plugins-base.yaml (100%) rename tools/updateinfo/{example => examples}/gst-plugins-good.yaml (100%) rename tools/updateinfo/{example => examples}/gst-vabuffer.yaml (100%) rename tools/updateinfo/{example => examples}/gstreamer.yaml (100%) rename tools/updateinfo/{example => examples}/gthumb.yaml (100%) rename tools/updateinfo/{example => examples}/gtk-sharp-beans2.yaml (100%) rename tools/updateinfo/{example => examples}/gtkhtml3.yaml (100%) rename tools/updateinfo/{example => examples}/gvfs.yaml (100%) rename tools/updateinfo/{example => examples}/hvd-comic-serif-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/image-configurations.yaml (100%) rename tools/updateinfo/{example => examples}/installer-shell.yaml (100%) rename tools/updateinfo/{example => examples}/installer.yaml (100%) rename tools/updateinfo/{example => examples}/json-c.yaml (100%) rename tools/updateinfo/{example => examples}/junction-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/kernel-adaptation-connext.yaml (100%) rename tools/updateinfo/{example => examples}/kernel-adaptation-connext2.yaml (100%) rename tools/updateinfo/{example => examples}/kernel-adaptation-intel-automotive.yaml (100%) rename tools/updateinfo/{example => examples}/kernel-adaptation-pc.yaml (100%) rename tools/updateinfo/{example => examples}/kernel.yaml (100%) rename tools/updateinfo/{example => examples}/league-gothic-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/libXrandr.yaml (100%) rename tools/updateinfo/{example => examples}/libcdaudio.yaml (100%) rename tools/updateinfo/{example => examples}/libcdio.yaml (100%) rename tools/updateinfo/{example => examples}/libdrm.yaml (100%) rename tools/updateinfo/{example => examples}/libgdiplus0.yaml (100%) rename tools/updateinfo/{example => examples}/libsocialweb.yaml (100%) rename tools/updateinfo/{example => examples}/libva.yaml (100%) rename tools/updateinfo/{example => examples}/libvpx.yaml (100%) rename tools/updateinfo/{example => examples}/libwsbm-cdv.yaml (100%) rename tools/updateinfo/{example => examples}/libzypp.yaml (100%) rename tools/updateinfo/{example => examples}/media-explorer.yaml (100%) rename tools/updateinfo/{example => examples}/meego-ivi-configs.yaml (100%) rename tools/updateinfo/{example => examples}/meego-menus.yaml (100%) rename tools/updateinfo/{example => examples}/meego-netbook-intro.yaml (100%) rename tools/updateinfo/{example => examples}/meego-netbook-settings.yaml (100%) rename tools/updateinfo/{example => examples}/meego-netbook-theme.yaml (100%) rename tools/updateinfo/{example => examples}/meego-netbook-user-skel.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-applications.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-datetime.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-devices.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-myzone.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-networks.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-people.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-status.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-web.yaml (100%) rename tools/updateinfo/{example => examples}/meego-panel-zones.yaml (100%) rename tools/updateinfo/{example => examples}/meego-ux-ivi.yaml (100%) rename tools/updateinfo/{example => examples}/meegotouch-inputmethodbridges.yaml (100%) rename tools/updateinfo/{example => examples}/mobile-broadband-provider-info.yaml (100%) rename tools/updateinfo/{example => examples}/mutter-netbook.yaml (100%) rename tools/updateinfo/{example => examples}/mutter.yaml (100%) rename tools/updateinfo/{example => examples}/mx.yaml (100%) rename tools/updateinfo/{example => examples}/nautilus.yaml (100%) rename tools/updateinfo/{example => examples}/netbook-backgrounds.yaml (100%) rename tools/updateinfo/{example => examples}/netbook-icon-theme.yaml (100%) rename tools/updateinfo/{example => examples}/neverball.yaml (100%) rename tools/updateinfo/{example => examples}/ofono.yaml (100%) rename tools/updateinfo/{example => examples}/open-sans-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/openconnect.yaml (100%) rename tools/updateinfo/{example => examples}/package-groups.yaml (100%) rename tools/updateinfo/{example => examples}/packagekit.yaml (100%) rename tools/updateinfo/{example => examples}/pacrunner.yaml (100%) rename tools/updateinfo/{example => examples}/perl.yaml (100%) rename tools/updateinfo/{example => examples}/pidgin.yaml (100%) rename tools/updateinfo/{example => examples}/pixman.yaml (100%) rename tools/updateinfo/{example => examples}/pulseaudio.yaml (100%) rename tools/updateinfo/{example => examples}/raleway-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/sensorfw.yaml (100%) rename tools/updateinfo/{example => examples}/shared-mime-info.yaml (100%) rename tools/updateinfo/{example => examples}/sorts-mill-goudy-fonts.yaml (100%) rename tools/updateinfo/{example => examples}/syncevolution.yaml (100%) rename tools/updateinfo/{example => examples}/system-config-date.yaml (100%) rename tools/updateinfo/{example => examples}/system-config-language.yaml (100%) rename tools/updateinfo/{example => examples}/system-config-printer.yaml (100%) rename tools/updateinfo/{example => examples}/tasks.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-gabble.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-glib.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-haze.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-idle.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-logger.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-misson-control.yaml (100%) rename tools/updateinfo/{example => examples}/telepathy-salut.yaml (100%) rename tools/updateinfo/{example => examples}/udev.yaml (100%) rename tools/updateinfo/{example => examples}/udisks.yaml (100%) rename tools/updateinfo/{example => examples}/updateinfo.xml (100%) rename tools/updateinfo/{example => examples}/usb-modeswitch-data.yaml (100%) rename tools/updateinfo/{example => examples}/usb-modeswitch.yaml (100%) rename tools/updateinfo/{example => examples}/vino.yaml (100%) rename tools/updateinfo/{example => examples}/xfce.yaml (100%) rename tools/updateinfo/{example => examples}/xorg-x11-drv-intel.yaml (100%) rename tools/updateinfo/{example => examples}/zypper.yaml (100%) mode change 100644 => 100755 tools/updateinfo/updateinfo.py diff --git a/TZUP-2013-001-000/delta/libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm b/examples/TZUP-2013-001-000/delta/libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm similarity index 100% rename from TZUP-2013-001-000/delta/libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm rename to examples/TZUP-2013-001-000/delta/libzypp-11.6.2_11.8.0-2.1.2_2.4.1.x86_64.drpm diff --git a/TZUP-2013-001-000/delta/zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm b/examples/TZUP-2013-001-000/delta/zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm similarity index 100% rename from TZUP-2013-001-000/delta/zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm rename to examples/TZUP-2013-001-000/delta/zypper-1.7.3_1.7.8-1.2.2_1.5.1.x86_64.drpm diff --git a/swup.py b/swup.py index 214614a..a4e35eb 100755 --- a/swup.py +++ b/swup.py @@ -14,7 +14,7 @@ import zipfile import rpm import subprocess as sub -update_repo="file:///home/nashif/system-updates/repo" +update_repo="file:///home/tizen/swup/repo" update_cache="/tmp/updates" @@ -110,6 +110,7 @@ def download_update(update_data): u = update_data location = u['location'] if not os.path.exists("%s/downloads/%s" % (update_cache,location)): + print "Downloading %s/%s" % (update_repo, location) update_file = urllib2.urlopen("%s/%s" % (update_repo, location) ) location = os.path.basename(location) announced_csum = u['checksum'] @@ -144,69 +145,35 @@ def get_new_update_list(location): fp.write(update_raw) fp.close() +def unpack(location, update_id): + zfile = zipfile.ZipFile("%s/downloads/%s" % (update_cache,location)) + for name in zfile.namelist(): + (dirname, filename) = os.path.split(name) + print "Decompressing " + filename + " on " + dirname + if not os.path.exists("%s/downloads/%s" % (update_cache, dirname)): + os.mkdir("%s/downloads/%s" % (update_cache, dirname)) + if filename != "": + fd = open("%s/downloads/%s" % (update_cache, name),"w") + fd.write(zfile.read(name)) + fd.close() + def prepare_update(update_data): u = update_data location = u['location'] + update_id = u['id'] # unzip - if os.path.exists("%s/downloads/%s" % (update_cache,location)) and not os.path.exists("%s/downloads/%s" % (update_cache,u['id'])): - zfile = zipfile.ZipFile("%s/downloads/%s" % (update_cache,location)) - for name in zfile.namelist(): - (dirname, filename) = os.path.split(name) - print "Decompressing " + filename + " on " + dirname - if not os.path.exists("%s/downloads/%s" % (update_cache, dirname)): - os.mkdir("%s/downloads/%s" % (update_cache, dirname)) - if filename != "": - fd = open("%s/downloads/%s" % (update_cache, name),"w") - fd.write(zfile.read(name)) - fd.close() - # apply deltas - print "Delta Packages:" - for delta in os.listdir("%s/downloads/%s/delta" % (update_cache,u['id'])): - - - ts = rpm.TransactionSet() - delta_location = "%s/downloads/%s/delta/%s" % (update_cache, u['id'], delta) - fdno = os.open(delta_location, os.O_RDONLY) - - hdr = ts.hdrFromFdno(fdno) - os.close(fdno) - 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 - original_rpm = "%s.%s.rpm" %( delta.replace(version, ""), hdr['arch'] ) - original_rpm = original_rpm.replace("_%s" % hdr['version'], "") - print " %s" %original_rpm - print " + %s" %delta - print " = %s" %target_rpm - - # Verify - - mi = ts.dbMatch("name", hdr['name']) - Found = False - for r in mi: - installed = "%s-%s-%s.%s.rpm" % (r.name, r.version, r.release, r.arch) - #original = "%s-%s-%s.%s" % (hdr['name'], hdr['version'], hdr['release'], hdr['arch']) - print installed - - if installed == original_rpm: - Found = True - if Found: - print "Original availale, delta can be applied. Applying now..." - # apply delta here - if os.path.exists("/usr/bin/applydeltarpm"): - if not os.path.exists(target_location): - cmd = '/usr/bin/applydeltarpm %s %s' % (delta_location, target_location) - print cmd - p = sub.Popen(["/usr/bin/applydeltarpm", delta_location, target_location] ,stdout=sub.PIPE,stderr=sub.PIPE) - output, errors = p.communicate() - print output - else: - print "Target already exists" - else: - print "Error: original not available, can't apply delta. We have %s instead of %s" % (installed, original_rpm) + if os.path.exists("%s/downloads/%s" % (update_cache,location)) and not os.path.exists("%s/downloads/%s" % (update_cache,update_id)): + print "Unpacking %s" %location + unpack(location, update_id) + else: + print "cant find update: %s" % update_id + return + repodir = "%s/repos.d" %update_cache + repourl = "file://%s/downloads/%s" % (update_cache, update_id) + os.system("zypper --reposd-dir %s ar --no-gpgcheck --no-keep-packages %s %s" %(repodir, repourl, update_id)) + os.system("zypper --reposd-dir %s patch -d" % repodir ) def apply_update(update_data): @@ -242,6 +209,7 @@ parser.add_option("-q", "--quiet", if not os.path.exists(update_cache): os.mkdir("%s" % update_cache) os.mkdir("%s/downloads" % update_cache) + os.mkdir("%s/repos.d" % update_cache) if options.osver: os_release = get_current_version() diff --git a/tools/getpacs b/tools/getpacs new file mode 100755 index 0000000..00593ff --- /dev/null +++ b/tools/getpacs @@ -0,0 +1,52 @@ +#!/bin/sh + +BUILD_OLD=$1 +BUILD_NEW=$2 +USER="" +PASS="" +WGET="/usr/bin/wget -q --timestamping " +DAILY="" +WEEKLY="/pc/releases/weekly/trunk" +SNAPSHOTS="/${RELEASE_TYPE}" + +RELEASE_TYPE=$WEEKLY + +BASE_DIR=$PWD +wget https://$USER:$PASS@download.tz.otcshare.org/${RELEASE_TYPE}/${BUILD_OLD}/images/gnome/gnome-${BUILD_OLD}.packages -O old +wget https://$USER:$PASS@download.tz.otcshare.org/${RELEASE_TYPE}/${BUILD_NEW}/images/gnome/gnome-${BUILD_NEW}.packages -O new +awk -F' ' ' { print $1 } ' $BASE_DIR/old | sort > $BASE_DIR/p0 +awk -F' ' ' { print $1 } ' $BASE_DIR/new | sort > $BASE_DIR/p1 + +comm -3 $BASE_DIR/p0 $BASE_DIR/p1 > $BASE_DIR/new_packages + +OLD_IFS=$IFS +IFS=$'\n' +mkdir -p old_packages +mkdir -p update/rpms +mkdir -p update/new +pushd old_packages +for i in `diff -u $BASE_DIR/old $BASE_DIR/new | grep "^-" | grep -v "^---" | grep -v "^+++" | sed -e 's/^-//'`; do + pac=$(echo $i | sed -e 's/\([^\.]*\)\.\([^\s]*\)\s\([^$]*\)/\2\/\1-\3.\2.rpm/') + echo "Fetching $pac" + /usr/bin/wget -q --timestamping https://$USER:$PASS@download.tz.otcshare.org/${RELEASE_TYPE}/${BUILD_OLD}/repos/pc/x86_64/packages/$pac +done +popd +for i in `diff -u $BASE_DIR/old $BASE_DIR/new | grep "^+" | grep -v "^---" | grep -v "^+++" | sed -e 's/^+//'`; do + pac=$(echo $i | sed -e 's/\([^\.]*\)\.\([^\s]*\)\s\([^$]*\)/\2\/\1-\3.\2.rpm/') + pac2=$(echo $i | sed -e 's/\([^\.]*\)\.\([^\s]*\)\s\([^$]*\)/\1.\2/') + echo "is $pac2 a new package?" + grep $pac2 $BASE_DIR/new_packages + if [ $? = 1 ]; then + pushd update/rpms + else + pushd update/new + fi + echo "Fetching $pac" + /usr/bin/wget -q --timestamping https://$USER:$PASS@download.tz.otcshare.org/${RELEASE_TYPE}/${BUILD_NEW}/repos/pc/x86_64/packages/$pac + popd + +done +IFS=$OLD_IFS + + +#rm $BASE_DIR/new $BASE_DIR/old $BASE_DIR/p0 $BASE_DIR/{p1,new_packages} diff --git a/tools/updateinfo/example/alsa-lib.yaml b/tools/updateinfo/examples/alsa-lib.yaml similarity index 100% rename from tools/updateinfo/example/alsa-lib.yaml rename to tools/updateinfo/examples/alsa-lib.yaml diff --git a/tools/updateinfo/example/alsa-plugins.yaml b/tools/updateinfo/examples/alsa-plugins.yaml similarity index 100% rename from tools/updateinfo/example/alsa-plugins.yaml rename to tools/updateinfo/examples/alsa-plugins.yaml diff --git a/tools/updateinfo/example/alsa-utils.yaml b/tools/updateinfo/examples/alsa-utils.yaml similarity index 100% rename from tools/updateinfo/example/alsa-utils.yaml rename to tools/updateinfo/examples/alsa-utils.yaml diff --git a/tools/updateinfo/example/avahi.yaml b/tools/updateinfo/examples/avahi.yaml similarity index 100% rename from tools/updateinfo/example/avahi.yaml rename to tools/updateinfo/examples/avahi.yaml diff --git a/tools/updateinfo/example/banshee-1.yaml b/tools/updateinfo/examples/banshee-1.yaml similarity index 100% rename from tools/updateinfo/example/banshee-1.yaml rename to tools/updateinfo/examples/banshee-1.yaml diff --git a/tools/updateinfo/example/bisho.yaml b/tools/updateinfo/examples/bisho.yaml similarity index 100% rename from tools/updateinfo/example/bisho.yaml rename to tools/updateinfo/examples/bisho.yaml diff --git a/tools/updateinfo/example/bluez.yaml b/tools/updateinfo/examples/bluez.yaml similarity index 100% rename from tools/updateinfo/example/bluez.yaml rename to tools/updateinfo/examples/bluez.yaml diff --git a/tools/updateinfo/example/bzip2.yaml b/tools/updateinfo/examples/bzip2.yaml similarity index 100% rename from tools/updateinfo/example/bzip2.yaml rename to tools/updateinfo/examples/bzip2.yaml diff --git a/tools/updateinfo/example/ca-certificates.yaml b/tools/updateinfo/examples/ca-certificates.yaml similarity index 100% rename from tools/updateinfo/example/ca-certificates.yaml rename to tools/updateinfo/examples/ca-certificates.yaml diff --git a/tools/updateinfo/example/cdv-headers.yaml b/tools/updateinfo/examples/cdv-headers.yaml similarity index 100% rename from tools/updateinfo/example/cdv-headers.yaml rename to tools/updateinfo/examples/cdv-headers.yaml diff --git a/tools/updateinfo/example/cheese.yaml b/tools/updateinfo/examples/cheese.yaml similarity index 100% rename from tools/updateinfo/example/cheese.yaml rename to tools/updateinfo/examples/cheese.yaml diff --git a/tools/updateinfo/example/chrome-meego-extension.yaml b/tools/updateinfo/examples/chrome-meego-extension.yaml similarity index 100% rename from tools/updateinfo/example/chrome-meego-extension.yaml rename to tools/updateinfo/examples/chrome-meego-extension.yaml diff --git a/tools/updateinfo/example/chromium.yaml b/tools/updateinfo/examples/chromium.yaml similarity index 100% rename from tools/updateinfo/example/chromium.yaml rename to tools/updateinfo/examples/chromium.yaml diff --git a/tools/updateinfo/example/chunckfive-accents-fonts.yaml b/tools/updateinfo/examples/chunckfive-accents-fonts.yaml similarity index 100% rename from tools/updateinfo/example/chunckfive-accents-fonts.yaml rename to tools/updateinfo/examples/chunckfive-accents-fonts.yaml diff --git a/tools/updateinfo/example/clutter-gst.yaml b/tools/updateinfo/examples/clutter-gst.yaml similarity index 100% rename from tools/updateinfo/example/clutter-gst.yaml rename to tools/updateinfo/examples/clutter-gst.yaml diff --git a/tools/updateinfo/example/clutter.yaml b/tools/updateinfo/examples/clutter.yaml similarity index 100% rename from tools/updateinfo/example/clutter.yaml rename to tools/updateinfo/examples/clutter.yaml diff --git a/tools/updateinfo/example/cogl.yaml b/tools/updateinfo/examples/cogl.yaml similarity index 100% rename from tools/updateinfo/example/cogl.yaml rename to tools/updateinfo/examples/cogl.yaml diff --git a/tools/updateinfo/example/connman.yaml b/tools/updateinfo/examples/connman.yaml similarity index 100% rename from tools/updateinfo/example/connman.yaml rename to tools/updateinfo/examples/connman.yaml diff --git a/tools/updateinfo/example/cpio.yaml b/tools/updateinfo/examples/cpio.yaml similarity index 100% rename from tools/updateinfo/example/cpio.yaml rename to tools/updateinfo/examples/cpio.yaml diff --git a/tools/updateinfo/example/deltarpm.yaml b/tools/updateinfo/examples/deltarpm.yaml similarity index 100% rename from tools/updateinfo/example/deltarpm.yaml rename to tools/updateinfo/examples/deltarpm.yaml diff --git a/tools/updateinfo/example/empathy.yaml b/tools/updateinfo/examples/empathy.yaml similarity index 100% rename from tools/updateinfo/example/empathy.yaml rename to tools/updateinfo/examples/empathy.yaml diff --git a/tools/updateinfo/example/eog.yaml b/tools/updateinfo/examples/eog.yaml similarity index 100% rename from tools/updateinfo/example/eog.yaml rename to tools/updateinfo/examples/eog.yaml diff --git a/tools/updateinfo/example/evolution-data-server.yaml b/tools/updateinfo/examples/evolution-data-server.yaml similarity index 100% rename from tools/updateinfo/example/evolution-data-server.yaml rename to tools/updateinfo/examples/evolution-data-server.yaml diff --git a/tools/updateinfo/example/evolution.yaml b/tools/updateinfo/examples/evolution.yaml similarity index 100% rename from tools/updateinfo/example/evolution.yaml rename to tools/updateinfo/examples/evolution.yaml diff --git a/tools/updateinfo/example/fastinit.yaml b/tools/updateinfo/examples/fastinit.yaml similarity index 100% rename from tools/updateinfo/example/fastinit.yaml rename to tools/updateinfo/examples/fastinit.yaml diff --git a/tools/updateinfo/example/frozen-bubble.yaml b/tools/updateinfo/examples/frozen-bubble.yaml similarity index 100% rename from tools/updateinfo/example/frozen-bubble.yaml rename to tools/updateinfo/examples/frozen-bubble.yaml diff --git a/tools/updateinfo/example/gillius-collection-fonts.yaml b/tools/updateinfo/examples/gillius-collection-fonts.yaml similarity index 100% rename from tools/updateinfo/example/gillius-collection-fonts.yaml rename to tools/updateinfo/examples/gillius-collection-fonts.yaml diff --git a/tools/updateinfo/example/gimp.yaml b/tools/updateinfo/examples/gimp.yaml similarity index 100% rename from tools/updateinfo/example/gimp.yaml rename to tools/updateinfo/examples/gimp.yaml diff --git a/tools/updateinfo/example/gio-sharp2.yaml b/tools/updateinfo/examples/gio-sharp2.yaml similarity index 100% rename from tools/updateinfo/example/gio-sharp2.yaml rename to tools/updateinfo/examples/gio-sharp2.yaml diff --git a/tools/updateinfo/example/glib-networking.yaml b/tools/updateinfo/examples/glib-networking.yaml similarity index 100% rename from tools/updateinfo/example/glib-networking.yaml rename to tools/updateinfo/examples/glib-networking.yaml diff --git a/tools/updateinfo/example/gnome-bluetooth.yaml b/tools/updateinfo/examples/gnome-bluetooth.yaml similarity index 100% rename from tools/updateinfo/example/gnome-bluetooth.yaml rename to tools/updateinfo/examples/gnome-bluetooth.yaml diff --git a/tools/updateinfo/example/gnome-control-center-netbook.yaml b/tools/updateinfo/examples/gnome-control-center-netbook.yaml similarity index 100% rename from tools/updateinfo/example/gnome-control-center-netbook.yaml rename to tools/updateinfo/examples/gnome-control-center-netbook.yaml diff --git a/tools/updateinfo/example/gnome-packagekit.yaml b/tools/updateinfo/examples/gnome-packagekit.yaml similarity index 100% rename from tools/updateinfo/example/gnome-packagekit.yaml rename to tools/updateinfo/examples/gnome-packagekit.yaml diff --git a/tools/updateinfo/example/gnome-screensaver.yaml b/tools/updateinfo/examples/gnome-screensaver.yaml similarity index 100% rename from tools/updateinfo/example/gnome-screensaver.yaml rename to tools/updateinfo/examples/gnome-screensaver.yaml diff --git a/tools/updateinfo/example/gnome-settings-daemon.yaml b/tools/updateinfo/examples/gnome-settings-daemon.yaml similarity index 100% rename from tools/updateinfo/example/gnome-settings-daemon.yaml rename to tools/updateinfo/examples/gnome-settings-daemon.yaml diff --git a/tools/updateinfo/example/gnome-vfs2.yaml b/tools/updateinfo/examples/gnome-vfs2.yaml similarity index 100% rename from tools/updateinfo/example/gnome-vfs2.yaml rename to tools/updateinfo/examples/gnome-vfs2.yaml diff --git a/tools/updateinfo/example/grilo-plugins.yaml b/tools/updateinfo/examples/grilo-plugins.yaml similarity index 100% rename from tools/updateinfo/example/grilo-plugins.yaml rename to tools/updateinfo/examples/grilo-plugins.yaml diff --git a/tools/updateinfo/example/grilo.yaml b/tools/updateinfo/examples/grilo.yaml similarity index 100% rename from tools/updateinfo/example/grilo.yaml rename to tools/updateinfo/examples/grilo.yaml diff --git a/tools/updateinfo/example/gst-plugins-bad-free.yaml b/tools/updateinfo/examples/gst-plugins-bad-free.yaml similarity index 100% rename from tools/updateinfo/example/gst-plugins-bad-free.yaml rename to tools/updateinfo/examples/gst-plugins-bad-free.yaml diff --git a/tools/updateinfo/example/gst-plugins-base.yaml b/tools/updateinfo/examples/gst-plugins-base.yaml similarity index 100% rename from tools/updateinfo/example/gst-plugins-base.yaml rename to tools/updateinfo/examples/gst-plugins-base.yaml diff --git a/tools/updateinfo/example/gst-plugins-good.yaml b/tools/updateinfo/examples/gst-plugins-good.yaml similarity index 100% rename from tools/updateinfo/example/gst-plugins-good.yaml rename to tools/updateinfo/examples/gst-plugins-good.yaml diff --git a/tools/updateinfo/example/gst-vabuffer.yaml b/tools/updateinfo/examples/gst-vabuffer.yaml similarity index 100% rename from tools/updateinfo/example/gst-vabuffer.yaml rename to tools/updateinfo/examples/gst-vabuffer.yaml diff --git a/tools/updateinfo/example/gstreamer.yaml b/tools/updateinfo/examples/gstreamer.yaml similarity index 100% rename from tools/updateinfo/example/gstreamer.yaml rename to tools/updateinfo/examples/gstreamer.yaml diff --git a/tools/updateinfo/example/gthumb.yaml b/tools/updateinfo/examples/gthumb.yaml similarity index 100% rename from tools/updateinfo/example/gthumb.yaml rename to tools/updateinfo/examples/gthumb.yaml diff --git a/tools/updateinfo/example/gtk-sharp-beans2.yaml b/tools/updateinfo/examples/gtk-sharp-beans2.yaml similarity index 100% rename from tools/updateinfo/example/gtk-sharp-beans2.yaml rename to tools/updateinfo/examples/gtk-sharp-beans2.yaml diff --git a/tools/updateinfo/example/gtkhtml3.yaml b/tools/updateinfo/examples/gtkhtml3.yaml similarity index 100% rename from tools/updateinfo/example/gtkhtml3.yaml rename to tools/updateinfo/examples/gtkhtml3.yaml diff --git a/tools/updateinfo/example/gvfs.yaml b/tools/updateinfo/examples/gvfs.yaml similarity index 100% rename from tools/updateinfo/example/gvfs.yaml rename to tools/updateinfo/examples/gvfs.yaml diff --git a/tools/updateinfo/example/hvd-comic-serif-fonts.yaml b/tools/updateinfo/examples/hvd-comic-serif-fonts.yaml similarity index 100% rename from tools/updateinfo/example/hvd-comic-serif-fonts.yaml rename to tools/updateinfo/examples/hvd-comic-serif-fonts.yaml diff --git a/tools/updateinfo/example/image-configurations.yaml b/tools/updateinfo/examples/image-configurations.yaml similarity index 100% rename from tools/updateinfo/example/image-configurations.yaml rename to tools/updateinfo/examples/image-configurations.yaml diff --git a/tools/updateinfo/example/installer-shell.yaml b/tools/updateinfo/examples/installer-shell.yaml similarity index 100% rename from tools/updateinfo/example/installer-shell.yaml rename to tools/updateinfo/examples/installer-shell.yaml diff --git a/tools/updateinfo/example/installer.yaml b/tools/updateinfo/examples/installer.yaml similarity index 100% rename from tools/updateinfo/example/installer.yaml rename to tools/updateinfo/examples/installer.yaml diff --git a/tools/updateinfo/example/json-c.yaml b/tools/updateinfo/examples/json-c.yaml similarity index 100% rename from tools/updateinfo/example/json-c.yaml rename to tools/updateinfo/examples/json-c.yaml diff --git a/tools/updateinfo/example/junction-fonts.yaml b/tools/updateinfo/examples/junction-fonts.yaml similarity index 100% rename from tools/updateinfo/example/junction-fonts.yaml rename to tools/updateinfo/examples/junction-fonts.yaml diff --git a/tools/updateinfo/example/kernel-adaptation-connext.yaml b/tools/updateinfo/examples/kernel-adaptation-connext.yaml similarity index 100% rename from tools/updateinfo/example/kernel-adaptation-connext.yaml rename to tools/updateinfo/examples/kernel-adaptation-connext.yaml diff --git a/tools/updateinfo/example/kernel-adaptation-connext2.yaml b/tools/updateinfo/examples/kernel-adaptation-connext2.yaml similarity index 100% rename from tools/updateinfo/example/kernel-adaptation-connext2.yaml rename to tools/updateinfo/examples/kernel-adaptation-connext2.yaml diff --git a/tools/updateinfo/example/kernel-adaptation-intel-automotive.yaml b/tools/updateinfo/examples/kernel-adaptation-intel-automotive.yaml similarity index 100% rename from tools/updateinfo/example/kernel-adaptation-intel-automotive.yaml rename to tools/updateinfo/examples/kernel-adaptation-intel-automotive.yaml diff --git a/tools/updateinfo/example/kernel-adaptation-pc.yaml b/tools/updateinfo/examples/kernel-adaptation-pc.yaml similarity index 100% rename from tools/updateinfo/example/kernel-adaptation-pc.yaml rename to tools/updateinfo/examples/kernel-adaptation-pc.yaml diff --git a/tools/updateinfo/example/kernel.yaml b/tools/updateinfo/examples/kernel.yaml similarity index 100% rename from tools/updateinfo/example/kernel.yaml rename to tools/updateinfo/examples/kernel.yaml diff --git a/tools/updateinfo/example/league-gothic-fonts.yaml b/tools/updateinfo/examples/league-gothic-fonts.yaml similarity index 100% rename from tools/updateinfo/example/league-gothic-fonts.yaml rename to tools/updateinfo/examples/league-gothic-fonts.yaml diff --git a/tools/updateinfo/example/libXrandr.yaml b/tools/updateinfo/examples/libXrandr.yaml similarity index 100% rename from tools/updateinfo/example/libXrandr.yaml rename to tools/updateinfo/examples/libXrandr.yaml diff --git a/tools/updateinfo/example/libcdaudio.yaml b/tools/updateinfo/examples/libcdaudio.yaml similarity index 100% rename from tools/updateinfo/example/libcdaudio.yaml rename to tools/updateinfo/examples/libcdaudio.yaml diff --git a/tools/updateinfo/example/libcdio.yaml b/tools/updateinfo/examples/libcdio.yaml similarity index 100% rename from tools/updateinfo/example/libcdio.yaml rename to tools/updateinfo/examples/libcdio.yaml diff --git a/tools/updateinfo/example/libdrm.yaml b/tools/updateinfo/examples/libdrm.yaml similarity index 100% rename from tools/updateinfo/example/libdrm.yaml rename to tools/updateinfo/examples/libdrm.yaml diff --git a/tools/updateinfo/example/libgdiplus0.yaml b/tools/updateinfo/examples/libgdiplus0.yaml similarity index 100% rename from tools/updateinfo/example/libgdiplus0.yaml rename to tools/updateinfo/examples/libgdiplus0.yaml diff --git a/tools/updateinfo/example/libsocialweb.yaml b/tools/updateinfo/examples/libsocialweb.yaml similarity index 100% rename from tools/updateinfo/example/libsocialweb.yaml rename to tools/updateinfo/examples/libsocialweb.yaml diff --git a/tools/updateinfo/example/libva.yaml b/tools/updateinfo/examples/libva.yaml similarity index 100% rename from tools/updateinfo/example/libva.yaml rename to tools/updateinfo/examples/libva.yaml diff --git a/tools/updateinfo/example/libvpx.yaml b/tools/updateinfo/examples/libvpx.yaml similarity index 100% rename from tools/updateinfo/example/libvpx.yaml rename to tools/updateinfo/examples/libvpx.yaml diff --git a/tools/updateinfo/example/libwsbm-cdv.yaml b/tools/updateinfo/examples/libwsbm-cdv.yaml similarity index 100% rename from tools/updateinfo/example/libwsbm-cdv.yaml rename to tools/updateinfo/examples/libwsbm-cdv.yaml diff --git a/tools/updateinfo/example/libzypp.yaml b/tools/updateinfo/examples/libzypp.yaml similarity index 100% rename from tools/updateinfo/example/libzypp.yaml rename to tools/updateinfo/examples/libzypp.yaml diff --git a/tools/updateinfo/example/media-explorer.yaml b/tools/updateinfo/examples/media-explorer.yaml similarity index 100% rename from tools/updateinfo/example/media-explorer.yaml rename to tools/updateinfo/examples/media-explorer.yaml diff --git a/tools/updateinfo/example/meego-ivi-configs.yaml b/tools/updateinfo/examples/meego-ivi-configs.yaml similarity index 100% rename from tools/updateinfo/example/meego-ivi-configs.yaml rename to tools/updateinfo/examples/meego-ivi-configs.yaml diff --git a/tools/updateinfo/example/meego-menus.yaml b/tools/updateinfo/examples/meego-menus.yaml similarity index 100% rename from tools/updateinfo/example/meego-menus.yaml rename to tools/updateinfo/examples/meego-menus.yaml diff --git a/tools/updateinfo/example/meego-netbook-intro.yaml b/tools/updateinfo/examples/meego-netbook-intro.yaml similarity index 100% rename from tools/updateinfo/example/meego-netbook-intro.yaml rename to tools/updateinfo/examples/meego-netbook-intro.yaml diff --git a/tools/updateinfo/example/meego-netbook-settings.yaml b/tools/updateinfo/examples/meego-netbook-settings.yaml similarity index 100% rename from tools/updateinfo/example/meego-netbook-settings.yaml rename to tools/updateinfo/examples/meego-netbook-settings.yaml diff --git a/tools/updateinfo/example/meego-netbook-theme.yaml b/tools/updateinfo/examples/meego-netbook-theme.yaml similarity index 100% rename from tools/updateinfo/example/meego-netbook-theme.yaml rename to tools/updateinfo/examples/meego-netbook-theme.yaml diff --git a/tools/updateinfo/example/meego-netbook-user-skel.yaml b/tools/updateinfo/examples/meego-netbook-user-skel.yaml similarity index 100% rename from tools/updateinfo/example/meego-netbook-user-skel.yaml rename to tools/updateinfo/examples/meego-netbook-user-skel.yaml diff --git a/tools/updateinfo/example/meego-panel-applications.yaml b/tools/updateinfo/examples/meego-panel-applications.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-applications.yaml rename to tools/updateinfo/examples/meego-panel-applications.yaml diff --git a/tools/updateinfo/example/meego-panel-datetime.yaml b/tools/updateinfo/examples/meego-panel-datetime.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-datetime.yaml rename to tools/updateinfo/examples/meego-panel-datetime.yaml diff --git a/tools/updateinfo/example/meego-panel-devices.yaml b/tools/updateinfo/examples/meego-panel-devices.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-devices.yaml rename to tools/updateinfo/examples/meego-panel-devices.yaml diff --git a/tools/updateinfo/example/meego-panel-myzone.yaml b/tools/updateinfo/examples/meego-panel-myzone.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-myzone.yaml rename to tools/updateinfo/examples/meego-panel-myzone.yaml diff --git a/tools/updateinfo/example/meego-panel-networks.yaml b/tools/updateinfo/examples/meego-panel-networks.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-networks.yaml rename to tools/updateinfo/examples/meego-panel-networks.yaml diff --git a/tools/updateinfo/example/meego-panel-people.yaml b/tools/updateinfo/examples/meego-panel-people.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-people.yaml rename to tools/updateinfo/examples/meego-panel-people.yaml diff --git a/tools/updateinfo/example/meego-panel-status.yaml b/tools/updateinfo/examples/meego-panel-status.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-status.yaml rename to tools/updateinfo/examples/meego-panel-status.yaml diff --git a/tools/updateinfo/example/meego-panel-web.yaml b/tools/updateinfo/examples/meego-panel-web.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-web.yaml rename to tools/updateinfo/examples/meego-panel-web.yaml diff --git a/tools/updateinfo/example/meego-panel-zones.yaml b/tools/updateinfo/examples/meego-panel-zones.yaml similarity index 100% rename from tools/updateinfo/example/meego-panel-zones.yaml rename to tools/updateinfo/examples/meego-panel-zones.yaml diff --git a/tools/updateinfo/example/meego-ux-ivi.yaml b/tools/updateinfo/examples/meego-ux-ivi.yaml similarity index 100% rename from tools/updateinfo/example/meego-ux-ivi.yaml rename to tools/updateinfo/examples/meego-ux-ivi.yaml diff --git a/tools/updateinfo/example/meegotouch-inputmethodbridges.yaml b/tools/updateinfo/examples/meegotouch-inputmethodbridges.yaml similarity index 100% rename from tools/updateinfo/example/meegotouch-inputmethodbridges.yaml rename to tools/updateinfo/examples/meegotouch-inputmethodbridges.yaml diff --git a/tools/updateinfo/example/mobile-broadband-provider-info.yaml b/tools/updateinfo/examples/mobile-broadband-provider-info.yaml similarity index 100% rename from tools/updateinfo/example/mobile-broadband-provider-info.yaml rename to tools/updateinfo/examples/mobile-broadband-provider-info.yaml diff --git a/tools/updateinfo/example/mutter-netbook.yaml b/tools/updateinfo/examples/mutter-netbook.yaml similarity index 100% rename from tools/updateinfo/example/mutter-netbook.yaml rename to tools/updateinfo/examples/mutter-netbook.yaml diff --git a/tools/updateinfo/example/mutter.yaml b/tools/updateinfo/examples/mutter.yaml similarity index 100% rename from tools/updateinfo/example/mutter.yaml rename to tools/updateinfo/examples/mutter.yaml diff --git a/tools/updateinfo/example/mx.yaml b/tools/updateinfo/examples/mx.yaml similarity index 100% rename from tools/updateinfo/example/mx.yaml rename to tools/updateinfo/examples/mx.yaml diff --git a/tools/updateinfo/example/nautilus.yaml b/tools/updateinfo/examples/nautilus.yaml similarity index 100% rename from tools/updateinfo/example/nautilus.yaml rename to tools/updateinfo/examples/nautilus.yaml diff --git a/tools/updateinfo/example/netbook-backgrounds.yaml b/tools/updateinfo/examples/netbook-backgrounds.yaml similarity index 100% rename from tools/updateinfo/example/netbook-backgrounds.yaml rename to tools/updateinfo/examples/netbook-backgrounds.yaml diff --git a/tools/updateinfo/example/netbook-icon-theme.yaml b/tools/updateinfo/examples/netbook-icon-theme.yaml similarity index 100% rename from tools/updateinfo/example/netbook-icon-theme.yaml rename to tools/updateinfo/examples/netbook-icon-theme.yaml diff --git a/tools/updateinfo/example/neverball.yaml b/tools/updateinfo/examples/neverball.yaml similarity index 100% rename from tools/updateinfo/example/neverball.yaml rename to tools/updateinfo/examples/neverball.yaml diff --git a/tools/updateinfo/example/ofono.yaml b/tools/updateinfo/examples/ofono.yaml similarity index 100% rename from tools/updateinfo/example/ofono.yaml rename to tools/updateinfo/examples/ofono.yaml diff --git a/tools/updateinfo/example/open-sans-fonts.yaml b/tools/updateinfo/examples/open-sans-fonts.yaml similarity index 100% rename from tools/updateinfo/example/open-sans-fonts.yaml rename to tools/updateinfo/examples/open-sans-fonts.yaml diff --git a/tools/updateinfo/example/openconnect.yaml b/tools/updateinfo/examples/openconnect.yaml similarity index 100% rename from tools/updateinfo/example/openconnect.yaml rename to tools/updateinfo/examples/openconnect.yaml diff --git a/tools/updateinfo/example/package-groups.yaml b/tools/updateinfo/examples/package-groups.yaml similarity index 100% rename from tools/updateinfo/example/package-groups.yaml rename to tools/updateinfo/examples/package-groups.yaml diff --git a/tools/updateinfo/example/packagekit.yaml b/tools/updateinfo/examples/packagekit.yaml similarity index 100% rename from tools/updateinfo/example/packagekit.yaml rename to tools/updateinfo/examples/packagekit.yaml diff --git a/tools/updateinfo/example/pacrunner.yaml b/tools/updateinfo/examples/pacrunner.yaml similarity index 100% rename from tools/updateinfo/example/pacrunner.yaml rename to tools/updateinfo/examples/pacrunner.yaml diff --git a/tools/updateinfo/example/perl.yaml b/tools/updateinfo/examples/perl.yaml similarity index 100% rename from tools/updateinfo/example/perl.yaml rename to tools/updateinfo/examples/perl.yaml diff --git a/tools/updateinfo/example/pidgin.yaml b/tools/updateinfo/examples/pidgin.yaml similarity index 100% rename from tools/updateinfo/example/pidgin.yaml rename to tools/updateinfo/examples/pidgin.yaml diff --git a/tools/updateinfo/example/pixman.yaml b/tools/updateinfo/examples/pixman.yaml similarity index 100% rename from tools/updateinfo/example/pixman.yaml rename to tools/updateinfo/examples/pixman.yaml diff --git a/tools/updateinfo/example/pulseaudio.yaml b/tools/updateinfo/examples/pulseaudio.yaml similarity index 100% rename from tools/updateinfo/example/pulseaudio.yaml rename to tools/updateinfo/examples/pulseaudio.yaml diff --git a/tools/updateinfo/example/raleway-fonts.yaml b/tools/updateinfo/examples/raleway-fonts.yaml similarity index 100% rename from tools/updateinfo/example/raleway-fonts.yaml rename to tools/updateinfo/examples/raleway-fonts.yaml diff --git a/tools/updateinfo/example/sensorfw.yaml b/tools/updateinfo/examples/sensorfw.yaml similarity index 100% rename from tools/updateinfo/example/sensorfw.yaml rename to tools/updateinfo/examples/sensorfw.yaml diff --git a/tools/updateinfo/example/shared-mime-info.yaml b/tools/updateinfo/examples/shared-mime-info.yaml similarity index 100% rename from tools/updateinfo/example/shared-mime-info.yaml rename to tools/updateinfo/examples/shared-mime-info.yaml diff --git a/tools/updateinfo/example/sorts-mill-goudy-fonts.yaml b/tools/updateinfo/examples/sorts-mill-goudy-fonts.yaml similarity index 100% rename from tools/updateinfo/example/sorts-mill-goudy-fonts.yaml rename to tools/updateinfo/examples/sorts-mill-goudy-fonts.yaml diff --git a/tools/updateinfo/example/syncevolution.yaml b/tools/updateinfo/examples/syncevolution.yaml similarity index 100% rename from tools/updateinfo/example/syncevolution.yaml rename to tools/updateinfo/examples/syncevolution.yaml diff --git a/tools/updateinfo/example/system-config-date.yaml b/tools/updateinfo/examples/system-config-date.yaml similarity index 100% rename from tools/updateinfo/example/system-config-date.yaml rename to tools/updateinfo/examples/system-config-date.yaml diff --git a/tools/updateinfo/example/system-config-language.yaml b/tools/updateinfo/examples/system-config-language.yaml similarity index 100% rename from tools/updateinfo/example/system-config-language.yaml rename to tools/updateinfo/examples/system-config-language.yaml diff --git a/tools/updateinfo/example/system-config-printer.yaml b/tools/updateinfo/examples/system-config-printer.yaml similarity index 100% rename from tools/updateinfo/example/system-config-printer.yaml rename to tools/updateinfo/examples/system-config-printer.yaml diff --git a/tools/updateinfo/example/tasks.yaml b/tools/updateinfo/examples/tasks.yaml similarity index 100% rename from tools/updateinfo/example/tasks.yaml rename to tools/updateinfo/examples/tasks.yaml diff --git a/tools/updateinfo/example/telepathy-gabble.yaml b/tools/updateinfo/examples/telepathy-gabble.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-gabble.yaml rename to tools/updateinfo/examples/telepathy-gabble.yaml diff --git a/tools/updateinfo/example/telepathy-glib.yaml b/tools/updateinfo/examples/telepathy-glib.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-glib.yaml rename to tools/updateinfo/examples/telepathy-glib.yaml diff --git a/tools/updateinfo/example/telepathy-haze.yaml b/tools/updateinfo/examples/telepathy-haze.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-haze.yaml rename to tools/updateinfo/examples/telepathy-haze.yaml diff --git a/tools/updateinfo/example/telepathy-idle.yaml b/tools/updateinfo/examples/telepathy-idle.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-idle.yaml rename to tools/updateinfo/examples/telepathy-idle.yaml diff --git a/tools/updateinfo/example/telepathy-logger.yaml b/tools/updateinfo/examples/telepathy-logger.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-logger.yaml rename to tools/updateinfo/examples/telepathy-logger.yaml diff --git a/tools/updateinfo/example/telepathy-misson-control.yaml b/tools/updateinfo/examples/telepathy-misson-control.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-misson-control.yaml rename to tools/updateinfo/examples/telepathy-misson-control.yaml diff --git a/tools/updateinfo/example/telepathy-salut.yaml b/tools/updateinfo/examples/telepathy-salut.yaml similarity index 100% rename from tools/updateinfo/example/telepathy-salut.yaml rename to tools/updateinfo/examples/telepathy-salut.yaml diff --git a/tools/updateinfo/example/udev.yaml b/tools/updateinfo/examples/udev.yaml similarity index 100% rename from tools/updateinfo/example/udev.yaml rename to tools/updateinfo/examples/udev.yaml diff --git a/tools/updateinfo/example/udisks.yaml b/tools/updateinfo/examples/udisks.yaml similarity index 100% rename from tools/updateinfo/example/udisks.yaml rename to tools/updateinfo/examples/udisks.yaml diff --git a/tools/updateinfo/example/updateinfo.xml b/tools/updateinfo/examples/updateinfo.xml similarity index 100% rename from tools/updateinfo/example/updateinfo.xml rename to tools/updateinfo/examples/updateinfo.xml diff --git a/tools/updateinfo/example/usb-modeswitch-data.yaml b/tools/updateinfo/examples/usb-modeswitch-data.yaml similarity index 100% rename from tools/updateinfo/example/usb-modeswitch-data.yaml rename to tools/updateinfo/examples/usb-modeswitch-data.yaml diff --git a/tools/updateinfo/example/usb-modeswitch.yaml b/tools/updateinfo/examples/usb-modeswitch.yaml similarity index 100% rename from tools/updateinfo/example/usb-modeswitch.yaml rename to tools/updateinfo/examples/usb-modeswitch.yaml diff --git a/tools/updateinfo/example/vino.yaml b/tools/updateinfo/examples/vino.yaml similarity index 100% rename from tools/updateinfo/example/vino.yaml rename to tools/updateinfo/examples/vino.yaml diff --git a/tools/updateinfo/example/xfce.yaml b/tools/updateinfo/examples/xfce.yaml similarity index 100% rename from tools/updateinfo/example/xfce.yaml rename to tools/updateinfo/examples/xfce.yaml diff --git a/tools/updateinfo/example/xorg-x11-drv-intel.yaml b/tools/updateinfo/examples/xorg-x11-drv-intel.yaml similarity index 100% rename from tools/updateinfo/example/xorg-x11-drv-intel.yaml rename to tools/updateinfo/examples/xorg-x11-drv-intel.yaml diff --git a/tools/updateinfo/example/zypper.yaml b/tools/updateinfo/examples/zypper.yaml similarity index 100% rename from tools/updateinfo/example/zypper.yaml rename to tools/updateinfo/examples/zypper.yaml diff --git a/tools/updateinfo/updateinfo.py b/tools/updateinfo/updateinfo.py old mode 100644 new mode 100755 index ccaf019..e604f43 --- a/tools/updateinfo/updateinfo.py +++ b/tools/updateinfo/updateinfo.py @@ -74,7 +74,7 @@ class UpdateInfo: 'type' : update['Type'], 'status' : update['Status'], 'version' : "%04d" %self.next, - 'from' : 'updates@meego.com' + 'from' : 'updates@tizen.org' }) self._insert(root, 'id', text=update['ID']) @@ -97,7 +97,7 @@ class UpdateInfo: for bug in update['Bugs']: self._insert(refs, 'reference', attrs={ 'type' : 'bugzilla', - 'href' : 'http://bugs.meego.com/show_bug.cgi?id=%s' %bug, + 'href' : 'http://bugs.tizen.org/show_bug.cgi?id=%s' %bug, 'id' : bug, 'title': 'Bug number %s' %bug }) @@ -113,8 +113,8 @@ class UpdateInfo: #self._insert(collection, 'name', text=update.release.long_name) for u in updates: - filename = u['binary'].name - if u['header'][rpm.RPMTAG_SOURCEPACKAGE] or 'debuginfo' in u['binary'].name: + filename = u['binary'] + if u['header'][rpm.RPMTAG_SOURCEPACKAGE] or 'debuginfo' in u['binary']: continue pkg = self._insert(collection, 'package', attrs={ 'name' : u['header'][rpm.RPMTAG_NAME], @@ -137,6 +137,9 @@ class UpdateInfo: root.appendChild(pkglist) + + + parser = OptionParser() parser.add_option('-a', '--arch', metavar='TEXT', help='Architecture') @@ -169,145 +172,37 @@ if not opts.arch: print "missing options -a|--arch" sys.exit(1) -patches = [opts.patch] if opts.patch else glob.glob(opts.patchdir+'/*.yaml') - -if opts.arch == 'i586': - archdir = 'ia32' -else: - archdir = opts.arch # TODO confirm -packdir = "%s/%s/packages" %(opts.destdir, archdir) -sourcedir = "%s/source" %(opts.destdir) -debugdir = "%s/%s/debug" %(opts.destdir, archdir) -original = "%s" %(opts.origdir) -for d in [packdir, sourcedir, debugdir, original]: - if not os.path.isdir(d): - print "Creating %s" % d - os.makedirs(d, 0755) ui = UpdateInfo(cache = opts.updateinfo) +patches = [opts.patch] if opts.patch else glob.glob(opts.patchdir+'/*.yaml') +updates = [] for patch_path in patches: print 'Processing patch file:', patch_path try: - self.stream = file(patch_path, 'r') + stream = file(patch_path, 'r') except IOError: print 'Cannot read file: %s' % patch_path try: - patch = yaml.load(self.stream) + patch = yaml.load(stream) except yaml.scanner.ScannerError, e: print 'syntax error found in yaml: %s' % str(e) - orig_project = None - orig_target = None - if patch.has_key("Project"): - if "/" in patch['Project']: - (orig_project, orig_target) = patch['Project'].split("/") - else: - orig_project = patch['Project'] - orig_target = "standard" - else: - print "No Project specified" - continue - - if opts.testing: - project = "%s:Update:Testing" %orig_project - else: - project = "%s:Update" %orig_project - - if not patch.has_key('Repository'): - print "You need to define the project repository in the patch file." - continue - - repository = patch['Repository'] - - # Get package list - - updates = [] - for pkg in patch['Packages']: - binaries = get_binarylist(apiurl, - project, - repository, - opts.arch, - package = pkg, - verbose=True) - - if not binaries: - print 'For package %s no binaries in proj(%s) found.' % (pkg, project) - continue - - for binary in binaries: - u = {} - u['binary'] = binary - target_filename = "" - if binary.name.endswith('.src.rpm'): - target_filename = '%s/source/%s' % (opts.destdir, binary.name) - elif binary.name.startswith('%s-debuginfo' %pkg): - target_filename = '%s/%s/debug/%s' % (opts.destdir, archdir, binary.name) - else: - target_filename = '%s/%s/packages/%s' % (opts.destdir, archdir, binary.name) - - cached = False - if os.path.exists(target_filename): - st = os.stat(target_filename) - if st.st_mtime == binary.mtime and st.st_size == binary.size: - cached = True - - if not cached: - get_binary_file(apiurl, - project, - repository, opts.arch, - binary.name, - package = pkg, - target_filename = target_filename, - target_mtime = binary.mtime, - progress_meter = not opts.quiet) - - ts = rpm.TransactionSet("/", rpm._RPMVSF_NOSIGNATURES) - fd = os.open(target_filename, os.O_RDONLY) - header = ts.hdrFromFdno(fd) - os.close(fd) - u['header'] = header - updates.append(u) - - - # Get original packages - for pkg in patch['Packages']: - binaries = get_binarylist(apiurl, - orig_project, - orig_target, - opts.arch, - package = pkg, - verbose=True) - - if not binaries: - print 'For package %s no binaries in proj(%s) found.' % (pkg, orig_project) - continue - - for binary in binaries: - target_filename = "" - if not binary.name.endswith('.src.rpm') and not binary.name.startswith('%s-debuginfo' %pkg): - target_filename = '%s/%s' % (opts.origdir, binary.name) - else: - continue - - if os.path.exists(target_filename): - st = os.stat(target_filename) - if st.st_mtime == binary.mtime and st.st_size == binary.size: - continue - - get_binary_file(apiurl, - orig_project, - orig_target, - opts.arch, - binary.name, - package = pkg, - target_filename = target_filename, - target_mtime = binary.mtime, - progress_meter = not opts.quiet) - - ui.add_patch(patch, updates) + packages = glob.glob('rpms/*.rpm') + glob.glob('new/*.rpm') + for package in packages: + u = {} + u['binary'] = package + ts = rpm.TransactionSet("/", rpm._RPMVSF_NOSIGNATURES) + fd = os.open(package, os.O_RDONLY) + header = ts.hdrFromFdno(fd) + #print header + os.close(fd) + u['header'] = header + updates.append(u) + + ui.add_patch(patch, updates) # save to file updateinfo_xml = ui.doc.toxml() -- 2.7.4