Commit d8e81e94 authored by Mattia Rizzolo's avatar Mattia Rizzolo

Merge branch 'salsa-fix-dehs-ignore' of salsa.debian.org:yadd/devscripts

MR: debian/devscripts!101Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parents ed5d9f99 9e062e70
......@@ -14,6 +14,9 @@ devscripts (2.19.3) UNRELEASED; urgency=medium
[ Xavier Guimard ]
* salsa:
+ Slightly improve the documentation. Closes: #919402; MR: !100
* uscan: MR: !101
+ Fix dehs output with components with the "ignore" version.
+ Fix dehs output when "group" is used.
-- Mattia Rizzolo <mattia@debian.org> Sat, 12 Jan 2019 20:41:40 +0100
......
......@@ -368,22 +368,33 @@ sub process_group {
push @new_versions, $line->shared->{common_mangled_newversion}
|| $line->shared->{common_newversion}
|| ();
push @last_versions, $line->shared->{lastversion};
push @last_versions, $line->parse_result->{lastversion};
push @last_debian_mangled_uversions,
$line->shared->{mangled_lastversion};
$line->parse_result->{mangled_lastversion};
}
}
my $last_version = join '+~', @new_versions;
$dehs_tags->{'upstream-version'} = $last_version;
my $new_version = join '+~', @new_versions;
$dehs_tags->{'upstream-version'} = $new_version;
$dehs_tags->{'debian-uversion'} = join('+~', @last_versions)
if (grep { $_ } @last_versions);
$dehs_tags->{'debian-mangled-uversion'} = join '+~',
@last_debian_mangled_uversions
if (grep { $_ } @last_debian_mangled_uversions);
my $mangled_ver
= Dpkg::Version->new("1:" . $dehs_tags->{'debian-uversion'} . "-0",
check => 0);
my $upstream_ver = Dpkg::Version->new("1:$new_version-0", check => 0);
if ($mangled_ver == $upstream_ver) {
$dehs_tags->{'status'} = "up to date";
} elsif ($mangled_ver > $upstream_ver) {
$dehs_tags->{'status'} = "only older package available";
} else {
$dehs_tags->{'status'} = "newer package available";
}
foreach my $line (@{ $self->watchlines }) {
my $path = $line->destfile or next;
my $ver = $line->shared->{common_mangled_newversion};
$path =~ s/\Q$ver\E/$last_version/;
$path =~ s/\Q$ver\E/$new_version/;
print STDERR "mv $line->{destfile} to $path\n";
rename $line->{destfile}, $path;
if ($line->signature_available) {
......
......@@ -1039,9 +1039,9 @@ sub cmp_versions {
= $self->search_result->{newversion};
}
$dehs_tags->{'debian-uversion'} = $self->parse_result->{lastversion};
$dehs_tags->{'debian-mangled-uversion'} = $mangled_lastversion;
$dehs_tags->{'upstream-version'} = $self->search_result->{newversion};
$dehs_tags->{'debian-uversion'} //= $self->parse_result->{lastversion};
$dehs_tags->{'debian-mangled-uversion'} //= $mangled_lastversion;
$dehs_tags->{'upstream-version'} //= $self->search_result->{newversion};
$dehs_tags->{'upstream-url'} //= $self->upstream_url;
my $mangled_ver
......@@ -1081,7 +1081,7 @@ sub cmp_versions {
# be on our system or may not be
uscan_msg " => Newer package available from\n"
. " $self->{upstream_url}";
$dehs_tags->{'status'} = "newer package available";
$dehs_tags->{'status'} //= "newer package available";
$main::found++;
} elsif ($compver eq 'same') {
uscan_verbose "Newest version of $self->{pkg} on remote site is "
......@@ -1094,7 +1094,7 @@ sub cmp_versions {
);
uscan_verbose " => Package is up to date for from\n"
. " $self->{upstream_url}";
$dehs_tags->{'status'} = "up to date";
$dehs_tags->{'status'} //= "up to date";
if ($self->shared->{download} > 1) {
# 2=force-download or 3=overwrite-download
......@@ -1115,7 +1115,7 @@ sub cmp_versions {
);
uscan_verbose " => Only older package available from\n"
. " $self->{upstream_url}";
$dehs_tags->{'status'} = "only older package available";
$dehs_tags->{'status'} //= "only older package available";
if ($self->shared->{download} > 1) {
uscan_verbose " => Forcing download as requested";
$main::found++;
......@@ -1127,7 +1127,7 @@ sub cmp_versions {
uscan_msg "Newest version of $self->{pkg} on remote site is "
. $self->search_result->{newversion}
. ", ignore local version";
$dehs_tags->{'status'} = "package available";
$dehs_tags->{'status'} //= "package available";
$main::found++;
} else { # same/previous -- secondary-tarball or signature-file
uscan_die "strange ... <version> stanza = same/previous "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment