[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-11-13 Thread RSCHUPP via RT
Fri Nov 13 03:23:07 2009: Request 18472 was acted upon.
Transaction: Correspondence added by RSCHUPP
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


Above patch checked into SVN.


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-11-13 Thread Toby C via RT
Fri Nov 13 00:29:06 2009: Request 18472 was acted upon.
Transaction: Correspondence added by TJC
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


Any chance of this fix going through yet?


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-10-01 Thread Toby C via RT
Thu Oct 01 03:25:11 2009: Request 18472 was acted upon.
Transaction: Correspondence added by TJC
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


On Wed Sep 30 04:25:33 2009, RSCHUPP wrote:
> I tightened your check for "am I invoked as 'parl foo.par ...'?"
> a bit (just paranoid), the only thing really necessary is
> to check that argv[1] is not NULL before passing it into a string
> function. 
> 
> Can you check whether the attached patch works for you?

The attached patch does still work for me. Thanks for improving it. The
changes all look sensible.


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-09-30 Thread RSCHUPP via RT
Wed Sep 30 04:25:33 2009: Request 18472 was acted upon.
Transaction: Correspondence added by RSCHUPP
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


On Thu Sep 24 22:00:39 2009, TJC wrote:
> Which bit of the test suite fails for you?
> I have it passing here with my patch.. Although it was notable that I
> had to do a "make realclean" and also remove the old system libraries
first:

Me bad, I should have known better. Now the test suite also
passes for me and the behaviour seems as expected
for the case of "parl foo.par bar.pl". (The only irritation
was that cache directory used in this case was indeed different
from the cache name "burned" into parl. But I expected it
to be the SHA1 checksum of foo.par and it wasn't. Different bug.)
 
I tightened your check for "am I invoked as 'parl foo.par ...'?"
a bit (just paranoid), the only thing really necessary is
to check that argv[1] is not NULL before passing it into a string
function. 

Can you check whether the attached patch works for you?



rt18472.patch
Description: Binary data


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-09-25 Thread Toby C via RT
Thu Sep 24 22:00:39 2009: Request 18472 was acted upon.
Transaction: Correspondence added by TJC
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


On Thu Sep 24 09:34:23 2009, RSCHUPP wrote:
> On Thu Sep 24 03:28:03 2009, TJC wrote:
> ...for starters, it breaks the test suite (and I think that can't
> be fixed). Sorry, if a solution would be that easy, we would have
> put it in a long time ago. I think that any solution should
> not meddle with the C code, but rather be implemented in par.pl.
> But par.pl also suffers from doing dual duty: being called
> from parl proper as well as from each pp-archive (second stage
> of bootstrapping). 

Which bit of the test suite fails for you?

I have it passing here with my patch.. Although it was notable that I
had to do a "make realclean" and also remove the old system libraries first:
/usr/share/perl5/PAR/StrippedPARL/Dynamic.pm
/usr/share/perl5/PAR/StrippedPARL/Static.pm


I agree the code isn't great, but it is a major bug that's been around
for three and a half years, and it breaks parl badly. Any fix is better
than no fix.

If you let me know what is failing for you, I can try and resolve that.


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-09-24 Thread Toby C via RT
Thu Sep 24 03:28:03 2009: Request 18472 was acted upon.
Transaction: Correspondence added by TJC
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


Ho ho ho.
I just spent ages debugging /usr/bin/parl to arrive at this exact 
conclusion and came to CPAN to report it..

I attach a dirty patch that resolves it, but potentially breaks god-
knows-what-else.

Works for me..
diff --git a/myldr/mktmpdir.c b/myldr/mktmpdir.c
index e15cc8b..6796a98 100644
--- a/myldr/mktmpdir.c
+++ b/myldr/mktmpdir.c
@@ -160,6 +160,14 @@ char *par_mktmpdir ( char **argv ) {
 if (progname == NULL)
 progname = argv[0];
 
+/* If running like /usr/bin/parl foo.par myscript.pl then argv[0] equals
+ * parl, and we don't want to base our checksum on that! Skip ahead one
+ * argument instead..
+ */
+if (strstr(progname, "parl") && strstr(argv[1], ".par")) {
+progname = argv[1];
+}
+
 if ( !par_env_clean() && (f = open( progname, O_RDONLY | OPEN_O_BINARY ))) {
 lseek(f, -18, 2);
 read(f, buf, 6);


[rt.cpan.org #18472] "parl foo.par script.pl ..." uses a cache area that doesn't depend on foo.par

2009-09-24 Thread RSCHUPP via RT
Thu Sep 24 09:34:23 2009: Request 18472 was acted upon.
Transaction: Correspondence added by RSCHUPP
   Queue: PAR-Packer
 Subject: "parl foo.par script.pl ..." uses a cache area that doesn't 
depend on foo.par
   Broken in: 0.975, 0.982, 0.991
Severity: Normal
   Owner: SMUELLER
  Requestors: rsch...@cpan.org
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=18472 >


On Thu Sep 24 03:28:03 2009, TJC wrote:

> I attach a dirty patch that resolves it, 

Thanks for the patch, but...

> but potentially breaks god-knows-what-else.

...for starters, it breaks the test suite (and I think that can't
be fixed). Sorry, if a solution would be that easy, we would have
put it in a long time ago. I think that any solution should
not meddle with the C code, but rather be implemented in par.pl.
But par.pl also suffers from doing dual duty: being called
from parl proper as well as from each pp-archive (second stage
of bootstrapping). 

Cheers, Roderich