Giter VIP home page Giter VIP logo

file-sharedir-install's People

Contributors

karenetheridge avatar skaji avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

file-sharedir-install's Issues

Problem with files starting with escapable characters on Windows

I found this problem while trying to build recent Plack on Windows.
Here are test failures for Plack: http://matrix.cpantesters.org/?dist=Plack%201.0044;os=mswin32;perl=5.26.0;reports=1

Basically, the problem here is based on usage of File::Spec (that use backslashes on Windows systems) for Makefiles (that uses forward slashes regardless of the system). If the first character is escapable (in Plack's case, it's "#"), then File::ShareDir::Install will generate incorrect Makefile. A Plack's example is the following:

# --- MakeMaker postamble section:
config::
	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e "pm_to_blib({@ARGV}, '$(INST_LIB)')" -- \
	  share\#foo $(INST_LIB)\auto\share\dist\$(DISTNAME)\#foo \
	  share\baybridge.jpg $(INST_LIB)\auto\share\dist\$(DISTNAME)\baybridge.jpg \
	  share\face.jpg $(INST_LIB)\auto\share\dist\$(DISTNAME)\face.jpg 

As you can see, "share\#foo" becomes "share#foo".

There are two ways how this can be fixed:

  1. Replace backslashes with forward slashes on Windows systems. That would make Makefiles more consistent.
    or
  2. Escape backslashes, probably for Windows systems only too.

Can't find dist file when INSTALL_BASE is used with ExtUtils::MakeMaker

If I install using INSTALL_BASE, dist_file can't find the files where they were copied to. I attached a simple test case and I run the commands:

perl Makefile.PL INSTALL_BASE=test && make && make install && perl test/bin/t.pl

And I get an error:

Failed to find share dir for dist 't' at test/bin/t.pl line 5.

If I install as a root without INSTALL_BASE, the file is found.

test.tar.gz

Request: install files R/W

I just discovered Kephra, which looks interesting but is still on M::I. I would like to move it to EUMM, so would be using this module since Kephra has share/ data. However, at least some of the share files need to be writeable. Would you be willing to add an R/W option to this module? That would remove the need to use File::chmod::Recursive in a separate pass. Thanks for considering this request!

Edit I looked at the code and don't see any -r or -w tests. Does it actually just keep the source permissions (depending on filesystem behaviour)? If so, would you be willing to update the documentation to reflect that? Currently, the POD says (emphasis added):

File::ShareDir::Install allows you to install read-only data files from a distribution.

tests failed under strawberry perl 5.26.2

Writing Makefile for File::ShareDir::Install
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have File::Spec 0 ... Yes (3.74)
Checking if you have Exporter 0 ... Yes (5.72)
Checking if you have IO::Dir 0 ... Yes (1.39)
Checking if you have Test::More 0 ... Yes (1.302136)
Checking if you have warnings 0 ... Yes (1.37)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Carp 0 ... Yes (1.42)
Checking if you have File::Path 0 ... Yes (2.15)
Checking if you have strict 0 ... Yes (1.11)
Building and testing File-ShareDir-Install-0.13 ... cp lib/File/ShareDir/Install.pm blib\lib\File\ShareDir\Install.pm
"D:\devel\perl\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/10_makefile.t ........ 1/22 Error running gmake -f test-1036-Makefile: ?=512 ret=gmake[1]: Entering directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Cannot copy 't\share#hello' to 'tlib-1036/lib\auto\share\dist\File-ShareDir-Install#hello': No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
gmake[1]: *** [test-1036-Makefile:895: config] Error 255
gmake[1]: Leaving directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
# Looks like your test exited with 2 just after 8.
t/10_makefile.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 14/22 subtests
t/11_dotfile.t ......... 1/9 Error running gmake -f test-9160-Makefile: ?=512 ret=gmake[1]: Entering directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Cannot copy 't\share#hello' to 'tlib-9160/lib\auto\share\dist\File-ShareDir-Install#hello': No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
cp t\share\honk tlib-9160/lib\auto\share\dist\File-ShareDir-Install\honk
cp t\share\hello world tlib-9160/lib\auto\share\dist\File-ShareDir-Install\hello world
cp t\share\.something tlib-9160/lib\auto\share\dist\File-ShareDir-Install\.something
gmake[1]: *** [test-9160-Makefile:895: config] Error 255
gmake[1]: Leaving directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
# Looks like your test exited with 2 just after 5.
t/11_dotfile.t ......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/9 subtests
t/12_delete.t .......... 1/7 Error running gmake -f test-5836-Makefile: ?=512 ret=gmake[1]: Entering directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Cannot copy 't\share#hello' to 'tlib-5836/lib\auto\share\dist\File-ShareDir-Install#hello': No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
cp t\share\hello world tlib-5836/lib\auto\share\dist\File-ShareDir-Install\hello world
cp t\share\honk tlib-5836/lib\auto\share\dist\File-ShareDir-Install\honk
gmake[1]: *** [test-5836-Makefile:895: config] Error 255
gmake[1]: Leaving directory 'C:/Users/zdm/AppData/Local/Temp/.cpanm/work/1524535486.812/File-ShareDir-Install-0.13'
# Looks like your test exited with 2 just after 4.
t/12_delete.t .......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 3/7 subtests
t/00-report-prereqs.t .. #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.34
#
# === Build Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.34
#
# === Test Requires ===
#
#     Module              Want     Have
#     ------------------- ---- --------
#     ExtUtils::MakeMaker  any     7.34
#     File::Path           any     2.15
#     File::Spec           any     3.74
#     Test::More           any 1.302136
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module     Want Have
#     ---------- ---- ----
#     Carp        any 1.42
#     Exporter    any 5.72
#     File::Spec  any 3.74
#     IO::Dir     any 1.39
#     strict      any 1.11
#     warnings    any 1.37
#
# === Other Modules ===
#
#     Module           Have
#     ------------- -------
#     Encode           2.98
#     JSON::PP      2.97001
#     Pod::Coverage    0.23
#     Sub::Name        0.21
#     YAML             1.24
#     autodie          2.29
#
t/00-report-prereqs.t .. ok

Test Summary Report
-------------------
t/10_makefile.t      (Wstat: 512 Tests: 8 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 22 tests but ran 8.
t/11_dotfile.t       (Wstat: 512 Tests: 5 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 9 tests but ran 5.
t/12_delete.t        (Wstat: 512 Tests: 4 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 7 tests but ran 4.
Files=4, Tests=18,  5 wallclock secs ( 0.06 usr +  0.02 sys =  0.08 CPU)
Result: FAIL
Failed 3/4 test programs. 0/18 subtests failed.
gmake: *** [Makefile:870: test_dynamic] Error 255
FAIL
! Installing File::ShareDir::Install failed. See C:\Users\zdm\AppData\Local\Temp\.cpanm\work\1524535486.812\build.log for details. Retry with --force to force install it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.