On Sat, Jan 03, 2015 at 04:08:39PM -0500, Brad Smith wrote:
> On 01/03/15 12:48, Matthieu Herrb wrote:
> >On Sat, Jan 03, 2015 at 06:26:42PM +0100, Jérémie Courrèges-Anglas wrote:
> >>Matthieu Herrb <matth...@herrb.eu> writes:
> >>
> >>>Hi,
> >>>
> >>>Duplicity 0.6.25 introduced a warning about 0.6 series beeing phased
> >>>out.
> >>>
> >>>This warning breaks the parsing of duplicity --version done by
> >>>deja-dup and makes it bail that only version 0.6.0 is installed while
> >>>it needs at least 0.6.23.
> >>
> >>Here's a diff against recent cvs HEAD.
> >
> >Hmm,
> >
> >that (deja-dup patch) may be better :
> >
> >https://code.launchpad.net/~adrien-bak/deja-dup/ducplicity-version-retrieval/+merge/239340
> 
> This would be better.


Like that ? (tested working on my machine)

Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/deja-dup/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile    8 Oct 2014 08:23:24 -0000       1.28
+++ Makefile    3 Jan 2015 22:09:38 -0000
@@ -6,6 +6,7 @@
 
 GNOME_VERSION= 32.0
 GNOME_PROJECT= deja-dup
+REVISION=      0
 
 CATEGORIES=    sysutils x11/gnome
 
Index: patches/patch-libdeja_tools_duplicity_DuplicityPlugin_vala
===================================================================
RCS file: patches/patch-libdeja_tools_duplicity_DuplicityPlugin_vala
diff -N patches/patch-libdeja_tools_duplicity_DuplicityPlugin_vala
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libdeja_tools_duplicity_DuplicityPlugin_vala  3 Jan 2015 
22:09:38 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+--- libdeja/tools/duplicity/DuplicityPlugin.vala.orig  Fri Jan 24 17:07:35 2014
++++ libdeja/tools/duplicity/DuplicityPlugin.vala       Sat Jan  3 22:58:43 2015
+@@ -35,13 +35,17 @@
+   {
+     string output;
+     Process.spawn_command_line_sync("duplicity --version", out output, null, 
null);
++    var tokens = output.split(" ");
+ 
+-    var tokens = output.split(" ", 2);
+-    if (tokens == null || tokens[0] == null || tokens[1] == null)
++    if (tokens == null || tokens.length < 2 )
+       throw new SpawnError.FAILED(_("Could not understand duplicity 
version."));
+ 
+-    // First token is 'duplicity' and is ignorable.  Second looks like 
'0.5.03'
+-    var version_string = tokens[1].strip();
++    // in version 0.6.25, the output fro duplicity --version changed and the 
string
++    // "duplicity major.minor.micro" is not preceded by a deprecation warning
++    // as a consequence, the substring "major.minor.micro" is now
++    // always the penultimate token (the last one always being null)
++
++    var version_string = tokens[tokens.length - 1].strip();
+     int major, minor, micro;
+     if (!DejaDup.parse_version(version_string, out major, out minor, out 
micro))
+       throw new SpawnError.FAILED(_("Could not understand duplicity version 
‘%s’.").printf(version_string));

-- 
Matthieu Herrb

Reply via email to