Re: p4

[email protected] ("H.Merijn Brand") Tue, 10 Sep 2002 18:31:52 +0200
Newsgroups perl.perl5.build
Message-ID <[email protected]>
On Tue 10 Sep 2002 17:26, H.Merijn Brand <[email protected]> wrote:
> 
> Actions to do:
> 
> + finish my YAPC talk
> + create a short (perl) script that shows me the unit
>   out of the Configure diff

l1:/pro/3gl/CPAN 127 > diff2unit.pl 17011 17041 17097 17156 17239 17278 17339 17489 17522 17671 17698 17715 17731 17739 17827 17866 17879
Reading Units 528
17011/  1
17011/  2
17041/  1
17097/  1
17156/  1
17239/  1
17278/  1
17278/  2
17339/  1
17489/  1
17489/  2
17489/  3
17522/  1
17671/  1
17671/  2
17671/  3
17671/  4
17671/  5
17671/  6
17671/  7
17698/  1 Extensions.U
17715/  1 d_modfl.U
17715/  2 d_modfl.U
17715/  3
17731/  1
17731/  2
17739/  1 prefix.U
17827/  1 usenm.U
17827/  2
17866/  1
17879/  1 gccvers.U
l1:/pro/3gl/CPAN 128 >

A good start. Andy patched in his meta-doc-patch, the .U files in
metaconfig/dist-3.0at70b [1]

Which files should *I* edit. the files there, or the files in metaconfig/U [2]
and how do the files in [1] promote to [2], and how does p4 know?

I guess that the promotion for [1] to [2] is like rebuilding metaconfig, and I
am to p4 edit the files in 3.0at70b

right?

> + backport the Configure changes
> + modify makedepend to `tag' the units
> + modify makedepend to incorporate Andy's CBU wishes
> + find out how those changes can actually be used :)

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: [email protected]
http://archives.develooper.com/[email protected]/   [email protected]
send smoke reports to: [email protected], QA: http://qa.perl.org
diff2unit.pl (application/perl/x-perl, 1.1 KB)
#!/pro/bin/perl

use strict;
use warnings;

use File::Find;

print STDERR "Reading Units ...";
my %U;
local $/ = undef;
find (sub {
    -f  && m/\.U$/ or return;
    -l and return;
    $File::Find::dir =~ m:^metaconfig/dist-3.0at70: and return; # use 3.0at70b
    if (exists $U{$_}) {
	print STDERR "$File::Find::name\talready found in $U{$_}[0]\n";
	return;
	}
    open my $U, "< $_" or die "$_: $!";
    $U{$_} = [ $File::Find::name, <$U> ];
    }, "metaconfig");
my @U = sort keys %U;
print STDERR "\b\b\b", scalar @U, "\n";

for (@ARGV) {
    s:^(\d+)$:gzcat perl-current-diffs/17000/$1.gz |:;
    }

my $patch_nr = 0;
local $/ = "\n+++";
while (<>) {
    if (m/^Change (\d+) by/) {
	$patch_nr = $1;
	next;
	}
    m:^ perl/Configure\b: or next;
    s:End of Patch\b.*::;

    my $part = 0;
    foreach my $patch (split m:\@\@[-\s\d,+]+\@\@\n:) {
	$patch =~ m:^ perl/Configure\b: and next;
	my $org = join "\n", grep s/^[- ]//, split m/\n/, $patch;
	#print STDERR "Search for:\n--8<---\n$org\n-->8---\n";
	my @units;
	foreach my $U (@U) {
	    index ($U{$U}[1], $org) >= 0 and push @units, $U;
	    }
	printf "%5d/%3d %s\n", $patch_nr, ++$part, join ", ", @units;
	}
    }