# New Ticket Created by James Keenan # Please include the string: [perl #43251] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=43251 >
According to its documentation, mk_manifests.pl "...generates a set of F<MANIFEST.*> files that give the final locations in the file system for all the installable files listed in F<MANIFEST> and F<MANIFEST.generated>." The name of this program is close to that of tools/dev/ mk_manifest_and_skip.pl -- confusingly close, IMHO. The patch attached changes the name to be more self-documenting: mk_rpm_manifests.pl. Please review. Thank you very much. kid51
Index: tools/dev/mk_manifests.pl =================================================================== --- tools/dev/mk_manifests.pl (revision 19126) +++ tools/dev/mk_manifests.pl (working copy) @@ -1,131 +0,0 @@ -#! perl -################################################################################ -# Copyright (C) 2001-2003, The Perl Foundation. -# $Id: mk_manifests.pl 14650 2006-09-18 19:20:45Z bernhard $ -################################################################################ - -=head1 TITLE - -tools/dev/mk_manifests.pl - Generate MANIFEST.* files for building RPMs - -=head1 SYNOPSIS - - % perl tools/dev/mk_manifests.pl [options] - -=head1 DESCRIPTION - -This file generates a set of F<MANIFEST.*> files that give the final -locations in the file system for all the installable files listed in -F<MANIFEST> and F<MANIFEST.generated>. - -It does NOT generate the F<MANIFEST> file that F<Configure.pl> checks -and the manifest checks use. - -=head2 Options - -=over 4 - -=item C<buildprefix> - -The build prefix. Defaults to ''. - -=item C<prefix> - -The install prefix. Defaults to '/usr'. - -=item C<exec_prefix> - -The exec prefix. Defaults to '/usr'. - -=item C<bindir> - -The executables directory. Defaults to '/usr/bin'. - -=item C<libdir> - -The library directory. Defaults to '/usr/lib'. - -=item C<includedir> - -The header directory. Defaults to '/usr/include'. - -=back - -=head1 SEE ALSO - -F<install_files.pl> - -=cut - -################################################################################ - -use strict; -use warnings; - -my %options = ( - prefix => '/usr', - exec_prefix => '/usr', - bindir => '/usr/bin', - libdir => '/usr/lib', - includedir => '/usr/include', -); - -my $manifest; -foreach (@ARGV) { - if (/^--([^=]+)=(.*)/) { - $options{$1} = $2; - } - else { - $manifest = $_; - } -} - -my %FILES; # { package => file } [EMAIL PROTECTED] = ($manifest); -while (<>) { - chomp; - my ( $file, $meta, $dest ) = split( /\s+/, $_ ); - $dest ||= $file; - my $generated = $meta =~ s/^\*//; - my ($package) = $meta =~ /^\[(.*?)\]/; - $meta =~ s/^\[(.*?)\]//; - next if $package eq ""; - my %meta; - @meta{ split( /,/, $meta ) } = (); - $meta{$_} = 1 for ( keys %meta ); # Laziness - - my $entry; - - if ( $meta{doc} ) { - $entry = "%doc $dest"; - } - elsif ( $meta{lib} ) { - $entry = "$options{libdir}/$dest"; - } - elsif ( $meta{bin} ) { - $entry = "$options{bindir}/$dest"; - } - elsif ( $meta{include} ) { - $entry = "$options{includedir}/$dest"; - } - else { - $entry = "$options{prefix}/$dest"; - } - - push @{ $FILES{$package} }, $entry; -} - -while ( my ( $package, $files ) = each %FILES ) { - my $manifest = "MANIFEST.$package"; - open( my $MANIFEST, ">", "$manifest" ) or die "create $manifest: $!"; - print $MANIFEST "$_\n" foreach (@$files); - close $MANIFEST; - print "Wrote $manifest\n"; -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/dev/mk_rpm_manifests.pl =================================================================== --- tools/dev/mk_rpm_manifests.pl (revision 19126) +++ tools/dev/mk_rpm_manifests.pl (working copy) @@ -1,16 +1,16 @@ #! perl ################################################################################ # Copyright (C) 2001-2003, The Perl Foundation. -# $Id: mk_manifests.pl 14650 2006-09-18 19:20:45Z bernhard $ +# $Id: mk_rpm_manifests.pl 14650 2006-09-18 19:20:45Z bernhard $ ################################################################################ =head1 TITLE -tools/dev/mk_manifests.pl - Generate MANIFEST.* files for building RPMs +tools/dev/mk_rpm_manifests.pl - Generate MANIFEST.* files for building RPMs =head1 SYNOPSIS - % perl tools/dev/mk_manifests.pl [options] + % perl tools/dev/mk_rpm_manifests.pl [options] =head1 DESCRIPTION Index: MANIFEST =================================================================== --- MANIFEST (revision 19126) +++ MANIFEST (working copy) @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Mon Jun 18 21:58:59 2007 UT +# generated by tools/dev/mk_manifest_and_skip.pl Tue Jun 19 12:35:33 2007 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -13,7 +13,7 @@ Configure.pl [] DEPRECATED.pod [] DEVELOPING [] -LICENSE [main]doc +LICENSE [] MANIFEST [] MANIFEST.SKIP [] MANIFEST.generated [] @@ -3162,6 +3162,7 @@ tools/dev/mk_manifest_and_skip.pl [devel] tools/dev/mk_manifests.pl [devel] tools/dev/mk_native_pbc [devel] +tools/dev/mk_rpm_manifests.pl [devel] tools/dev/nm.pl [devel] tools/dev/ops_not_tested.pl [devel] tools/dev/ops_renum.mak [devel] Index: MANIFEST.SKIP =================================================================== --- MANIFEST.SKIP (revision 19126) +++ MANIFEST.SKIP (working copy) @@ -1,6 +1,6 @@ # ex: set ro: # $Id$ -# generated by tools/dev/mk_manifest_and_skip.pl Mon Jun 18 19:55:28 2007 UT +# generated by tools/dev/mk_manifest_and_skip.pl Tue Jun 19 12:35:33 2007 UT # # This file should contain a transcript of the svn:ignore properties # of the directories in the Parrot subversion repository. (Needed for