zeroinstall/solver.git
11 years agoMerged changes from mastermaster
Bastian Eicher [Wed, 29 Aug 2012 19:29:45 +0000 (29 21:29 +0200)]
Merged changes from master

11 years agoMore diagnostics to track down intermittent test failure
Thomas Leonard [Wed, 29 Aug 2012 18:35:37 +0000 (29 19:35 +0100)]
More diagnostics to track down intermittent test failure

11 years agoFixed use of raw_input with Python 3
Thomas Leonard [Wed, 29 Aug 2012 18:06:43 +0000 (29 19:06 +0100)]
Fixed use of raw_input with Python 3

11 years agoFixed batching of PackageKit requests
Thomas Leonard [Wed, 29 Aug 2012 08:38:14 +0000 (29 09:38 +0100)]
Fixed batching of PackageKit requests

This meant we would sometimes fail to wait for the PackageKit results. Was
broken by d856e5e56.

11 years agoFixed deprecation warning in GUI
Thomas Leonard [Tue, 28 Aug 2012 19:10:29 +0000 (28 20:10 +0100)]
Fixed deprecation warning in GUI

11 years agoAdded test for downloading icons
Thomas Leonard [Mon, 27 Aug 2012 14:21:17 +0000 (27 15:21 +0100)]
Added test for downloading icons

Also, download_icon now returns errors directly, rather than logging them with
the handler.

11 years agoAdded deprecation warnings to remaining uses of get_deprecated_singleton_config
Thomas Leonard [Mon, 27 Aug 2012 13:45:37 +0000 (27 14:45 +0100)]
Added deprecation warnings to remaining uses of get_deprecated_singleton_config

11 years agoFixed use of '-' in the man-page
Thomas Leonard [Mon, 27 Aug 2012 10:51:05 +0000 (27 11:51 +0100)]
Fixed use of '-' in the man-page

11 years agoOnly install runenv.cli.template on NT systems
Thomas Leonard [Mon, 27 Aug 2012 10:27:37 +0000 (27 11:27 +0100)]
Only install runenv.cli.template on NT systems

11 years agoStart development series 1.11-post
Thomas Leonard [Mon, 27 Aug 2012 08:07:59 +0000 (27 09:07 +0100)]
Start development series 1.11-post

11 years agoRelease 1.11
Thomas Leonard [Mon, 27 Aug 2012 08:07:57 +0000 (27 09:07 +0100)]
Release 1.11

11 years agoUpdated "0desktop -m" for Python/GTK 3
Thomas Leonard [Mon, 27 Aug 2012 07:18:58 +0000 (27 08:18 +0100)]
Updated "0desktop -m" for Python/GTK 3

11 years agoUpdated 0desktop for GTK 3
Thomas Leonard [Mon, 27 Aug 2012 06:47:15 +0000 (27 07:47 +0100)]
Updated 0desktop for GTK 3

11 years agoImplemented installation-time fixup for Fedora and OpenSUSE too
Thomas Leonard [Sun, 26 Aug 2012 14:02:41 +0000 (26 15:02 +0100)]
Implemented installation-time fixup for Fedora and OpenSUSE too

11 years agoAdded some more PackageKit debugging
Thomas Leonard [Sun, 26 Aug 2012 14:51:53 +0000 (26 15:51 +0100)]
Added some more PackageKit debugging

We're still sometimes ignoring details messages. Try to find out why.

11 years agoFixed bug where PackageKit downloaded the wrong architecture
Thomas Leonard [Sun, 26 Aug 2012 14:28:39 +0000 (26 15:28 +0100)]
Fixed bug where PackageKit downloaded the wrong architecture

11 years agoPackageKit: convert dbus.String to Python string
Thomas Leonard [Sun, 26 Aug 2012 12:22:26 +0000 (26 13:22 +0100)]
PackageKit: convert dbus.String to Python string

For some reason, Resolve can (intermittently) give us a Python String while
Details gives as a dbus.String. Then we fail to match them. Convert both to
Python strings to be sure.

11 years agoFix up Java's main path after installing
Thomas Leonard [Sun, 26 Aug 2012 13:07:10 +0000 (26 14:07 +0100)]
Fix up Java's main path after installing

We can only detect the correct value for main when the Java package is
installed. If 0install needed to install it (using PackageKit), we would
fail to get the right path the first time.

11 years agoUpdated cache explorer to work with GTK 3
Thomas Leonard [Sun, 26 Aug 2012 09:16:15 +0000 (26 10:16 +0100)]
Updated cache explorer to work with GTK 3

11 years agoSwitched to new bug reporting URL
Thomas Leonard [Sat, 25 Aug 2012 18:38:42 +0000 (25 19:38 +0100)]
Switched to new bug reporting URL

The previous one no longer works.

11 years agoBetter error handling if a bug cannot be reported
Thomas Leonard [Sat, 25 Aug 2012 16:50:58 +0000 (25 17:50 +0100)]
Better error handling if a bug cannot be reported

11 years agoFixed handling of ~ in Debian versions
Thomas Leonard [Tue, 21 Aug 2012 06:28:33 +0000 (21 07:28 +0100)]
Fixed handling of ~ in Debian versions

11 years agoInclude Darwin packages in MacPortsDistribution
Thomas Leonard [Sun, 5 Aug 2012 14:27:04 +0000 (5 15:27 +0100)]
Include Darwin packages in MacPortsDistribution

This allows us to find the native Java on MacOS X, even if MacPorts is
available.

11 years agoInterfaces now conflict with their replacements
Thomas Leonard [Sun, 19 Aug 2012 17:27:01 +0000 (19 18:27 +0100)]
Interfaces now conflict with their replacements

This is intended for the case where e.g. one dependency depends on the
original Java interface URI and another depends on the new URI. We can't
satisfy that by selecting two versions of Java.

11 years agoFixed some ResourceWarnings on Python 3
Thomas Leonard [Sun, 19 Aug 2012 11:41:26 +0000 (19 12:41 +0100)]
Fixed some ResourceWarnings on Python 3

Ensure that all temporary files and sockets are closed promptly, without
relying on the GC to do it. This avoids ResourceWarnings.

Note that urllib fails to close sockets in some cases
(http://bugs.python.org/issue12133), so we cannot enable the warnings for all
tests yet.

11 years agoFixup Java versions on Debian
Thomas Leonard [Sun, 19 Aug 2012 08:52:51 +0000 (19 09:52 +0100)]
Fixup Java versions on Debian

Debian marks all Java versions as pre-releases; see:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685276

11 years agoAdded <executable-in-*> support for Windows
Bastian Eicher [Mon, 13 Aug 2012 20:47:00 +0000 (13 22:47 +0200)]
Added <executable-in-*> support for Windows

11 years agoMake 0alias work with binary files under Python 3
Thomas Leonard [Fri, 17 Aug 2012 18:47:51 +0000 (17 19:47 +0100)]
Make 0alias work with binary files under Python 3

Otherwise you get a UnicodeDecodeError when it tries to check whether something
is a script or not.

11 years agoFixed Python 3 whitespace error in 0alias
Thomas Leonard [Fri, 17 Aug 2012 18:40:13 +0000 (17 19:40 +0100)]
Fixed Python 3 whitespace error in 0alias

Also, added unit-tests for this.

11 years agoLog using the "0install" logger rather than "root"
Thomas Leonard [Mon, 13 Aug 2012 06:28:50 +0000 (13 07:28 +0100)]
Log using the "0install" logger rather than "root"

This makes it more obvious where log messages are coming from.

11 years agoFixed package-implementation scoring
Thomas Leonard [Sun, 12 Aug 2012 16:58:29 +0000 (12 17:58 +0100)]
Fixed package-implementation scoring

If the distribution list contained a match followed by an even better one, we
failed to add anything at all.

11 years ago"0install update" didn't always update
Thomas Leonard [Sun, 12 Aug 2012 16:36:13 +0000 (12 17:36 +0100)]
"0install update" didn't always update

If minor changes were found (changes that didn't affect the version numbers)
and we notified the user that a newer version was available but not selected,
then we failed to save the changes.

11 years agoFixed native Java support on Fedora
Thomas Leonard [Sun, 12 Aug 2012 16:31:11 +0000 (12 17:31 +0100)]
Fixed native Java support on Fedora

11 years agoCreate ~/bin automatically if necessary
Thomas Leonard [Sun, 12 Aug 2012 16:13:51 +0000 (12 17:13 +0100)]
Create ~/bin automatically if necessary

11 years ago"0install add": show hint about adding the directory to $PATH
Thomas Leonard [Sun, 12 Aug 2012 16:07:55 +0000 (12 17:07 +0100)]
"0install add": show hint about adding the directory to $PATH

This is the same logic we already had in 0alias.

11 years agoFixed JDK version number on OpenSUSE
Thomas Leonard [Sun, 12 Aug 2012 13:59:45 +0000 (12 14:59 +0100)]
Fixed JDK version number on OpenSUSE

11 years agoFixed native Java support on OpenSUSE
Thomas Leonard [Sun, 12 Aug 2012 13:43:26 +0000 (12 14:43 +0100)]
Fixed native Java support on OpenSUSE

JAVA_HOME is e.g. /usr/lib/jvm/jre-1.6.0-openjdk/bin/java

Also, fixup the version 1.6.x -> 6.x.

11 years agoFixed status icon support with GTK 3
Thomas Leonard [Fri, 10 Aug 2012 18:41:36 +0000 (10 19:41 +0100)]
Fixed status icon support with GTK 3

11 years agoCope better if no GUI is available
Thomas Leonard [Fri, 10 Aug 2012 18:23:35 +0000 (10 19:23 +0100)]
Cope better if no GUI is available

We used to assume that a GUI was available whenever $DISPLAY was set. However,
there could be other reasons why the GUI can't be used, such as missing Python
modules. We now detect this and fall back to console mode gracefully.

If --gui is specified (to force use of the GUI) and no GUI is available, we
display an error message and abort, as before.

11 years agoFixed console download progress indicator on Python 3
Thomas Leonard [Fri, 10 Aug 2012 18:25:23 +0000 (10 19:25 +0100)]
Fixed console download progress indicator on Python 3

The / operator now returns a float, which can't be used as a slice index.

11 years agoFixed some minor error reporting bugs
Thomas Leonard [Fri, 10 Aug 2012 18:24:33 +0000 (10 19:24 +0100)]
Fixed some minor error reporting bugs

- Using -v no longer showed stacktraces for exceptions.
- Displaying exceptions on Python 3 didn't work properly due to missing
  unicode() builtin.

11 years agoFixed bug when a feed is used for multiple interfaces
Thomas Leonard [Wed, 8 Aug 2012 06:00:42 +0000 (8 07:00 +0100)]
Fixed bug when a feed is used for multiple interfaces

If we rename an interface 'old' to 'new', we may want to import the contents of
'old' into 'new' using <feed>. If another feed depends on both interfaces (e.g.
version 1 depends on 'old' and version 2 depends on 'new') then there is a
problem: each <implementation> in 'old' belongs to two interfaces. This resulted
in a crash:

  File "../zeroinstall/injector/solver.py", line 466, in add_iface
    assert impl not in impl_to_var
  AssertionError

11 years agoImproved error reporting when no main executable is given
Thomas Leonard [Thu, 9 Aug 2012 06:35:20 +0000 (9 07:35 +0100)]
Improved error reporting when no main executable is given

11 years agoUse Python 3 by default with "make install"
Thomas Leonard [Wed, 8 Aug 2012 17:19:24 +0000 (8 18:19 +0100)]
Use Python 3 by default with "make install"

You can still use "python2 setup.py install" to continue with Python 2.

11 years agoImproved GUI display of AssertionErrors
Thomas Leonard [Wed, 8 Aug 2012 06:10:59 +0000 (8 07:10 +0100)]
Improved GUI display of AssertionErrors

Before, the error box would typically be blank, or give no clue it was an
error.

11 years agoAllow relative local paths in <feed src='...'>
Thomas Leonard [Wed, 8 Aug 2012 05:38:46 +0000 (8 06:38 +0100)]
Allow relative local paths in <feed src='...'>

Relative paths must start with '.', as for dependencies.

11 years agoImproved Java support on Debian
Thomas Leonard [Sun, 5 Aug 2012 17:34:03 +0000 (5 18:34 +0100)]
Improved Java support on Debian

In Debian, the /usr/bin/java command cannot be relied upon, because which
version of Java it runs depends on the configuration. Instead, find the correct
binary manually in /usr/lib/jvm.

11 years agoParse Debian snapshot version numbers
Thomas Leonard [Sun, 5 Aug 2012 16:57:56 +0000 (5 17:57 +0100)]
Parse Debian snapshot version numbers

These are versions containing a tilde (e.g. Java 7~u3-2.1.1-1).

11 years agoMerged changes from master
Bastian Eicher [Sun, 5 Aug 2012 15:15:40 +0000 (5 17:15 +0200)]
Merged changes from master

11 years agoImplement a Darwin distro, for Java
Anders F Bjorklund [Sat, 4 Aug 2012 15:01:38 +0000 (4 17:01 +0200)]
Implement a Darwin distro, for Java

11 years agoRemoved Python < 3 restriction from feed
Thomas Leonard [Thu, 26 Jul 2012 19:45:01 +0000 (26 20:45 +0100)]
Removed Python < 3 restriction from feed

11 years agoStart development series 1.10-post
Thomas Leonard [Thu, 26 Jul 2012 05:17:48 +0000 (26 06:17 +0100)]
Start development series 1.10-post

11 years agoRelease 1.10
Thomas Leonard [Thu, 26 Jul 2012 05:17:46 +0000 (26 06:17 +0100)]
Release 1.10

11 years agoUpdated setup.py for Python 3
Thomas Leonard [Thu, 26 Jul 2012 05:17:18 +0000 (26 06:17 +0100)]
Updated setup.py for Python 3

11 years agoUpdated Compile GUI for Python 3
Thomas Leonard [Tue, 24 Jul 2012 19:09:47 +0000 (24 20:09 +0100)]
Updated Compile GUI for Python 3

11 years agoUpdated bug report GUI for Python 3
Thomas Leonard [Tue, 24 Jul 2012 18:48:42 +0000 (24 19:48 +0100)]
Updated bug report GUI for Python 3

11 years agoAllow mirroring both archives and implementations
Thomas Leonard [Sat, 14 Jul 2012 16:28:32 +0000 (14 17:28 +0100)]
Allow mirroring both archives and implementations

If an archive isn't found, we try to find a mirror for the archive. If that
fails, we try to find a mirror for the whole implementation. This allows us
to cope with the two common cases:

1) we have exact copies of the original archives, and the mirror can send us to them
2) we have generated a new archive for the whole implementation from the cache

11 years agoAdded support for implementation mirrors
Thomas Leonard [Sat, 14 Jul 2012 14:49:23 +0000 (14 15:49 +0100)]
Added support for implementation mirrors

If there is an error downloading an archive, try the configured mirror site.
Typically, the mirror will then redirect to the real mirror location.

11 years agoAdded @since annotations to StepRunner
Thomas Leonard [Sat, 14 Jul 2012 13:55:20 +0000 (14 14:55 +0100)]
Added @since annotations to StepRunner

11 years agoFixed display problem due to Python upgrade
Thomas Leonard [Fri, 13 Jul 2012 10:24:25 +0000 (13 11:24 +0100)]
Fixed display problem due to Python upgrade

11 years agoAdded sha256new algorithm
Thomas Leonard [Fri, 13 Jul 2012 07:28:54 +0000 (13 08:28 +0100)]
Added sha256new algorithm

This is the same as sha256, except that:

- the digest is encoded with base 32 rather than base 16 (for shorter strings), and
- the separator is '_' rather than '=', since '=' causes problems for some programs (e.g. cmake)

11 years agoFix to previous commit
Thomas Leonard [Thu, 12 Jul 2012 18:03:25 +0000 (12 19:03 +0100)]
Fix to previous commit

11 years agoWarn about trying to delete the current directory
Thomas Leonard [Thu, 12 Jul 2012 17:28:05 +0000 (12 18:28 +0100)]
Warn about trying to delete the current directory

Such code doesn't work on Windows. Reported by Dave Abrahams.

11 years agoAdded <restricts> element
Thomas Leonard [Wed, 11 Jul 2012 09:12:07 +0000 (11 10:12 +0100)]
Added <restricts> element

11 years agoDon't try to install the README that no longer exists
Thomas Leonard [Tue, 10 Jul 2012 18:12:25 +0000 (10 19:12 +0100)]
Don't try to install the README that no longer exists

11 years agoUpdated PackageKit GUI for Python 3
Thomas Leonard [Tue, 10 Jul 2012 13:45:58 +0000 (10 14:45 +0100)]
Updated PackageKit GUI for Python 3

11 years agoPython 3: the GUI now works well enough to run programs
Thomas Leonard [Tue, 10 Jul 2012 08:28:51 +0000 (10 09:28 +0100)]
Python 3: the GUI now works well enough to run programs

The check that re-runs 0install under Python 2 if run under Python 3 has been
removed.

11 years agoThe main GUI window and menus now work with GTK 3 / PyGObject
Thomas Leonard [Tue, 10 Jul 2012 07:25:03 +0000 (10 08:25 +0100)]
The main GUI window and menus now work with GTK 3 / PyGObject

11 years agoFixed warning from PyGObject
Thomas Leonard [Mon, 9 Jul 2012 19:06:08 +0000 (9 20:06 +0100)]
Fixed warning from PyGObject

11 years agoRemoved obsolete README for the GUI
Thomas Leonard [Mon, 9 Jul 2012 18:17:57 +0000 (9 19:17 +0100)]
Removed obsolete README for the GUI

11 years agoLoad icons in binary mode (for Python 3)
Thomas Leonard [Mon, 9 Jul 2012 18:17:17 +0000 (9 19:17 +0100)]
Load icons in binary mode (for Python 3)

11 years agoStarted updating main GUI for Python 3 and GTK 3
Thomas Leonard [Mon, 9 Jul 2012 15:57:11 +0000 (9 16:57 +0100)]
Started updating main GUI for Python 3 and GTK 3

11 years agoFixed preferences layout problem with Python 3
Thomas Leonard [Mon, 9 Jul 2012 12:24:28 +0000 (9 13:24 +0100)]
Fixed preferences layout problem with Python 3

11 years agoImported PyGObject's pygtkcompat.py for better compatibility
Thomas Leonard [Mon, 9 Jul 2012 15:24:11 +0000 (9 16:24 +0100)]
Imported PyGObject's pygtkcompat.py for better compatibility

Based on commit 0ddfecf3bf0a5d7893cd02cff41503d810ef6ce8.

11 years agoFixed popup menu problem with Python 3
Thomas Leonard [Mon, 9 Jul 2012 12:16:21 +0000 (9 13:16 +0100)]
Fixed popup menu problem with Python 3

11 years agoUpdated preferences box to support Python 3, PyGObject and GTK 3
Thomas Leonard [Mon, 9 Jul 2012 08:16:59 +0000 (9 09:16 +0100)]
Updated preferences box to support Python 3, PyGObject and GTK 3

Note: the popup menu does not appear yet for some reason.

11 years agoDon't automatically trust Thomas Leonard's key
Thomas Leonard [Sun, 8 Jul 2012 10:19:28 +0000 (8 11:19 +0100)]
Don't automatically trust Thomas Leonard's key

We no longer need it to fetch the GUI, and we can now approve it automatically
using the key information service.

11 years agoTell the user when a background update completes, not when it starts
Thomas Leonard [Sun, 8 Jul 2012 06:19:55 +0000 (8 07:19 +0100)]
Tell the user when a background update completes, not when it starts

The systray icon still shows when a download is happening, but there's no
need to bother the user with a full notification box.

For applications, notify the user if the selections change (even if we didn't
download anything new).

11 years agoIn unit-tests, always use StringIO, not io
Thomas Leonard [Sun, 1 Jul 2012 11:03:55 +0000 (1 12:03 +0100)]
In unit-tests, always use StringIO, not io

Some versions of Python 2.6 seem to have problems with io's version.

11 years agoAllow "0install download APP"
Thomas Leonard [Sun, 1 Jul 2012 07:01:43 +0000 (1 08:01 +0100)]
Allow "0install download APP"

11 years agoReselect when using "0install run -g APP" or with extra requirements
Thomas Leonard [Sun, 1 Jul 2012 06:58:22 +0000 (1 07:58 +0100)]
Reselect when using "0install run -g APP" or with extra requirements

11 years agoAll unit-tests now pass with Python 3
Thomas Leonard [Sun, 1 Jul 2012 06:33:26 +0000 (1 07:33 +0100)]
All unit-tests now pass with Python 3

11 years agoFixed HTTP redirect tests on Python 3
Thomas Leonard [Sun, 1 Jul 2012 05:53:00 +0000 (1 06:53 +0100)]
Fixed HTTP redirect tests on Python 3

11 years agoFix some unit-test problems
Thomas Leonard [Sat, 30 Jun 2012 19:43:30 +0000 (30 20:43 +0100)]
Fix some unit-test problems

11 years agoMore Python 3 support
Thomas Leonard [Sat, 30 Jun 2012 13:50:07 +0000 (30 14:50 +0100)]
More Python 3 support

11 years agoOnly process each <package-implementation> once, even if several distributions match...
Thomas Leonard [Sat, 30 Jun 2012 08:38:29 +0000 (30 09:38 +0100)]
Only process each <package-implementation> once, even if several distributions match equally well

This caused warnings if there were lots of equally-bad matches (e.g. distributions="bad1 bad2 bad3").

11 years agoPrefer a generic <package-implementation> over one which doesn't match
Thomas Leonard [Sat, 30 Jun 2012 08:12:02 +0000 (30 09:12 +0100)]
Prefer a generic <package-implementation> over one which doesn't match

11 years agoFixed size calculation for recipes containing renames
Thomas Leonard [Sat, 30 Jun 2012 07:44:25 +0000 (30 08:44 +0100)]
Fixed size calculation for recipes containing renames

11 years agoRemoved unused force attribute
Thomas Leonard [Sat, 30 Jun 2012 07:30:44 +0000 (30 08:30 +0100)]
Removed unused force attribute

11 years agoAdd <rename> recipe step
Tim Cuthbertson [Sun, 24 Jun 2012 07:44:21 +0000 (24 17:44 +1000)]
Add <rename> recipe step

11 years agoMore updates to support Python 3
Thomas Leonard [Sat, 30 Jun 2012 05:05:14 +0000 (30 06:05 +0100)]
More updates to support Python 3

11 years agoMore Python 3 support
Thomas Leonard [Fri, 29 Jun 2012 19:16:10 +0000 (29 20:16 +0100)]
More Python 3 support

testModel now passes!

11 years ago"0install select -g APP" now works
Thomas Leonard [Fri, 29 Jun 2012 06:27:59 +0000 (29 07:27 +0100)]
"0install select -g APP" now works

Before, it didn't show the GUI.

11 years agoUpdated epydoc
Thomas Leonard [Thu, 28 Jun 2012 19:48:31 +0000 (28 20:48 +0100)]
Updated epydoc

11 years agoStart development series 1.9-post
Thomas Leonard [Wed, 27 Jun 2012 06:13:53 +0000 (27 07:13 +0100)]
Start development series 1.9-post

11 years agoRelease 1.9
Thomas Leonard [Wed, 27 Jun 2012 06:13:51 +0000 (27 07:13 +0100)]
Release 1.9

11 years agoRemoved unused import
Thomas Leonard [Wed, 27 Jun 2012 06:13:30 +0000 (27 07:13 +0100)]
Removed unused import

11 years agoDon't write coverage cache when testing
Thomas Leonard [Wed, 27 Jun 2012 06:10:08 +0000 (27 07:10 +0100)]
Don't write coverage cache when testing

11 years agoAdded support for site-local packages
Thomas Leonard [Thu, 21 Jun 2012 07:04:24 +0000 (21 08:04 +0100)]
Added support for site-local packages

This makes things easier for 0compile: instead of putting builds in the cache
and registering them with the interface, 0compile can now just drop a build in
~/.local/share/0install.net/site-packages/URI/VERSION and 0install will find it
and add it automatically. The build can be removed by simply deleting the
directory.

In order to support the case where 0compile compiles a binary on a platform
with an old system 0install, writer.save_interface() adds all such discovered
feeds, tagged as 'site-package'. 0install >= 1.9 ignores such entries when
reading.

11 years agoDon't show Signatures section in the GUI for local feeds
Thomas Leonard [Sun, 24 Jun 2012 06:50:50 +0000 (24 07:50 +0100)]
Don't show Signatures section in the GUI for local feeds