Control: tag -1 +patch Quoting Jonas Smedegaard (2022-01-22 21:27:37) > I want the package asterisk to embed 2 sources both from git without any > tags, and added these: > > opts=\ > component=Xamr,\ > mode=git,pgpmode=none,pretty=4.0.%cd,\ > dversionmangle=auto \ > https://github.com/traud/asterisk-amr \ > HEAD checksum > > opts=\ > component=Xcodec2,\ > mode=git,pgpmode=none,pretty=0.0.%cd,\ > dversionmangle=auto \ > https://github.com/traud/asterisk-codec2 \ > HEAD checksum > > But that fails like this: > > fatal: destination path '../asterisk-temporary.2927923.git' already exists > and is not an empty directory.
This patch fixes this issue for me: --- /usr/share/perl5/Devscripts/Uscan/Downloader.pm.orig 2022-01-16 10:45:20.000000000 +0100 +++ /usr/share/perl5/Devscripts/Uscan/Downloader.pm 2022-01-24 12:19:01.720442693 +0100 @@ -87,7 +87,7 @@ default => sub { {} }); sub download ($$$$$$$$) { - my ($self, $url, $fname, $optref, $base, $pkg_dir, $pkg, $mode) = @_; + my ($self, $url, $fname, $optref, $base, $pkg_dir, $pkg, $mode, $gitrepo_dir) = @_; my ($request, $response); $mode ||= $optref->mode; if ($mode eq 'http') { @@ -145,8 +145,7 @@ my $abs_dst = abs_path($dst); my $ver = $2; my $suffix = $3; - my $gitrepo_dir - = "$pkg-temporary.$$.git"; # same as outside of downloader + my ($gitrepo, $gitref) = split /[[:space:]]+/, $url, 2; my $clean = sub { uscan_exec_no_fail('rm', '-fr', $gitrepo_dir); --- /usr/share/perl5/Devscripts/Uscan/WatchLine.pm.orig 2022-01-11 14:35:47.000000000 +0100 +++ /usr/share/perl5/Devscripts/Uscan/WatchLine.pm 2022-01-24 11:51:45.331351053 +0100 @@ -193,8 +193,10 @@ has gitrepo_dir => ( # Working repository used only within uscan. is => 'ro', lazy => 1, - default => sub { - $_[0]->{pkg} . "-temporary.$$.git"; + builder => sub { + $_[0]->{component} + ? $_[0]->{pkg} . "-temporary.$$." . $_[0]->{component} . '.git' + : $_[0]->{pkg} . "-temporary.$$.git"; }); has headers => ( is => 'ro', @@ -1277,6 +1279,7 @@ $self->pkg_dir, $self->pkg, $self->mode, + $self->gitrepo_dir, ); if ($download_available) { dehs_verbose - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature