X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=2d42f940f52c8f84c64f8ed6ac97c87786bcf60d;hb=9acb31a971d4f653836bbcf07410f51d3f80dbdd;hp=24772a90efb37c729fead5388573c884d1196798;hpb=5c221b7bacc586d96847e7dcbe53c8cc0a5e2ea9;p=dgit.git diff --git a/dgit b/dgit index 24772a90..2d42f940 100755 --- a/dgit +++ b/dgit @@ -1382,7 +1382,7 @@ sub generate_commit_from_dsc () { my $f = $fi->{Filename}; die "$f ?" if $f =~ m#/|^\.|\.dsc$|\.tmp$#; - link "../../../$f", $f + link_ltarget "../../../$f", $f or $!==&ENOENT or die "$f $!"; @@ -2794,7 +2794,7 @@ END foreach my $f (<../../../../*>) { #/){ my $b=$f; $b =~ s{.*/}{}; next unless is_orig_file $b, srcfn $upstreamversion,''; - link $f, $b or die "$b $!"; + link_ltarget $f, $b or die "$b $!"; $dscaddfile->($b); } @@ -3124,6 +3124,7 @@ sub defvalopt ($$$$) { defvalopt '--since-version', '-v', '[^_]+|_', \$changes_since_version; defvalopt '--distro', '-d', '.+', \$idistro; +defvalopt '', '-k', '.+', \$keyid; defvalopt '--existing-package','', '.*', \$existing_package; defvalopt '--build-products-dir','','.*', \$buildproductsdir; defvalopt '--clean', '', $cleanmode_re, \$cleanmode; @@ -3131,6 +3132,13 @@ defvalopt '--quilt', '', $quilt_modes_re, \$quilt_mode; defvalopt '', '-c', '.*=.*', sub { push @git, '-c', @_; }; +defvalopt '', '-C', '.+', sub { + ($changesfile) = (@_); + if ($changesfile =~ s#^(.*)/##) { + $buildproductsdir = $1; + } +}; + defvalopt '--initiator-tempdir','','.*', sub { ($initiator_tempdir) = (@_); $initiator_tempdir =~ m#^/# or @@ -3153,7 +3161,7 @@ sub parseopts () { my ($what) = @_; @rvalopts = ($_); if (!defined $val) { - badusage "$what needs a value" unless length @ARGV; + badusage "$what needs a value" unless @ARGV; $val = shift @ARGV; push @rvalopts, $val; } @@ -3238,17 +3246,6 @@ sub parseopts () { push @ropts, $&; push @changesopts, $_; $_ = ''; - } elsif (s/^-C(.+)//s) { - push @ropts, $&; - $changesfile = $1; - if ($changesfile =~ s#^(.*)/##) { - $buildproductsdir = $1; - } - } elsif (s/^-k(.+)//s) { - $keyid=$1; - } elsif (m/^-[dCk]$/) { - badusage - "option \`$_' requires an argument (and no space before the argument)"; } elsif (s/^-wn$//s) { push @ropts, $&; $cleanmode = 'none';