X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=1090984aece5bd9bb2053af8e79f523ac2ccee5c;hp=654b3d1d4cc1817d378740cb2a4b3d7870b2221d;hb=37b5c1d305b5b7362e83ea4cbfdab4b9544031d3;hpb=79514d6b2708624a62c0e72c2ff0565682b310bf diff --git a/dgit b/dgit index 654b3d1d..1090984a 100755 --- a/dgit +++ b/dgit @@ -101,7 +101,7 @@ our %forceopts = map { $_=>0 } our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)"); our $suite_re = '[-+.0-9a-z]+'; -our $cleanmode_re = qr{(?: dpkg-source (?: -d )? (?: ,no-check )? +our $cleanmode_re = qr{(?: dpkg-source (?: -d )? (?: ,no-check | ,all-check )? | git | git-ff | check (?: ,ignores )? | none @@ -132,8 +132,8 @@ our (@mergechanges) = qw(mergechanges -f); our (@gbp_build) = (''); our (@gbp_pq) = ('gbp pq'); our (@changesopts) = (''); -our (@pbuilder) = ("sudo -E pbuilder"); -our (@cowbuilder) = ("sudo -E cowbuilder"); +our (@pbuilder) = ("sudo -E pbuilder","--no-source-only-changes"); +our (@cowbuilder) = ("sudo -E cowbuilder","--no-source-only-changes"); our %opts_opt_map = ('dget' => \@dget, # accept for compatibility 'curl' => \@curl, @@ -2197,6 +2197,12 @@ sub check_for_vendor_patches () { __ "(nominal) distro being accessed"); } +sub check_bpd_exists () { + stat $buildproductsdir + or fail f_ "build-products-dir %s is not accessible: %s\n", + $buildproductsdir, $!; +} + sub generate_commits_from_dsc () { # See big comment in fetch_from_archive, below. # See also README.dsc-import. @@ -3062,6 +3068,7 @@ END } sub fetch_from_archive () { + check_bpd_exists(); ensure_setup_existing_tree(); # Ensures that lrref() is what is actually in the archive, one way @@ -3758,10 +3765,13 @@ sub clone ($) { } printdebug "clone main body\n"; - canonicalise_suite(); - my $hasgit = check_for_git(); mkdir $dstdir or fail f_ "create \`%s': %s", $dstdir, $!; changedir $dstdir; + check_bpd_exists(); + + canonicalise_suite(); + my $hasgit = check_for_git(); + runcmd @git, qw(init -q); record_maindir(); setup_new_tree(); @@ -6218,11 +6228,11 @@ sub clean_tree_check_git_wd ($) { my ($message) = @_; return if $cleanmode =~ m{no-check}; return if $patches_applied_dirtily; # yuk - clean_tree_check_git 1, + clean_tree_check_git +($cleanmode !~ m{all-check}), (f_ <