diff --git a/ChangeLog b/ChangeLog index c3a35e0fb4..d91314e253 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2013-01-15 release 5.0.0 - Core + Remove duplicate library search path entries, move "." from the beginning to - the end. [GH 368] + the end. [GH #368] + Install forgotten runtime include files: cloneflags.pasm packfile_annotation_keytype.pasm @@ -13,10 +13,12 @@ YAML/Dumper/Base.pbc, YAML/Dumper/Default.pbc + New experimental PARROT_DYNEXT environment variable + New experimental dynext_dirs config entry (same as PARROT_DYNEXT and -X) + + Add OS error messages to FileHandle.open() error messages [GH #911] - Build + Generate MANIFEST.generated, cleanup MANIFEST, removed MANIFEST_configure.generated, add installation of forgotten files [GH #890] + + Generate datadir/MANIFEST* for all installed files [GH #899] + Improved Configure.pl probes for --with-llvm + Replace / slashes with \ on windows for all Makefiles automatically. This improves cygwin interaction, like remote or cronjob smoking on windows. @@ -26,6 +28,7 @@ - Documentation + Re-added docs/ops, the generated ops summary and docs/packfile-c.pod + Improved pdd10_embedding + + Document FileHandle.open() exceptions and error messages - Tests + Added t/library/lib_search_path.t diff --git a/Configure.pl b/Configure.pl index f12958d513..b673372fe7 100644 --- a/Configure.pl +++ b/Configure.pl @@ -79,7 +79,19 @@ # Log files created by Configure.pl in MANIFEST.generated $conf->{active_configuration} = 1; + +# Create a fresh MANIFEST for make install unlink 'MANIFEST.generated'; +if (do 'lib/Parrot/Config/Generated.pm') { + my $make = $Parrot::Config::Generated::PConfig{make}; + if ($make and -f 'Makefile') { + $Parrot::Config::Generated::PConfig{gmake_version} + ? system ($make, '-s', 'clean') : system ($make, 'clean'); + } +} +elsif (-f 'Makefile' and $^O =~ /(linux|darwin)/) { + system ('make', '-s', 'clean'); +} # Run the actual steps from Parrot::Configure $conf->runsteps or exit(1); diff --git a/api.yaml b/api.yaml index 38d86ec5d7..6750d62e54 100644 --- a/api.yaml +++ b/api.yaml @@ -649,3 +649,11 @@ - 'library' - 'experimental' ticket: 'https://github.com/parrot/parrot/issues/302' +- + name : 'Socket.read(nb) with nb > 512' + eligible : '4.8' + note : + The Socket .read method with an nb argument greater than the current SO_RCVBUF buffer size (typically 512) will since 4.8 behave like POSIX read() and recv(), returning only up to nb bytes. You need to loop until the wanted number of bytes is received. + tags : + - api + ticket : 'https://github.com/parrot/parrot/issues/909' diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 9275febc83..937564a922 100644 --- a/config/gen/makefiles/root.in +++ b/config/gen/makefiles/root.in @@ -1012,7 +1012,6 @@ src/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl install_config.fpmc : myconfig config_lib.pir $(PARROT) @echo "Invoking Parrot to generate install_config.fpmc" $(PARROT) config_lib.pir --install > $@ - $(ADDGENERATED) "install_config$(O)" "[main]" lib $(ADDGENERATED) "$@" "[main]" lib src/parrot_config$(O) : \ @@ -3133,6 +3132,7 @@ install-bin: installable docs --libdir=$(LIB_DIR) \ --includedir=$(INCLUDE_DIR) \ --destdir=$(DESTDIR) \ + --datadir=$(DATA_DIR) \ --docdir=$(DOC_DIR) \ --mandir=$(MAN_DIR) \ --versiondir=$(VERSION_DIR) \ @@ -3161,6 +3161,7 @@ install-doc: docs --docdir=$(DOC_DIR) \ --mandir=$(MAN_DIR) \ --destdir=$(DESTDIR) \ + --datadir=$(DATA_DIR) \ --versiondir=$(VERSION_DIR) \ MANIFEST MANIFEST.generated diff --git a/docs/deprecations/deprecations.pod b/docs/deprecations/deprecations.pod index 343d53b532..beb1c231a9 100644 --- a/docs/deprecations/deprecations.pod +++ b/docs/deprecations/deprecations.pod @@ -37,11 +37,13 @@ For instructions on how to deprecate Parrot code, please see: Moved "." in the library search paths from the beginning to the end. -- low impact expected: - load_bytecode and .include and load_language might load now different files, +- high impact expected: + build systems need to change their build and tests to favor their new libraries + over already installed ones, to use absolute paths or add -L./ -X./. + load_bytecode, .include and load_language might load now different files, if they exist in "./" AND in the proper library location. - To keep the old behavior set the environment variables PARROT_INCLUDE - and PARROT_LIBRARY to "./" + To keep the old behavior use parrot -L./ -X./ or set the environment variables + PARROT_INCLUDE and PARROT_LIBRARY to "./" =back diff --git a/lib/Parrot/Docs/Section/Tests.pm b/lib/Parrot/Docs/Section/Tests.pm index 6236672919..03c9c53c62 100644 --- a/lib/Parrot/Docs/Section/Tests.pm +++ b/lib/Parrot/Docs/Section/Tests.pm @@ -47,10 +47,10 @@ sub new { $self->new_group( 'Examples Tests', '', 't/examples' ), $self->new_group( 'Libraries Tests', '', 't/library' ), $self->new_group( 'Native Bytecode Tests', '', 't/native_pbc' ), - $self->new_group( 'Ops Tests', '', 't/op', 't/dynoplibs' ), - $self->new_group( 'PMC Tests', '', 't/pmc', 't/dynpmc' ), - $self->new_group( 'C Source Code Tests', '', 't/src' ), - $self->new_group( 'Stress Tests', '', 't/stress' ), + $self->new_group( 'Ops Tests', '', 't/op', 't/dynoplibs' ), + $self->new_group( 'PMC Tests', '', 't/pmc', 't/dynpmc' ), + $self->new_group( 'C Source Code Tests', '', 't/src' ), + $self->new_group( 'Stress Tests', '', 't/stress' ), ); } diff --git a/lib/Parrot/Install.pm b/lib/Parrot/Install.pm index cd79a0bbdd..769232ba15 100644 --- a/lib/Parrot/Install.pm +++ b/lib/Parrot/Install.pm @@ -1,5 +1,5 @@ package Parrot::Install; -# Copyright (C) 2001-2009, Parrot Foundation. +# Copyright (C) 2001-2013, Parrot Foundation. use strict; use warnings; use File::Basename qw( dirname ); @@ -12,6 +12,9 @@ our @EXPORT_OK = qw( create_directories install_files ); +use lib 'lib'; +use Parrot::Config; +use Parrot::BuildUtil; #################### DOCUMENTATION #################### @@ -29,10 +32,10 @@ Parrot::Install - Functionality for installation programs =head1 DESCRIPTION -This module exports on demand only three subroutines used in the Parrot +This module exports on demand some subroutines used in the Parrot installation programs F and -F. The subroutines are tested by tests found -in F. +F. +The subroutines are tested by tests found in F. =head1 SUBROUTINES @@ -185,6 +188,86 @@ sub create_directories { return 1; } +=head2 C + +Check if the generated F contains some typically +needed files. Dies if not ok. + +If you update your repo and rebuild parrot without perl Configure.PL +which deletes MANIFEST.generated anew, MANIFEST.generated might not +contain already up-to-date targets, thus not creating the required +MANIFEST.generated lines. + +TODO: Keep a manual list of all to be installed files, merge it with +MANIFEST.generated and die if a file in the merged list does not exist, +i.e. cannot be installed. + +=cut + +sub _check_manifest { + my ($file,$gen) = @_; + my $manifest = $_[2]; + my $fname = "MANIFEST.generated"; + unless ($manifest =~ /^\Q$file\E/m) { + if ($^O eq 'MSWin32') { # Windows has mixed paths + $file =~ s{/}{\\}g; + return if $manifest =~ /^\Q$file\E/m; + } + if ($gen) { + die "Error: configure generated $file missing in $fname.\n" + . "make reconfig before make install.\n"; + } + else { + die "Error: make generated $file missing in $fname.\n" + . "make clean before make install.\n"; + } + } +} + +sub sanitycheck_install { + my $fname = "MANIFEST.generated"; + my $manifest = Parrot::BuildUtil::slurp_file($fname); + die "$fname not found.\n" unless $manifest; + # configure generated + _check_manifest($_, 1, $manifest) for qw( + lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm + include/parrot/config.h + include/parrot/pbcversion.h + include/parrot/vtable.h + include/parrot/core_pmcs.h + lib/Parrot/PMC.pm + myconfig + lib/Parrot/Config/Generated.pm + runtime/parrot/library/config.pir + ); + # make generated + my @MAKE_gen = qw( + vtable.dump + include/parrot/extend_vtable.h + runtime/parrot/include/datatypes.pasm + runtime/parrot/library/Test/More.pbc + compilers/tge/TGE/Parser.pir + runtime/parrot/library/P6Regex.pbc + runtime/parrot/languages/winxed/winxed.pbc + runtime/parrot/library/nqp-setting.pbc + runtime/parrot/library/config.pbc + runtime/parrot/library/opsc.pbc + install_config.fpmc + runtime/parrot/library/pcre.pbc + runtime/parrot/library/PCT/Grammar.pbc + ); + my @dynext = qw(dynlexpad os file rational subproxy); + push @dynext, map {$_."_ops"} qw(bit io sys obscure math trans debug); + push @dynext, "select" if $^O !~ /^(MSWin32|msys)$/; + push @dynext, "gziphandle" if $PConfig{has_zlib}; + push @MAKE_gen, "src/install_config".$PConfig{o}; + push @MAKE_gen, map { "runtime/parrot/dynext/".$_.$PConfig{load_ext} } @dynext; + push @MAKE_gen, map { "installable_".$_.$PConfig{exe} } + qw(parrot pbc_dump pbc_disassemble parrot_config pbc_merge + pbc_to_exe parrot_nci_thunk_gen ops2c winxed); + _check_manifest($_, 0, $manifest) for @MAKE_gen; +} + =head2 C B Install the mentioned files into the appropriate locations. @@ -200,16 +283,26 @@ list consisting of hashes. B True value. -B +B Adds all installed files to datadir/parrotdir/MANIFEST =cut sub install_files { - my($destdir, $dryrun, $files) = @_; - my($src, $dest, $mode); + my ($options, $type, $files) = @_; + ref($options) eq 'HASH' or die "Error: parameter \$options must be a hashref\n"; - ref($files) eq 'ARRAY' or die "Error: parameter \$files must be an array\n"; + my ($destdir, $datadir, $versiondir, $dryrun) = + @$options{qw(destdir datadir versiondir dryrun)}; + ref($files) eq 'ARRAY' or die "Error: parameter \$files must be an arrayref\n"; + + my ($src, $dest, $mode, $manifest); print("Installing ...\n"); + if (!$dryrun) { + my $destdatadir= File::Spec->catdir( $destdir, $datadir, $versiondir); + my $fname = File::Spec->catdir( $destdatadir, "MANIFEST" . ($type ? ".".$type : '') ); + open $manifest, ">", $fname or die "Could not create $fname\n"; + print "$fname\n"; + } foreach my $el ( @$files ) { unless(ref($el) eq 'HASH') { my($ref) = ref($el); @@ -237,16 +330,19 @@ sub install_files { # this loop if (-e $dest) { print "$dest\n"; + print $manifest "$dest\n" unless $dryrun; next; } } } cp( $src, $dest ) or die "Error: couldn't copy $src to $dest: $!\n"; print "$dest\n"; + print $manifest "$dest\n" unless $dryrun; } $mode = ( stat($src) )[2]; chmod $mode, $dest; } + close $manifest unless $dryrun; return 1; } diff --git a/src/io/filehandle.c b/src/io/filehandle.c index abb01c9f8d..8167f3a173 100644 --- a/src/io/filehandle.c +++ b/src/io/filehandle.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2001-2012, Parrot Foundation. +Copyright (C) 2001-2013, Parrot Foundation. =head1 NAME @@ -469,9 +469,14 @@ io_filehandle_open(PARROT_INTERP, ARGMOD(PMC *handle), ARGIN(STRING *path), INTV os_handle = Parrot_io_internal_open(interp, path, flags); - if (os_handle == PIO_INVALID_HANDLE) - Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR, - "Unable to open filehandle from path '%Ss'", path); + if (os_handle == PIO_INVALID_HANDLE) { + if (errno) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR, + "Unable to open filehandle from path '%Ss': %s(%d)", path, strerror(errno), errno); + else + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR, + "Unable to open filehandle from path '%Ss'", path); + } /* Set generic flag here if is a terminal then * FileHandle can know how to setup buffering. diff --git a/src/nci_test.c b/src/nci_test.c index 857ca1c9fc..1e9767dec0 100644 --- a/src/nci_test.c +++ b/src/nci_test.c @@ -126,25 +126,17 @@ typedef void (*cb_D4_func)(void*, void*); PARROT_DYNEXT_EXPORT void nci_cb_D4(cb_D4_func, void*); /* Variable definitions */ - -PARROT_DYNEXT_EXPORT int int_cb_D4; -PARROT_DYNEXT_EXPORT int nci_dlvar_char; -PARROT_DYNEXT_EXPORT int nci_dlvar_short; -PARROT_DYNEXT_EXPORT int nci_dlvar_int; -PARROT_DYNEXT_EXPORT long nci_dlvar_long; -PARROT_DYNEXT_EXPORT float nci_dlvar_float; -PARROT_DYNEXT_EXPORT double nci_dlvar_double; -PARROT_DYNEXT_EXPORT char nci_dlvar_cstring[]; - -int int_cb_D4 = -55555; -int nci_dlvar_char = 22; -int nci_dlvar_short = 333; -int nci_dlvar_int = -4444; -long nci_dlvar_long = -7777777; -float nci_dlvar_float = -333.0; -double nci_dlvar_double = -55555.55555; -char nci_dlvar_cstring[] = "This is a C-string.\n"; - +/* Note that PARROT_DATA (i.e. extern) or static will not work with + our nci test. We want only one symbol, exported as visible. + */ +PARROT_DYNEXT_EXPORT int int_cb_D4 = -55555; +PARROT_DYNEXT_EXPORT int nci_dlvar_char = 22; +PARROT_DYNEXT_EXPORT int nci_dlvar_short = 333; +PARROT_DYNEXT_EXPORT int nci_dlvar_int = -4444; +PARROT_DYNEXT_EXPORT long nci_dlvar_long = -7777777; +PARROT_DYNEXT_EXPORT float nci_dlvar_float = -333.0; +PARROT_DYNEXT_EXPORT double nci_dlvar_double = -55555.55555; +PARROT_DYNEXT_EXPORT char nci_dlvar_cstring[] = "This is a C-string.\n"; /* Function definitions */ diff --git a/src/pmc/filehandle.pmc b/src/pmc/filehandle.pmc index 0ab2356f28..731a671e98 100644 --- a/src/pmc/filehandle.pmc +++ b/src/pmc/filehandle.pmc @@ -1,5 +1,5 @@ /* -Copyright (C) 2008-2011, Parrot Foundation. +Copyright (C) 2008-2013, Parrot Foundation. =head1 NAME @@ -249,6 +249,30 @@ invocant is modified and becomes an open filehandle. A copy of the invocant is also returned by the method (some subclasses may create this as the primary filehandle, rather than modifying the invocant). +Exceptions: + +EXCEPTION_PIO_ERROR with the following messages: + +Empty filename + + "Cannot open FileHandle, no path" + +Already open filehandle + + "Cannot reopen already open FileHandle" + +Invalid handle, no errno as with ISDIR: + + "Unable to open filehandle from path '$path'" + +Invalid handle (fd < 0), or other error: + + "Unable to open filehandle from path '$path': $strerror($errno)" + +EXCEPTION_INVALID_OPERATION with: + + "Invalid mode for file open" + =cut */ @@ -259,7 +283,7 @@ filehandle, rather than modifying the invocant). if (!Parrot_io_is_closed(INTERP, SELF)) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_PIO_ERROR, - "Cannot reopen already open filehandle"); + "Cannot reopen already open FileHandle"); if (!got_mode || STRING_IS_NULL(mode)) GET_ATTR_mode(INTERP, SELF, mode); diff --git a/src/pmc/socket.pmc b/src/pmc/socket.pmc index 03cd05b628..6c7aeafa14 100644 --- a/src/pmc/socket.pmc +++ b/src/pmc/socket.pmc @@ -1,5 +1,5 @@ /* -Copyright (C) 2008-2012, Parrot Foundation. +Copyright (C) 2008-2013, Parrot Foundation. =head1 NAME @@ -316,6 +316,9 @@ argument, and only returns a status object. When the recv operation is complete, it invokes the callback, passing it a status object and a string containing the received message. +If the socket is closed or on other errors, it throws an .EXCEPTION_PIO_ERROR +Exception. + =cut */ @@ -415,10 +418,20 @@ but continues to send new connection events until the socket is closed.] =item C -Read the given number of bytes from the socket and return them in a string. +Read up to the given number of bytes from the socket and return them in a string. + +This method behaves always the same as recv(). Only if the socket is already closed +return an empty string. =cut +TODO: add setsockopt(level, option, value) for the pre-parrot 4.10 behavior, to receive larger buffers. + +The receive low-water mark (the SO_RCVLOWAT setsockopt option) determines the minimum amount of data +that must be received before the read function is completed. If the read function times out, any +data that was received is returned to the application even if the amount of data received is less +than the receive low-water mark value. + */ METHOD read(INTVAL nb) { diff --git a/t/pmc/filehandle.t b/t/pmc/filehandle.t index 1bba507114..56328fc37a 100644 --- a/t/pmc/filehandle.t +++ b/t/pmc/filehandle.t @@ -1,5 +1,5 @@ #!perl -# Copyright (C) 2006-2011, Parrot Foundation. +# Copyright (C) 2006-2013, Parrot Foundation. use strict; use warnings; @@ -137,11 +137,34 @@ pir_output_is( <<'CODE', <<'OUT', 'wrong open' ); finalize eh reportreopen: say i + + i = 0 + set_label eh, catchother + fh.'open'('noREADME.pod') + goto reportother + catchother: + i = 1 + finalize eh + reportother: + say i + + i = 0 + set_label eh, catchdir + fh.'open'('t') + goto reportdir + catchdir: + i = 1 + finalize eh + reportdir: + say i + pop_eh .end CODE 1 1 +1 +1 OUT pir_output_is( <<'CODE', <<'OUT', 'isatty' ); diff --git a/t/pmc/socket.t b/t/pmc/socket.t index 791fc09e66..ee1d77074f 100644 --- a/t/pmc/socket.t +++ b/t/pmc/socket.t @@ -1,5 +1,5 @@ #!./parrot -# Copyright (C) 2006-2011, Parrot Foundation. +# Copyright (C) 2006-2013, Parrot Foundation. =head1 NAME @@ -24,7 +24,7 @@ stack, so we don't need to check if this parrot is IPv6-aware. .sub main :main .include 'test_more.pir' - plan(23) + plan(25) test_init() test_get_fd() @@ -196,8 +196,30 @@ CODE is(status, '12', 'send') str = sock.'recv'() is(str, 'test message', 'recv') - sock.'close'() + .local int i, len, oldlen, readlen + i = 0 + loop: + str = concat str, "a" + i = i + 1 + if i < 2048 goto loop + oldlen = length str + status = sock.'send'(str) + is(status, oldlen, 'send() big') + str = "" + .local string tmpstr + loop1: + tmpstr = sock.'read'(1024) + readlen = length tmpstr + str = concat str, tmpstr + len = length str + # diag(len) + if len == 0 goto bigger + if len < oldlen goto loop1 + bigger: + is(len, oldlen, 'read(1024) chunked') + + sock.'close'() server.'close'() status = server.'exit_status'() nok(status, 'Exit status of server process') diff --git a/t/tools/install/02-install_files.t b/t/tools/install/02-install_files.t index 622f8b32e9..33c47dbdd6 100644 --- a/t/tools/install/02-install_files.t +++ b/t/tools/install/02-install_files.t @@ -1,11 +1,11 @@ #! perl -# Copyright (C) 2007, Parrot Foundation. +# Copyright (C) 2007-2013, Parrot Foundation. # 02-install_files.t use strict; use warnings; -use Test::More tests => 18; +use Test::More tests => 19; use Carp; use Cwd; use File::Copy; @@ -29,10 +29,29 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); + eval { + capture( + sub { $rv = install_files("destdir", 1); }, + \$stdout, + \$stderr, + ); + }; + like($@, qr/Error: parameter \$options must be a hashref/s, "Catches non-HASH \$options"); + } +} +{ + my $tdir = tempdir( CLEANUP => 1 ); + $tdir .= '/'; + + my @dirs = qw(foo/bar foo/bar/baz); + create_directories($tdir, { map { $_ => 1 } @dirs }); + + { + my ( $stdout, $stderr, $rv ); eval { capture( - sub { $rv = install_files($tdir, 1); }, + sub { $rv = install_files({}); }, \$stdout, \$stderr, ); @@ -53,11 +72,13 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); - capture( - sub { $rv = install_files($tdir, 0, $files_ref); }, - \$stdout, - \$stderr, - ); + eval { + capture( + sub { $rv = install_files({dryrun=>1}, '', $files_ref); }, + \$stdout, + \$stderr, + ); + }; like($stderr, qr/Bad reference passed in \$files/, "Catches non-HASH files"); like( $stdout, qr/Installing \.\.\./, @@ -81,7 +102,7 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; my ( $stdout, $stderr, $rv ); capture( - sub { $rv = install_files($tdir, 1, $files_ref); }, + sub { $rv = install_files({dryrun=>1},'',$files_ref); }, \$stdout, \$stderr, ); @@ -101,7 +122,7 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); capture( - sub { $rv = install_files($tdir, 0, $files_ref); }, + sub { $rv = install_files({destdir=>$tdir, dryrun=>0}, '', $files_ref); }, \$stdout, \$stderr, ); @@ -146,7 +167,7 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); capture( - sub { $rv = install_files($tdir, 0, $files_ref); }, + sub { $rv = install_files({destdir=>$tdir, dryrun=>0}, '', $files_ref); }, \$stdout, \$stderr, ); @@ -196,7 +217,7 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); capture( - sub { $rv = install_files($tdir, 0, $files_ref); }, + sub { $rv = install_files({destdir=>$tdir, dryrun=>0}, '', $files_ref); }, \$stdout, \$stderr, ); @@ -234,7 +255,7 @@ my $testsourcedir = qq{$cwd/t/tools/install/testlib}; { my ( $stdout, $stderr, $rv ); capture( - sub { $rv = install_files($tdir, 0, $files_ref); }, + sub { $rv = install_files({destdir=>$tdir, dryrun=>0}, '', $files_ref); }, \$stdout, \$stderr, ); diff --git a/tools/dev/install_dev_files.pl b/tools/dev/install_dev_files.pl index a7ac4dd955..4704d13892 100755 --- a/tools/dev/install_dev_files.pl +++ b/tools/dev/install_dev_files.pl @@ -1,6 +1,6 @@ #! perl ################################################################################ -# Copyright (C) 2001-2009, Parrot Foundation. +# Copyright (C) 2001-2013, Parrot Foundation. ################################################################################ =head1 TITLE @@ -43,6 +43,14 @@ =head2 Options The header directory. Defaults to '/usr/include'. +=item C + +The data directory. Defaults to '/usr/share'. + +=item C + +The src directory. Defaults to '/usr/src'. + =back =head1 SEE ALSO @@ -93,6 +101,7 @@ =head1 SEE ALSO } my $parrotdir = $options{versiondir}; +Parrot::Install::sanitycheck_install(); # GH #910 # Set up transforms on filenames my(@transformorder) = (qw(lib share include bin src doc), '^(tools|VERSION)', '^compilers'); @@ -182,9 +191,10 @@ =head1 SEE ALSO ); unless ( $options{'dry-run'} ) { + $directories->{File::Spec->catdir( $options{datadir}, $parrotdir)} = 1; create_directories($options{destdir}, $directories); } -install_files($options{destdir}, $options{'dry-run'}, $filehashes); +install_files(\%options, 'dev', $filehashes); print "Finished install_dev_files.pl\n"; diff --git a/tools/dev/install_doc_files.pl b/tools/dev/install_doc_files.pl index e53ca91128..823e0d478c 100755 --- a/tools/dev/install_doc_files.pl +++ b/tools/dev/install_doc_files.pl @@ -1,6 +1,6 @@ #! perl ################################################################################ -# Copyright (C) 2001-2009, Parrot Foundation. +# Copyright (C) 2001-2013, Parrot Foundation. ################################################################################ =head1 TITLE @@ -47,6 +47,10 @@ =head2 Options The man directory. Defaults to '/usr/share/man'. +=item C + +The data directory. Defaults to '/usr/share'. + =back =head1 SEE ALSO @@ -81,7 +85,6 @@ =head1 SEE ALSO docdir => '/usr/share/doc', # parrot/ subdir added below datadir => '/usr/share/', # parrot/ subdir added below mandir => '/usr/share/man', - srcdir => '/usr/src/', # parrot/ subdir added below versiondir => '', 'dry-run' => 0, packages => 'doc|examples', @@ -137,9 +140,10 @@ =head1 SEE ALSO ); unless ( $options{'dry-run'} ) { + $directories->{File::Spec->catdir( $options{datadir}, $parrotdir)} = 1; create_directories($options{destdir}, $directories); } -install_files($options{destdir}, $options{'dry-run'}, $filehashes); +install_files(\%options, 'doc', $filehashes); print "Finished install_doc_files.pl\n"; diff --git a/tools/dev/install_files.pl b/tools/dev/install_files.pl index b3717f84cd..b0f2fa8b33 100755 --- a/tools/dev/install_files.pl +++ b/tools/dev/install_files.pl @@ -1,6 +1,6 @@ #! perl ################################################################################ -# Copyright (C) 2001-2009, Parrot Foundation. +# Copyright (C) 2001-2013, Parrot Foundation. ################################################################################ =head1 NAME @@ -47,6 +47,10 @@ =head2 Options The man directory. Defaults to '/usr/share/man'. +=item C + +The data directory. Defaults to '/usr/share'. + =back =head1 SEE ALSO @@ -80,6 +84,7 @@ =head1 SEE ALSO includedir => '/usr/include', # parrot/ subdir added below docdir => '/usr/share/doc', # parrot/ subdir added below mandir => '/usr/share/man', # man1/ subdir added below + datadir => '/usr/share/', # parrot/ subdir added below versiondir => '', 'dry-run' => 0, packages => 'main|library|pge', @@ -96,6 +101,7 @@ =head1 SEE ALSO } my $parrotdir = $options{versiondir}; +Parrot::Install::sanitycheck_install(); # GH #910 # Set up transforms on filenames my(@transformorder) = qw(lib bin include doc man ^compilers); @@ -180,6 +186,7 @@ =head1 SEE ALSO ); unless ( $options{'dry-run'} ) { + $directories->{File::Spec->catdir( $options{datadir}, $parrotdir)} = 1; create_directories($options{destdir}, $directories); } @@ -211,7 +218,7 @@ =head1 SEE ALSO } } -install_files($options{destdir}, $options{'dry-run'}, $filehashes); +install_files(\%options, '', $filehashes); print "Finished install_files.pl\n";