Here is an update for File::HomeDir.

What's new upstream (partial, see [0]):

- documentation improvements
- remove tie interface
- determine ->my_home when $ENV{HOME} is empty

What's new in the port:

- change how we set HOME for tests, the previous way doesn't 
  work under PORTS_PRIVSEP
- explain why a test is "failing" under PORTS_PRIVSEP
- set versions on depends

Testing :

- 'make test' passes, even if it fails under PORTS_PRIVSEP.
  In t/20_empty_home.t [1], File::HomeDir->my_home is called.
  
  You don't want it to return a homedir that doesn't exist,
  so this is also checked [2]: it returns undef as _pbuild's
  $HOME is (/)nonexistent.
  
  If asked i can pass PORTS_PRIVSEP in TEST_ENV and patch the test
  to make it skip under PORTS_PRIVSEP, but reluctantly: neither the
  test or the module code is wrong, and i've documented the "issue"
  in the Makefile. Especially that upstreaming is unlikely.

- There are 7 direct consumers that i've tested [3], i've
  no issues due to that update.


Comments/feedback are welcome :) 

Charlène. 


[0] https://metacpan.org/source/REHSACK/File-HomeDir-1.004/Changes
[1]
https://metacpan.org/source/REHSACK/File-HomeDir-1.004/t/20_empty_home.t
[2]
https://metacpan.org/source/REHSACK/File-HomeDir-1.004/lib/File/HomeDir/Unix.pm#L29
[3] http://0x0.st/zTrA.tgz


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/p5-File-HomeDir/Makefile,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 Makefile
--- Makefile    9 May 2017 08:12:45 -0000       1.17
+++ Makefile    4 May 2019 20:30:30 -0000
@@ -4,16 +4,21 @@ COMMENT=              retrieve home directory locati
 
 MODULES=               cpan
 PKG_ARCH=              *
-DISTNAME =             File-HomeDir-1.002
+
+DISTNAME=              File-HomeDir-1.004
+
 CATEGORIES=            devel
 
 # perl
 PERMIT_PACKAGE_CDROM=  Yes
 
-RUN_DEPENDS=           sysutils/p5-File-Which
+RUN_DEPENDS=           sysutils/p5-File-Which>=0.05
+
+# t/20_empty_home.t fails under PORTS_PRIVSEP if the directory
+# '/nonexistent' doesn't exist as File::HomeDir->my_home checks
+# if it does before considering a home directory valid.
 
-.ifmake test
-PORTHOME=              ${HOME}
-.endif
+# Needed by t/02_main.t
+TEST_ENV+=             HOME="${HOME}"
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/p5-File-HomeDir/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- distinfo    9 May 2017 08:12:45 -0000       1.10
+++ distinfo    4 May 2019 20:30:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (File-HomeDir-1.002.tar.gz) = 
60wMhXdROEYM1AE9gRcjLwjog4HJXGqTs9EelpGFwnQ=
-SIZE (File-HomeDir-1.002.tar.gz) = 35441
+SHA256 (File-HomeDir-1.004.tar.gz) = 
RfZ+K7XmCnlw0IDo8CB5cy5ajfwMfDy9spq/s/n3ka0=
+SIZE (File-HomeDir-1.004.tar.gz) = 35400

Reply via email to