diff options
author | Joe Sapp <nixphoeni@gentoo.org> | 2005-07-11 04:18:49 +0000 |
---|---|---|
committer | Joe Sapp <nixphoeni@gentoo.org> | 2005-07-11 04:18:49 +0000 |
commit | 4488af2cfd94dc9ef10233390024ab60b56c023c (patch) | |
tree | e094332d71d5426b6512f5a63bae7490c8ca6084 /gnome-extra/gdesklets-core | |
parent | Fixed echo lines and added more einfo (diff) | |
download | historical-4488af2cfd94dc9ef10233390024ab60b56c023c.tar.gz historical-4488af2cfd94dc9ef10233390024ab60b56c023c.tar.bz2 historical-4488af2cfd94dc9ef10233390024ab60b56c023c.zip |
Added the migration tool to the older versions
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'gnome-extra/gdesklets-core')
9 files changed, 479 insertions, 3 deletions
diff --git a/gnome-extra/gdesklets-core/ChangeLog b/gnome-extra/gdesklets-core/ChangeLog index 65a700de0cd1..fb8c64fa2354 100644 --- a/gnome-extra/gdesklets-core/ChangeLog +++ b/gnome-extra/gdesklets-core/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for gnome-extra/gdesklets-core # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/ChangeLog,v 1.40 2005/07/11 03:14:43 nixphoeni Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/ChangeLog,v 1.41 2005/07/11 04:18:49 nixphoeni Exp $ + +*gdesklets-core-0.35.1-r1 (11 Jul 2005) +*gdesklets-core-0.35-r1 (11 Jul 2005) +*gdesklets-core-0.35_rc1-r1 (11 Jul 2005) + + 11 Jul 2005; Joe Sapp <nixphoeni@gentoo.org> + +files/gdesklets-migration-tool, +gdesklets-core-0.35_rc1-r1.ebuild, + +gdesklets-core-0.35-r1.ebuild, +gdesklets-core-0.35.1-r1.ebuild: + Added the migration tool to the older versions *gdesklets-core-0.35.2 (11 Jul 2005) diff --git a/gnome-extra/gdesklets-core/Manifest b/gnome-extra/gdesklets-core/Manifest index 100278408779..c7e167a00b7f 100644 --- a/gnome-extra/gdesklets-core/Manifest +++ b/gnome-extra/gdesklets-core/Manifest @@ -1,14 +1,17 @@ +MD5 66248fdce375bd90c09ad12b210d353f gdesklets-core-0.35-r1.ebuild 2282 MD5 a0740066aed09e15019eb17ce383e541 gdesklets-core-0.35_rc1.ebuild 2060 MD5 01e680c112f572c7eecd8ffa2dfa481a gdesklets-core-0.34.3.ebuild 2160 MD5 f8a0b9310dac5018eb5ba6cb1d3c628c gdesklets-core-0.35.1.ebuild 2077 MD5 120d0db4044c02b9a260350c1045ed35 gdesklets-core-0.26.2.ebuild 1872 +MD5 e339012b85e0b107e59eb1f9b97ff310 gdesklets-core-0.35.1-r1.ebuild 2284 MD5 b60b8c0d1d2d5e1dcc1d0497f78a0cbc gdesklets-core-0.35.ebuild 2075 -MD5 4528cad961cd0cd8b42bbad57e188237 ChangeLog 6939 +MD5 18be67ceebfce82711da5b3255204a8c ChangeLog 7296 MD5 a98089d6b170082dad015493bddd2e7e gdesklets-core-0.33.1.ebuild 2434 MD5 7acaefbf35696571fb6c2981644e3b51 gdesklets-core-0.26.1.ebuild 1871 MD5 a175a96fb7e85b152ade748dbd2360e0 metadata.xml 213 +MD5 eca6c0fae552cb6b88412c77b87f3d14 gdesklets-core-0.35_rc1-r1.ebuild 2153 MD5 7de752dcb5d871ca8a6bd77e674ceccf gdesklets-core-0.32.ebuild 2050 -MD5 1cbe3351a3301d142331910d1a470941 gdesklets-core-0.35.2.ebuild 2167 +MD5 8058c98aa84ad0f699b8847f21f031c4 gdesklets-core-0.35.2.ebuild 2202 MD5 c4920c1829bd34f15ee1b85539dd3d4a files/digest-gdesklets-core-0.26.1 69 MD5 26c6bbd356a7de3f57ffe9036275a5e5 files/digest-gdesklets-core-0.26.2 69 MD5 312fdc938b56dedf0fab04efe6266cb1 files/digest-gdesklets-core-0.33.1 131 @@ -16,8 +19,12 @@ MD5 8293012469f5859ebfb450e81f87a165 files/digest-gdesklets-core-0.34.3 131 MD5 ca60272587dbc0bfcdaa066753437811 files/digest-gdesklets-core-0.35.1 131 MD5 0c19ba79ae4c346473d45ef564563e20 files/digest-gdesklets-core-0.35.2 131 MD5 ac3a171744ef9b36bed102088be244a9 files/digest-gdesklets-core-0.35_rc1 132 +MD5 66ab1d1c9445bb382edafdb15eee161d files/digest-gdesklets-core-0.35-r1 129 +MD5 ac3a171744ef9b36bed102088be244a9 files/digest-gdesklets-core-0.35_rc1-r1 132 MD5 ac425079423c7c93f931c3f4df0dc598 files/digest-gdesklets-core-0.32 67 MD5 66ab1d1c9445bb382edafdb15eee161d files/digest-gdesklets-core-0.35 129 +MD5 ca60272587dbc0bfcdaa066753437811 files/digest-gdesklets-core-0.35.1-r1 131 MD5 b9861538d27ddcccf566148374dcd22a files/gdesklets-control-getid 745 MD5 8e873c3bd94ee7756f3caf1c0f5b9398 files/dst-fix-0.34.3.patch 1269 +MD5 3407f6fa18c84e9c85b7f9321a158ad3 files/gdesklets-migration-tool 7343 MD5 01751d3aa9192793a33c02d2126192c1 files/gdesklets-displays.desktop 230 diff --git a/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35-r1 b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35-r1 new file mode 100644 index 000000000000..3cfc57404dad --- /dev/null +++ b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35-r1 @@ -0,0 +1,2 @@ +MD5 1ba952f54d74c3b31732d0188b48512f gDesklets-0.35.tar.bz2 741056 +MD5 bba42e71aa3a0d310ad6ee763fcbac25 develbook.tar.bz2 445919 diff --git a/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35.1-r1 b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35.1-r1 new file mode 100644 index 000000000000..9088a4229464 --- /dev/null +++ b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35.1-r1 @@ -0,0 +1,2 @@ +MD5 2017ece8b60cf2065cd2cc5ea10a6219 gDesklets-0.35.1.tar.bz2 733865 +MD5 bba42e71aa3a0d310ad6ee763fcbac25 develbook.tar.bz2 445919 diff --git a/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35_rc1-r1 b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35_rc1-r1 new file mode 100644 index 000000000000..2f0d8fdb8ad7 --- /dev/null +++ b/gnome-extra/gdesklets-core/files/digest-gdesklets-core-0.35_rc1-r1 @@ -0,0 +1,2 @@ +MD5 422191b497018555432c5643f19e474a gDesklets-0.35rc1.tar.bz2 727148 +MD5 bba42e71aa3a0d310ad6ee763fcbac25 develbook.tar.bz2 445919 diff --git a/gnome-extra/gdesklets-core/files/gdesklets-migration-tool b/gnome-extra/gdesklets-core/files/gdesklets-migration-tool new file mode 100755 index 000000000000..7addea54de36 --- /dev/null +++ b/gnome-extra/gdesklets-core/files/gdesklets-migration-tool @@ -0,0 +1,206 @@ +#!/usr/bin/env python +# +# TODO: +# -Add selectors for previous and current gDesklets versions +# -Add command-line options for selecting the above +# -Add command-line options for verbose configuration migrations +# +# +import gtk, gconf +import os, re, sys +import fileinput +import __builtin__ + +if "/usr/lib/gdesklets" not in sys.path: + sys.path.append("/usr/lib/gdesklets") + +from utils import i18n +from utils.HIGDialog import HIGDialog + +from config.StateSaver import DefaultStateSaver, StateSaver + +__builtin__._ = i18n.Translator("gdesklets") + +class MigrationTool: + + # Display the main window + def __init__(self): + + m = "This tool will safely migrate your settings from old versions of " + m += "gDesklets (0.3x.x series), so that they will work with versions " + m += "0.35rc1 onwards.\n\n" + + # This message doesn't really apply, but I'm keeping it here + # in case I forget how to do bold text or if we decide to keep + # the old migration tool. + #m += "If you are migrating from an earlier version, please run\n" + #m += "<span weight=\"bold\">gdesklets-migration-tool</span> first." + + dialog = HIGDialog((gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OK, + gtk.RESPONSE_OK), gtk.STOCK_DIALOG_INFO, + "gDesklets Config Migration Tool", m) + + self.__config_path = "/apps/gdesklets" + self.__gdesklets_path = os.path.join(os.getenv("HOME"), ".gdesklets") + # Get the StateSaver structure for shell config (if any) + self.__new_shell_cfg = DefaultStateSaver() + self.__old_shell_cfg = self.__config_path + "/shell" + + dialog.connect("response", self.__response) + + # Check if ~/.gdesklets exists + if (not os.path.exists(self.__gdesklets_path)): + print ("You don't have a working version of gDesklets! (~/.gdesklets not found)\nExiting!") + sys.exit(1) + + try: + self.__displays_file = self.__gdesklets_path + "/displays" + except: + print "Can't find ~/.gdesklets/displays" + sys.exit(1) + + # Get IDs from each display in the ~/.gdesklets/displays file + self.__displays = [] + + # Probably a better way to do it than with fileinput + for i in fileinput.input(self.__displays_file): + if i.startswith("id"): + l = i.split(" ") + self.__displays.append(l[0] + "CONFIG") + + dialog.show() + + + def __response(self, dialog, response): + + if (response == gtk.RESPONSE_OK): + dialog.hide() + self.__show_warning(dialog) + elif (response == gtk.RESPONSE_YES): + dialog.hide() + self.__migrate(dialog) + else: gtk.main_quit() + + + def __show_warning(self, dialog): + + m = "This will overwrite any existing settings from 0.35rc1 on up!\n" + m += "Do you wish to continue?" + + dialog = HIGDialog((gtk.STOCK_NO, gtk.RESPONSE_NO, + gtk.STOCK_YES, gtk.RESPONSE_YES), + gtk.STOCK_DIALOG_QUESTION, "Warning!", m) + dialog.connect("response", self.__response) + dialog.show() + + + def __show_finished(self, dialog): + + dialog = HIGDialog((gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE), + gtk.STOCK_DIALOG_INFO, "Migration successful!", + "Settings have been migrated succesfully") + dialog.connect("response", self.__response) + dialog.show() + + # This is just a dummy function to see what's in + # the states file. It's not called except when testing :) + def __list(self, dialog): + + m = "" + + for d in self.__displays: + + s = StateSaver(d) + for l in s.list(): + m += str(s.get_key(l)) + m += "\n" + m += "\n\n" + + dialog = HIGDialog((gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE), + gtk.STOCK_DIALOG_INFO, "List", m) + + dialog.connect("response", self.__response) + dialog.show() + + def __migrate(self, dialog): + + # we assume they have a config to start with + noconfig = False; + + # set up gconf client + self.__client = gconf.client_get_default() + self.__client.add_dir(self.__config_path, gconf.CLIENT_PRELOAD_RECURSIVE) + + # open the new output files + #d_cfile = open(self.__displays_file, "w") + + for d in self.__displays: + + cur_id = d[0:len(d) - len("CONFIG")] # This display's id + s = StateSaver(d) # StateSaver for this display + + for entry in self.__client.all_entries(self.__config_path + "/" + cur_id): + + key = entry.get_key() + + # Each key had a corresponding key_TYPE variable + # that indicated the type of configuration stored. + # It seems tests like the following are necessary to + # get the right type from gconf. + if key.endswith("_TYPE"): + + typ = self.__client.get_string(key) # Type of variable stored + key_result = key[0:key.rfind("_TYPE")] # Actual key + + # Get the value from key_result + if typ == "bool": + value = self.__client.get_bool(key_result) + elif typ == "string": + value = self.__client.get_string(key_result) + elif typ == "int": + value = self.__client.get_int(key_result) + elif typ == "float": + value = self.__client.get_string(key_result) + + key_result = key_result[key_result.rfind("/")+1:] + #print key_result + " : " + str( (value,typ) ) + + s.set_key(key_result, (value,typ)) + + #print str(s.list()) + + # Done with the displays, now migrate the shell configuration + for entry in self.__client.all_entries(self.__old_shell_cfg): + + key = entry.get_key() + + # Find out which key it is + # Are all of these valid from < 0.35_rc1? + if key == "current_tip": + value = self.__client.get_int(key) + elif key == "show_tip_of_the_day": + value = self.__client.get_bool(key) + elif key == "editor": + value = self.__client.get_string(key) + elif key == "dpi": + value = self.__client.get_int(key) + elif key == "translucency": + value = self.__client.get_string(key) + elif key == "authorized_commands": + value = self.__client.get_string(key) + + # Transform the key to just it's value, not the + # entire gconf path + key = key[key.rfind("/")+1:] + + self.__new_shell_cfg.set_key(key, value) + + # we are done... + self.__show_finished(dialog) + + + +if __name__ == "__main__": + + MigrationTool() + gtk.main() diff --git a/gnome-extra/gdesklets-core/gdesklets-core-0.35-r1.ebuild b/gnome-extra/gdesklets-core/gdesklets-core-0.35-r1.ebuild new file mode 100644 index 000000000000..53884147abbd --- /dev/null +++ b/gnome-extra/gdesklets-core/gdesklets-core-0.35-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/gdesklets-core-0.35-r1.ebuild,v 1.1 2005/07/11 04:18:49 nixphoeni Exp $ + +inherit gnome2 eutils multilib + +MY_PN="gDesklets" +MY_P="${MY_PN}-${PV/_/}" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="GNOME Desktop Applets: core library for the desktop applets" +SRC_URI="http://www.gdesklets.org/releases/${MY_P}.tar.bz2 \ + http://www.pycage.de/develbook/develbook.tar.bz2" +HOMEPAGE="http://gdesklets.gnomedesktop.org" +LICENSE="GPL-2" + +SLOT="0" +IUSE="doc" +KEYWORDS="~x86 ~ppc ~amd64 ~sparc" + +RDEPEND=">=dev-lang/python-2.3 + >=dev-libs/glib-2 + >=gnome-base/librsvg-2 + >=gnome-base/libgtop-2.8.2 + >=dev-python/pygtk-2.4 + >=dev-python/gnome-python-2.6 + >=dev-libs/expat-1.95.8 + >=dev-python/pyxml-0.8.3-r1" + +DEPEND="${RDEPEND} + sys-devel/gettext + dev-util/pkgconfig + dev-util/intltool" + +USE_DESTDIR="1" +DOCS="AUTHORS ChangeLog NEWS README TODO" + +src_install() { + + gnome2_src_install + + # Install the gdesklets-control-getid script + insinto /usr/$(get_libdir)/gdesklets + insopts -m0555 + doins ${FILESDIR}/gdesklets-control-getid + + # Create a global directory for Displays + dodir /usr/$(get_libdir)/gdesklets/Displays + + # Install the Developer's book documentation + use doc && dohtml -r ${WORKDIR}/develbook/* + + # Install the new migration tool + doins ${FILESDIR}/gdesklets-migration-tool + +} + +pkg_postinst() { + + gnome2_pkg_postinst + + echo + einfo "gDesklets Displays are required before the library" + einfo "will be usable. The displays are found in -" + einfo " x11-plugins/desklet-*" + einfo "or at http://gdesklets.gnomedesktop.org" + echo + einfo "Next you'll need to start gdesklets using" + einfo " /usr/bin/gdesklets start" + einfo "If you're using GNOME this can be done conveniently" + einfo "through Applications->Accessories->gDesklets" + echo + einfo "If you're updating from a version less than 0.35_rc1," + einfo "you can migrate your desklet configurations by" + einfo "running" + einfo " /usr/lib/gdesklets/gdesklets-migration-tool" + einfo "after the first time you run gdesklets" + echo + + # This stuff is important, especially the migration-tool + # information which flies by on an update. + epause 9 + +} diff --git a/gnome-extra/gdesklets-core/gdesklets-core-0.35.1-r1.ebuild b/gnome-extra/gdesklets-core/gdesklets-core-0.35.1-r1.ebuild new file mode 100644 index 000000000000..1b630a3468fe --- /dev/null +++ b/gnome-extra/gdesklets-core/gdesklets-core-0.35.1-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/gdesklets-core-0.35.1-r1.ebuild,v 1.1 2005/07/11 04:18:49 nixphoeni Exp $ + +inherit gnome2 eutils multilib + +MY_PN="gDesklets" +MY_P="${MY_PN}-${PV/_/}" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="GNOME Desktop Applets: core library for the desktop applets" +SRC_URI="http://www.gdesklets.org/releases/${MY_P}.tar.bz2 \ + http://www.pycage.de/develbook/develbook.tar.bz2" +HOMEPAGE="http://gdesklets.gnomedesktop.org" +LICENSE="GPL-2" + +SLOT="0" +IUSE="doc" +KEYWORDS="~x86 ~ppc ~amd64 ~sparc" + +RDEPEND=">=dev-lang/python-2.3 + >=dev-libs/glib-2 + >=gnome-base/librsvg-2 + >=gnome-base/libgtop-2.8.2 + >=dev-python/pygtk-2.4 + >=dev-python/gnome-python-2.6 + >=dev-libs/expat-1.95.8 + >=dev-python/pyxml-0.8.3-r1" + +DEPEND="${RDEPEND} + sys-devel/gettext + dev-util/pkgconfig + dev-util/intltool" + +USE_DESTDIR="1" +DOCS="AUTHORS ChangeLog NEWS README TODO" + +src_install() { + + gnome2_src_install + + # Install the gdesklets-control-getid script + insinto /usr/$(get_libdir)/gdesklets + insopts -m0555 + doins ${FILESDIR}/gdesklets-control-getid + + # Create a global directory for Displays + dodir /usr/$(get_libdir)/gdesklets/Displays + + # Install the Developer's book documentation + use doc && dohtml -r ${WORKDIR}/develbook/* + + # Install the new migration tool + doins ${FILESDIR}/gdesklets-migration-tool + +} + +pkg_postinst() { + + gnome2_pkg_postinst + + echo + einfo "gDesklets Displays are required before the library" + einfo "will be usable. The displays are found in -" + einfo " x11-plugins/desklet-*" + einfo "or at http://gdesklets.gnomedesktop.org" + echo + einfo "Next you'll need to start gdesklets using" + einfo " /usr/bin/gdesklets start" + einfo "If you're using GNOME this can be done conveniently" + einfo "through Applications->Accessories->gDesklets" + echo + einfo "If you're updating from a version less than 0.35_rc1," + einfo "you can migrate your desklet configurations by" + einfo "running" + einfo " /usr/lib/gdesklets/gdesklets-migration-tool" + einfo "after the first time you run gdesklets" + echo + + # This stuff is important, especially the migration-tool + # information which flies by on an update. + epause 9 + +} diff --git a/gnome-extra/gdesklets-core/gdesklets-core-0.35_rc1-r1.ebuild b/gnome-extra/gdesklets-core/gdesklets-core-0.35_rc1-r1.ebuild new file mode 100644 index 000000000000..38affa8c18f6 --- /dev/null +++ b/gnome-extra/gdesklets-core/gdesklets-core-0.35_rc1-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/gdesklets-core-0.35_rc1-r1.ebuild,v 1.1 2005/07/11 04:18:49 nixphoeni Exp $ + +inherit gnome2 eutils multilib + +MY_PN="gDesklets" +MY_P="${MY_PN}-${PV/_/}" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="GNOME Desktop Applets: core library for the desktop applets" +SRC_URI="http://www.gdesklets.org/releases/${MY_P}.tar.bz2 \ + http://www.pycage.de/develbook/develbook.tar.bz2" +HOMEPAGE="http://gdesklets.gnomedesktop.org" +LICENSE="GPL-2" + +SLOT="0" +IUSE="doc" +KEYWORDS="~x86 ~ppc ~amd64 ~sparc" + +RDEPEND=">=dev-lang/python-2.3 + >=dev-libs/glib-2 + >=gnome-base/librsvg-2 + >=gnome-base/libgtop-2.8.2 + >=dev-python/pygtk-2.4 + >=dev-python/gnome-python-2.6 + >=dev-libs/expat-1.95.8 + >=dev-python/pyxml-0.8.3-r1" + +DEPEND="${RDEPEND} + sys-devel/gettext + dev-util/pkgconfig + dev-util/intltool" + +USE_DESTDIR="1" +DOCS="AUTHORS ChangeLog NEWS README TODO" + +src_install() { + + gnome2_src_install + + # Install the gdesklets-control-getid script + insinto /usr/$(get_libdir)/gdesklets + insopts -m0555 + doins ${FILESDIR}/gdesklets-control-getid + + # Create a global directory for Displays + dodir /usr/$(get_libdir)/gdesklets/Displays + + # Install the Developer's book documentation + use doc && dohtml -r ${WORKDIR}/develbook/* + +} + +pkg_postinst() { + + gnome2_pkg_postinst + + echo + einfo "gDesklets Displays are required before the library" + einfo "will be usable. The displays are found in -" + einfo " x11-plugins/desklet-*" + einfo "or at http://gdesklets.gnomedesktop.org" + echo + einfo "Next you'll need to start gdesklets using" + einfo " /usr/bin/gdesklets start" + einfo "If you're using GNOME this can be done conveniently" + einfo "through Applications->Accessories->gDesklets" + echo + einfo "You can migrate your previous desklet configurations" + einfo "by running" + einfo " /usr/lib/gdesklets/gdesklets-migration-tool" + einfo "after the first time you run gdesklets" + echo + + # This stuff is important, especially the migration-tool + # information which flies by on an update. + epause 9 + +} |