Skip Menu |

This queue is for tickets about the File-Rsync CPAN distribution.

Report information
The Basics
Id: 106942
Status: resolved
Priority: 0/
Queue: File-Rsync

People
Owner: LEAKIN [...] cpan.org
Requestors: abe [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.47



Subject: Options passed as hashref no more works properly since 0.46
Date: Mon, 7 Sep 2015 22:37:31 +0200
To: bug-File-Rsync [...] rt.cpan.org
From: Axel Beckert <abe [...] cpan.org>
Hi, I had to change all calls to File::Rsync->new({…}) as well as to $rsync->exec({…}) to drop the curly braces for using File::Rsync 0.46 because otherwise I always got the output of the rsync usage message. Example cases: Run "make test" after checking out https://github.com/xtaran/unburden-home-dir at commit bd63bfc91a1a74b4f891a29ca5cabf367488d8a2. It fails badly as can be seen here at Travis CI: https://travis-ci.org/xtaran/unburden-home-dir/jobs/78825542 This patch fixed it: https://github.com/xtaran/unburden-home-dir/commit/c0118cf1d11040b29245355b74e77bb86a93de7a (Luckily dropping the curly braces still seems to work with earlier, at least the above test suite at current state works even with File::Rsync at version 0.42 of 2005. Kind regards, Axel -- /~\ Plain Text Ribbon Campaign | Axel Beckert \ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail) X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber) / \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)
Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works properly since 0.46
Date: Tue, 8 Sep 2015 11:43:36 -0500
To: Axel Beckert via RT <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] japh.net>
Before 0.46, with and without has ref (curly braces) work exactly the same. In 0.46 the args became ordered to provide better rsync function. I tried to provide backwards compatibility via the deprecated curly braces, but it appears I missed something. The right answer is to go forward without the braces, but I'd like to determine where the compatibility is broken also. Do you have details on what args are being passed when your tests break (such as the returned string from $rsync->getcmd)? I tried running your "make test" but ran into dependency-hell. -Lee Show quoted text
> Date: Mon, 7 Sep 2015 16:37:54 -0400 > From: Axel Beckert via RT <bug-File-Rsync@rt.cpan.org> > To: undisclosed-recipients: ; > Subject: [rt.cpan.org #106942] Options passed as hashref no more works > properly since 0.46 > X-CPAN.org: This message routed through the cpan.org mail forwarding > service. Please use PAUSE pause.perl.org to configure your delivery > settings. > Reply-To: bug-File-Rsync@rt.cpan.org > X-RT-Loop-Prevention: rt.cpan.org > RT-Ticket: rt.cpan.org #106942 > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > RT-Originator: abe@cpan.org > X-RT-Original-Encoding: utf-8 > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > 2015.9.7.202416 > > Mon Sep 07 16:37:49 2015: Request 106942 was acted upon. > Transaction: Ticket created by abe@cpan.org > Queue: File-Rsync > Subject: Options passed as hashref no more works properly since 0.46 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: abe@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106942 > > > > Hi, > > I had to change all calls to File::Rsync->new({???}) as well as to > $rsync->exec({???}) to drop the curly braces for using File::Rsync 0.46 > because otherwise I always got the output of the rsync usage message. > > Example cases: Run "make test" after checking out > https://github.com/xtaran/unburden-home-dir at commit > bd63bfc91a1a74b4f891a29ca5cabf367488d8a2. > > It fails badly as can be seen here at Travis CI: > https://travis-ci.org/xtaran/unburden-home-dir/jobs/78825542 > > This patch fixed it: > https://github.com/xtaran/unburden-home-dir/commit/c0118cf1d11040b29245355b74e77bb86a93de7a > > (Luckily dropping the curly braces still seems to work with earlier, > at least the above test suite at current state works even with > File::Rsync at version 0.42 of 2005. > > Kind regards, Axel > -- > /~\ Plain Text Ribbon Campaign | Axel Beckert > \ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail) > X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber) > / \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web) >
Here is an example where backwards compatibility is broken: use strict; use File::Rsync; print "# $File::Rsync::VERSION\n"; unlink "t1", "slsrc", "sldst"; open my $fh, ">", "t1"; print $fh "test\n"; close $fh or die; symlink "t1", "slsrc" or die; my $rsync = File::Rsync->new({ links => 1, }); $rsync->exec( src => "slsrc", dst => "sldst" ) or die "Could not...".join(" ",$rsync->err); print readlink "sldst" eq "t1" ? "ok 1\n" : "not ok 1\n"; The above prints "not ok 1" for me with 0.46. Taking the curly away "fixes" things. What gives?
Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works properly since 0.46
Date: Thu, 10 Sep 2015 15:50:12 -0500
To: Andreas Koenig via RT <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] ti.com>
Well, now I see where the problem is. I just have to figure out how to fix it. Getcmd is not handling the hash-ref args properly, effectively ignoring them. Hopefully I can get a fix out pretty quick. -Lee Show quoted text
> Date: Wed, 9 Sep 2015 18:06:22 -0400 > From: Andreas Koenig via RT <bug-File-Rsync@rt.cpan.org> > To: undisclosed-recipients: ; > Subject: [rt.cpan.org #106942] Options passed as hashref no more works > properly since 0.46 > X-CPAN.org: This message routed through the cpan.org mail forwarding > service. Please use PAUSE pause.perl.org to configure your delivery > settings. > Reply-To: bug-File-Rsync@rt.cpan.org > X-RT-Loop-Prevention: rt.cpan.org > RT-Ticket: rt.cpan.org #106942 > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > RT-Originator: ANDK@cpan.org > X-RT-Original-Encoding: utf-8 > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > 2015.9.9.215717 > > Queue: File-Rsync > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106942 > > > Here is an example where backwards compatibility is broken: > > use strict; > use File::Rsync; > print "# $File::Rsync::VERSION\n"; > unlink "t1", "slsrc", "sldst"; > open my $fh, ">", "t1"; print $fh "test\n"; close $fh or die; > symlink "t1", "slsrc" or die; > my $rsync = File::Rsync->new({ > links => 1, > }); > $rsync->exec( src => "slsrc", dst => "sldst" ) or die "Could not...".join(" ",$rsync->err); > print readlink "sldst" eq "t1" ? "ok 1\n" : "not ok 1\n"; > > > > The above prints "not ok 1" for me with 0.46. Taking the curly away "fixes" things. > > What gives? >
Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works properly since 0.46
Date: Fri, 11 Sep 2015 09:00:58 -0500
To: "Eakin, Lee via RT" <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] ti.com>
OK, I believe I have this fixed. I have uploaded a preliminary 0.47 here: http://www.japh.net/File-Rsync-0.47.tar.gz and updated git here: http://www.japh.net/File-Rsync.git Please test if you get a moment. I'll upload to CPAN Monday or Tuesday, assuming no issues are found with the updated code. -Lee Show quoted text
> Date: Thu, 10 Sep 2015 16:50:29 -0400 > From: "Eakin, Lee via RT" <bug-File-Rsync@rt.cpan.org> > To: undisclosed-recipients: ; > Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works > properly since 0.46 > X-CPAN.org: This message routed through the cpan.org mail forwarding > service. Please use PAUSE pause.perl.org to configure your delivery > settings. > Reply-To: bug-File-Rsync@rt.cpan.org > X-RT-Loop-Prevention: rt.cpan.org > RT-Ticket: rt.cpan.org #106942 > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > RT-Originator: leakin@ti.com > X-RT-Original-Encoding: utf-8 > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > 2015.9.10.204217 > > Queue: File-Rsync > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106942 > > > Well, now I see where the problem is. I just have to figure out how to > fix it. Getcmd is not handling the hash-ref args properly, effectively > ignoring them. Hopefully I can get a fix out pretty quick. > -Lee >
> > Date: Wed, 9 Sep 2015 18:06:22 -0400 > > From: Andreas Koenig via RT <bug-File-Rsync@rt.cpan.org> > > To: undisclosed-recipients: ; > > Subject: [rt.cpan.org #106942] Options passed as hashref no more works > > properly since 0.46 > > X-CPAN.org: This message routed through the cpan.org mail forwarding > > service. Please use PAUSE pause.perl.org to configure your delivery > > settings. > > Reply-To: bug-File-Rsync@rt.cpan.org > > X-RT-Loop-Prevention: rt.cpan.org > > RT-Ticket: rt.cpan.org #106942 > > Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/) > > RT-Originator: ANDK@cpan.org > > X-RT-Original-Encoding: utf-8 > > X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: > > 2015.9.9.215717 > > > > Queue: File-Rsync > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106942 > > > > > Here is an example where backwards compatibility is broken: > > > > use strict; > > use File::Rsync; > > print "# $File::Rsync::VERSION\n"; > > unlink "t1", "slsrc", "sldst"; > > open my $fh, ">", "t1"; print $fh "test\n"; close $fh or die; > > symlink "t1", "slsrc" or die; > > my $rsync = File::Rsync->new({ > > links => 1, > > }); > > $rsync->exec( src => "slsrc", dst => "sldst" ) or die "Could not...".join(" ",$rsync->err); > > print readlink "sldst" eq "t1" ? "ok 1\n" : "not ok 1\n"; > > > > > > > > The above prints "not ok 1" for me with 0.46. Taking the curly away "fixes" things. > > > > What gives? > >
>
Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works properly since 0.46
Date: Fri, 11 Sep 2015 16:37:06 +0200
To: "Eakin, Lee via RT" <bug-File-Rsync [...] rt.cpan.org>
From: Axel Beckert <abe [...] cpan.org>
Hi Lee, sorry for bot being able to investigate further. Luckily Andy found the culprit already. On Fri, Sep 11, 2015 at 10:01:28AM -0400, Eakin, Lee via RT wrote: Show quoted text
> OK, I believe I have this fixed. I have uploaded a preliminary 0.47 > here: http://www.japh.net/File-Rsync-0.47.tar.gz
Looks fine. unburden-home-dir's test suite no more fails with that even before I removed the curly braces. Thanks! Show quoted text
> and updated git here: http://www.japh.net/File-Rsync.git
That one is not clonable: $ git clone http://www.japh.net/File-Rsync.git/ Cloning into 'File-Rsync'... fatal: repository 'http://www.japh.net/File-Rsync.git/' not found Maybe the post-update hook in the hooks directory (which generates a few files for making the repo clonable via HTTP) is not activated. Show quoted text
> Please test if you get a moment. I'll upload to CPAN Monday or Tuesday, > assuming no issues are found with the updated code.
Looking forward to it! Kind regards, Axel -- /~\ Plain Text Ribbon Campaign | Axel Beckert \ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail) X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber) / \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)
Subject: Re: [rt.cpan.org #106942] Options passed as hashref no more works properly since 0.46
Date: Mon, 14 Sep 2015 13:38:33 -0500
To: Axel Beckert via RT <bug-File-Rsync [...] rt.cpan.org>
From: Lee Eakin <leakin [...] ti.com>
Axel, Thanks for confirming! I'll work on the git tree soon, or move it to github when I get a moment ... -Lee Show quoted text
> Date: Fri, 11 Sep 2015 10:37:27 -0400 > From: Axel Beckert via RT <bug-File-Rsync@rt.cpan.org> > > Queue: File-Rsync > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106942 > > > Hi Lee, > > sorry for bot being able to investigate further. Luckily Andy found > the culprit already. > > On Fri, Sep 11, 2015 at 10:01:28AM -0400, Eakin, Lee via RT wrote:
> > OK, I believe I have this fixed. I have uploaded a preliminary 0.47 > > here: http://www.japh.net/File-Rsync-0.47.tar.gz
> > Looks fine. unburden-home-dir's test suite no more fails with that > even before I removed the curly braces. Thanks! >
> > and updated git here: http://www.japh.net/File-Rsync.git
> > That one is not clonable: > > $ git clone http://www.japh.net/File-Rsync.git/ > Cloning into 'File-Rsync'... > fatal: repository 'http://www.japh.net/File-Rsync.git/' not found > > Maybe the post-update hook in the hooks directory (which generates a > few files for making the repo clonable via HTTP) is not activated. >
> > Please test if you get a moment. I'll upload to CPAN Monday or Tuesday, > > assuming no issues are found with the updated code.
> > Looking forward to it! > > Kind regards, Axel > -- > /~\ Plain Text Ribbon Campaign | Axel Beckert > \ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail) > X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber) > / \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web) >