File: experimental_master_patch.diff

package info (click to toggle)
svn-buildpackage 0.6.16etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 260 kB
  • ctags: 42
  • sloc: perl: 1,399; makefile: 76; sh: 26
file content (50 lines) | stat: -rw-r--r-- 2,342 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: svn-buildpackage
===================================================================
--- svn-buildpackage	(Revision 1406)
+++ svn-buildpackage	(Arbeitskopie)
@@ -25,11 +25,12 @@
   --svn-dont-purge   Don't wipe the build directory (default: purge after build)
   --svn-no-links     Don't use file links (default: use where possible)
   --svn-ignore-new   Don't stop on svn conflicts or new/changed files
+  --svn-ignore-master Never use the .master directory
   --svn-verbose      More verbose program output
   --svn-builder CMD  Use CMD as build command instead of dpkg-buildpackage
   --svn-override a=b Override some config variable (comma separated list)
   --svn-move         move package files to .. after successful build
-  --svn-move-to XYZ  move package files to XYZ, implies --svn-move
+  --svn-move-to XYZ  like --svn-move but moves package files to directory XYZ
   --svn-only-tag     Tags the current trunk directory without building
   --svn-tag          Final build: Export && build && tag && dch -i
   --svn-lintian      Run lintian in the build area when done
@@ -46,6 +47,7 @@
 my $opt_dontclean;
 my $opt_dontpurge;
 my $opt_ignnew;
+my $opt_ignmaster;
 my $opt_tag;
 my $opt_only_tag;
 my $opt_lintian;
@@ -64,6 +66,7 @@
    "h|help"                => \$opt_help,
    "svn-verbose"           => \$opt_verbose,
    "svn-ignore-new"        => \$opt_ignnew,
+   "svn-ignore-master"        => \$opt_ignmaster,
    "svn-dont-clean"        => \$opt_dontclean,
    "svn-dont-purge"        => \$opt_dontpurge,
    "svn-only-tag"               => \$opt_only_tag,
@@ -294,10 +297,14 @@
    die "E: Could not find the upstream source file! (should be $origExpect)\n" if(! ($origfile && -e $origfile));
    $mod=rand;
    mkdir "$ba/tmp-$mod";
-   withecho "tar", "zxf", $origfile, "-C", "$ba/tmp-$mod";
+   if($opt_ignmaster || !-e "$bdir.master" || 0!=system("cp", "-la", "$bdir.master", $bdir)) {
+      withecho "tar", "zxf", $origfile, "-C", "$ba/tmp-$mod";
+   }
+
    withecho "mv $ba/tmp-$mod/* $bdir";
    withecho "rm", "-rf", "$ba/tmp-$mod";
    if($opt_nolinks || $opt_ignnew) {
+      # svn export is blind for unregistered new files, but that would remind to run "svn add" on them
       withecho ("svn", "export", $$c{"trunkDir"},"$ba/tmp-$mod");
       withecho "cp", "-af", "$ba/tmp-$mod/.", "$bdir/";
    }