From 75cb2e1817d690a7047d0fc8e9506872b16d6fc2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 22 Mar 2011 23:32:15 +0000 Subject: consistency git-svn-id: svn://tug.org/texlive/trunk@21803 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/libexec/place | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'Master/tlpkg/libexec/place') diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place index 8c932529a9e..6912e6554d8 100755 --- a/Master/tlpkg/libexec/place +++ b/Master/tlpkg/libexec/place @@ -105,7 +105,10 @@ print "\n\f "; &compare_disk_vs_tlpobj ($cooked_master, $tlpnew); &show_tlp_diffs ($tlpnew, %Old); -my @new_build_files = &handle_build_files ($cooked_pkg, $DEST); +# xx add dirs for existing files +# xx need svn cp, too. +my ($new_build_files,$exxisting) = &build_files ($cooked_pkg, $DEST); +my @new_build_files = @$new_build_files; &xchdir ($cooked_pkg); print "place: checking for case-insensitive clashes\n"; @@ -114,7 +117,7 @@ print "\n"; # Figure out removals relative to old package. &xchdir ($cooked_master); -find (\&files, "."); # sets %New (= all files under Master) +find (\&files, "."); # sets %New to all new files under Master foreach $file (sort keys %Old) { my $status = $New{$file} ? "retained" : "removed"; print "* $file\t[$status]\n"; @@ -132,8 +135,9 @@ foreach $file (sort keys %Old) { $dirs{$dname}++; } + -# Copy files. +# Copy in new files. &xchdir ($cooked_pkg); &xsystem ("tar cf - . | (cd $DEST && tar xf - )"); @@ -157,12 +161,19 @@ if (keys %Old == 0) { # new package # this file will often change, so be sure and include it. $dirs{"$M/tlpkg/tlpsrc/$package.tlpsrc"}++; -# print dirs with changed files, for svn commit purposes. -# if other files have been modified in those same dirs, though, this -# won't detect it. It would be better to list exactly the *files* which -# should be committed, but ... lazy. -# -# also write dir list to a separate file, for easy passing to a commit. +# if we have a new directory Build/.../linked_scripts/foo, we +# need the linked_scripts directory itself, too, since the Makefile.am +# should have been changed (by hand). +for my $dir (keys %dirs) { + next unless $dir =~ m,Build/.*/linked_scripts,; + $dir =~ s,/linked_scripts/.*$,/linked_scripts,; + $dirs{$dir}++; +} + +# print dirs with changed files, and write the dir list to a file, for +# passing to svn commit. if other files have been modified in those +# same dirs, though, this won't detect it. It would be better to list +# exactly the *files* which should be committed. # my $dirlist_file = "$tmpfile.dirs"; $DIRLIST = ">$dirlist_file"; @@ -344,9 +355,10 @@ sub show_tlp_diffs { # return list of new files under Build, if any. # do nothing to try to remove files under Build, that doesn't make sense. # -sub handle_build_files { +sub build_files { my ($cooked_pkg, $svn_dest) = @_; - my @ret = (); + my @new_ret = (); + my @existing_ret = (); return unless -d "$cooked_pkg/Build"; die "no Build subdir in $svn_dest?!" if ! -d "$svn_dest/Build"; @@ -362,11 +374,13 @@ sub handle_build_files { my $status = -e $dest_file ? "existing" : "new"; print "* $file\t[$status]\n"; if ($status eq "new") { - push (@ret, $dest_file); + push (@new_ret, $dest_file); + } else { + push (@existing_ret, $dest_file); } } - return @ret; + return (\@new_ret, \@existing_ret); } -- cgit v1.2.3