summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2012-03-14 01:40:23 +0100
committerAbigail <abigail@abigail.be>2012-03-14 02:40:05 +0100
commit9c259538f794249b4c29c8a9c858250e7c749d92 (patch)
tree48026491a865b23acc584af5633ab9bb17c93376
parenteabcd9c8d7e00e51ae2636e566e70bb210289338 (diff)
downloadperl-9c259538f794249b4c29c8a9c858250e7c749d92.tar.gz
Deal with files in the CUSTOMIZED sections.
-rwxr-xr-xPorting/sync-with-cpan16
1 files changed, 14 insertions, 2 deletions
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan
index 3a1cdcb052..3c9c732f95 100755
--- a/Porting/sync-with-cpan
+++ b/Porting/sync-with-cpan
@@ -15,14 +15,14 @@
# - git rm any files that are gone.
# - Remove the +x bit on files in t/
# - Remove the +x bit on files that don't have in enabled in the current dir
+# - Restore files mentioned in CUSTOMIZED
# - Adds new files to MANIFEST
# - Runs a "make" (assumes a configure has been run)
# - Cleans up
# - Runs tests for the package
# - Runs the porting tests
#
-# TODO: - Restore files from CUSTOMIZED
-# - Delete files from MANIFEST
+# TODO: - Delete files from MANIFEST
# - Update Porting/Maintainers.pl
# - Optional, run a full test suite
# - Handle complicated FILES
@@ -223,6 +223,18 @@ system git => 'add', "$pkg_dir/$_" for @commit;
system git => 'rm', '-f', "$pkg_dir/$_" for @gone;
system chmod => 'a-x', "$pkg_dir/$_" for @de_exec;
+#
+# Restore anything that is customized.
+# We don't really care whether we've deleted the file - since we
+# do a git restore, it's going to be resurrected if necessary.
+#
+if ($$info {CUSTOMIZED}) {
+ say "Restoring customized files";
+ foreach my $file (@{$$info {CUSTOMIZED}}) {
+ system git => "checkout", "$pkg_dir/$file";
+ }
+}
+
chdir "..";
if (@commit) {
say "Fixing MANIFEST";