Skip to content

Commit

Permalink
Retire uupacktool.pl. We're not in Kansas^W(Perforce & APC)-land anym…
Browse files Browse the repository at this point in the history
…ore.
  • Loading branch information
nwc10 committed Sep 13, 2009
1 parent ad60556 commit 6e2cec7
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 342 deletions.
17 changes: 5 additions & 12 deletions Cross/Makefile-cross-SH
Original file line number Diff line number Diff line change
Expand Up @@ -945,19 +945,18 @@ printconfig:
.PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
realclean _realcleaner clobber _clobber \
distclean veryclean _verycleaner \
cleanup_unpacked_files unpack_files
distclean veryclean _verycleaner
clean: cleanup_unpacked_files _tidy _mopup
clean: _tidy _mopup
realclean: cleanup_unpacked_files _realcleaner _mopup
realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
-@rm -f Cross/run-* Cross/to-* Cross/from-*
rm -f config.sh cppstdin Policy.sh extras.lst
clobber: cleanup_unpacked_files _realcleaner _mopup _clobber
clobber: _realcleaner _mopup _clobber
distclean: clobber
Expand Down Expand Up @@ -1093,7 +1092,7 @@ makedepend: makedepend.SH config.sh
TESTFILE=TEST
_test_prep: unpack_files
_test_prep:
cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
# Architecture-neutral stuff:
Expand All @@ -1109,12 +1108,6 @@ _test_tty:
_test_notty:
cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS)
unpack_files:
$(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
cleanup_unpacked_files:
-@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
# The second branch is for testing without a tty or controlling terminal,
# see t/op/stat.t
_test:
Expand Down
1 change: 0 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -4539,7 +4539,6 @@ utils/splain.PL Stand-alone version of diagnostics.pm
utils/xsubpp.PL External subroutine preprocessor
uts/sprintf_wrap.c sprintf wrapper for UTS
uts/strtol_wrap.c strtol wrapper for UTS
uupacktool.pl Pack/unpack files to the .packed format
vmesa/Makefile VM/ESA Makefile
vmesa/vmesa.c VM/ESA-specific C code for Perl core
vmesa/vmesaish.h VM/ESA-specific C header for Perl core
Expand Down
19 changes: 6 additions & 13 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -1160,25 +1160,24 @@ printconfig:
.PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
realclean _realcleaner clobber _clobber \
distclean veryclean _verycleaner \
cleanup_unpacked_files unpack_files
distclean veryclean _verycleaner
clean: cleanup_unpacked_files _tidy _mopup
clean: _tidy _mopup
realclean: cleanup_unpacked_files _realcleaner _mopup
realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
-@rm -f Cross/run-* Cross/to-* Cross/from-*
rm -f t/test_state
rm -f config.sh cppstdin Policy.sh extras.lst
clobber: cleanup_unpacked_files _realcleaner _mopup _clobber
clobber: _realcleaner _mopup _clobber
distclean: clobber
# Like distclean but also removes emacs backups and *.orig.
veryclean: cleanup_unpacked_files _verycleaner _mopup _clobber
veryclean: _verycleaner _mopup _clobber
-@rm -f Obsolete Wanted
# Do not 'make _mopup' directly.
Expand Down Expand Up @@ -1309,7 +1308,7 @@ makedepend: makedepend.SH config.sh
TESTFILE=TEST
_test_prep: unpack_files
_test_prep:
cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
# Architecture-neutral stuff:
Expand All @@ -1325,12 +1324,6 @@ _test_tty:
_test_notty:
cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS) $(TEST_FILES)
unpack_files:
$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
cleanup_unpacked_files:
-@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
# The second branch is for testing without a tty or controlling terminal,
# see t/op/stat.t
_test:
Expand Down
43 changes: 0 additions & 43 deletions Porting/add-package.pl
Original file line number Diff line number Diff line change
Expand Up @@ -371,49 +371,6 @@
}
}
### binary files must be encoded!
### XXX use the new 'uupacktool.pl'
{ my $pack = "$Repo/uupacktool.pl";
### pack.pl encodes binary files for us
-e $pack or die "Need $pack to encode binary files!";
### chdir, so uupacktool writes relative files properly
### into it's header...
my $curdir = cwd();
chdir($Repo) or die "Could not chdir to '$Repo': $!";
for my $aref ( \@ModFiles, \@TestFiles, \@BinFiles ) {
for my $file ( @$aref ) {
my $full = -e $file ? $file :
-e "$RelTopDir/$file" ? "$RelTopDir/$file" :
die "Can not find $file in $Repo or $TopDir\n";
if( -f $full && -s _ && -B _ ) {
print "Binary file $file needs encoding\n" if $Verbose;
my $out = $full . '.packed';
### does the file exist already?
### and doesn't have +w
if( -e $out && not -w _ ) {
system("chmod +w $out")
and die "Could not set chmod +w to '$out': $!";
}
### -D to remove the original
system("$^X $pack -D -p $full $out")
and die "Could not encode $full to $out";
$file .= '.packed';
}
}
}
chdir($curdir) or die "Could not chdir back to '$curdir': $!";
}
### update the manifest
{ my $file = $Repo . '/MANIFEST';
my @manifest;
Expand Down
19 changes: 2 additions & 17 deletions pod/perlrepository.pod
Original file line number Diff line number Diff line change
Expand Up @@ -350,24 +350,9 @@ $install_root/lib. If you are unsure about the proper location of a
file that may have gotten copied while building the source
distribution, consult the C<MANIFEST>.

=head2 A note on binary files
=for XXX

Since the patch(1) utility cannot deal with binary files, it's
important that you either avoid the use of binary files in your patch,
generate the files dynamically, or that you encode any binary files
using the F<uupacktool.pl> utility.

Assuming you needed to include a gzip-encoded file for a module's test
suite, you might do this as follows using the F<uupacktool.pl> utility:

$ perl uupacktool.pl -v -p -D lib/Some/Module/t/src/t.gz
Writing lib/Some/Module/t/src/t.gz into lib/Some/Module/t/src/t.gz.packed

This will replace the C<t.gz> file with an encoded counterpart. During
C<make test>, before any tests are run, perl's Makefile will restore
all the C<.packed> files mentioned in the MANIFEST to their original
name. This means that the test suite does not need to be aware of this
packing scheme and will not need to be altered.
What should we recommend about binary files now? Do we need anything?

=head2 Getting your patch accepted

Expand Down
Loading

0 comments on commit 6e2cec7

Please sign in to comment.