pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/perl5 NetBSD's /proc/${pid}/exe is sometimes a sy...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c3a16a0600b8
branches:  trunk
changeset: 537412:c3a16a0600b8
user:      apb <apb%pkgsrc.org@localhost>
date:      Tue Jan 08 15:19:38 2008 +0000

description:
NetBSD's /proc/${pid}/exe is sometimes a symlink to "/" instead of to the
actual program name, so Perl's $^X or $EXECUTABLE_NAME variable was wrong.
Change a test to detect this case, and fall back to using argv[0].

diffstat:

 lang/perl5/distinfo         |   4 ++--
 lang/perl5/patches/patch-ah |  20 ++++++++++++++++----
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 3183ad2bcbeb -r c3a16a0600b8 lang/perl5/distinfo
--- a/lang/perl5/distinfo       Tue Jan 08 15:14:25 2008 +0000
+++ b/lang/perl5/distinfo       Tue Jan 08 15:19:38 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2007/11/06 19:54:53 drochner Exp $
+$NetBSD: distinfo,v 1.44 2008/01/08 15:19:38 apb Exp $
 
 SHA1 (perl-5.8.8.tar.bz2) = 4aab490040727ca4419098720eca2ba4367df539
 RMD160 (perl-5.8.8.tar.bz2) = e78f26d9b96e6db35f946ad4ff55e3a69385c71b
@@ -7,7 +7,7 @@
 SHA1 (patch-ab) = e32427327192f023477b16f29bc55fdf4f057410
 SHA1 (patch-ac) = 428e0757495b82a47ec092a71333fb3ec366f14f
 SHA1 (patch-ae) = 891e8d1cfbd69a63827239b4e04d84aac8fd795c
-SHA1 (patch-ah) = 39b1a46a0ee5e73b4707a3d947fe17016df9630a
+SHA1 (patch-ah) = 25443063c26287b1b8130c53d5c9d92248d4c0d1
 SHA1 (patch-am) = cf1687063d0c0542e811545aaaad291bad12d75e
 SHA1 (patch-an) = 987763c3098bf4356993dd6d8741962a1ff8190d
 SHA1 (patch-ap) = 178d6909a8aa6544b849c2b63530fcf1893b77ea
diff -r 3183ad2bcbeb -r c3a16a0600b8 lang/perl5/patches/patch-ah
--- a/lang/perl5/patches/patch-ah       Tue Jan 08 15:14:25 2008 +0000
+++ b/lang/perl5/patches/patch-ah       Tue Jan 08 15:19:38 2008 +0000
@@ -1,8 +1,20 @@
-$NetBSD: patch-ah,v 1.8 2006/04/09 06:34:32 jlam Exp $
+$NetBSD: patch-ah,v 1.9 2008/01/08 15:19:39 apb Exp $
 
---- perl.c.orig        2006-01-31 07:34:47.000000000 -0500
+--- perl.c.orig        2006-01-31 12:34:47.000000000 +0000
 +++ perl.c
-@@ -4770,45 +4770,12 @@ S_init_perllib(pTHX)
+@@ -4615,8 +4615,10 @@ S_procself_val(pTHX_ SV *sv, char *arg0)
+        to the executable (or returning an error from the readlink).  Any valid
+        path has a '/' in it somewhere, so use that to validate the result.
+        See http://www.freebsd.org/cgi/query-pr.cgi?pr=35703
++
++       NetBSD's implementation sometimes returns "/"; reject that too.
+     */
+-    if (len > 0 && memchr(buf, '/', len)) {
++    if (len > 1 && memchr(buf, '/', len)) {
+       sv_setpvn(sv,buf,len);
+     }
+     else {
+@@ -4770,45 +4772,12 @@ S_init_perllib(pTHX)
      }
  
  /* Use the ~-expanded versions of APPLLIB (undocumented),
@@ -49,7 +61,7 @@
  #ifdef SITEARCH_EXP
      /* sitearch is always relative to sitelib on Windows for
       * DLL-based path intuition to work correctly */
-@@ -4850,6 +4817,39 @@ S_init_perllib(pTHX)
+@@ -4850,6 +4819,39 @@ S_init_perllib(pTHX)
      incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
  #endif
  



Home | Main Index | Thread Index | Old Index