[dpkg] 59/187: Dpkg::Substvars: Obsolete Source-Version substvar
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository dpkg.
commit 15062f983997ead5b67c47aafbbb52ec9113f9b1
Author: Guillem Jover <guillem at debian.org>
Date: Tue Aug 9 01:58:40 2016 +0200
Dpkg::Substvars: Obsolete Source-Version substvar
Emit an error when the source package uses this substvar.
---
debian/changelog | 2 ++
doc/README.feature-removal-schedule | 18 ++++++++++--------
man/deb-substvars.man | 5 +++--
scripts/Dpkg/Substvars.pm | 18 +++++++++++-------
t/pod-spell.t | 1 +
5 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e21f800..e36f1f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
to be valid. Thanks to David Kalnischkies <david at kalnischkies.de>.
* Add support to dpkg-scanpackages for scanning a single binary file.
Thanks to Javier Serrano Polo <javier at jasp.net>. Closes: #833964
+ * Perl modules:
+ - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
* Packaging:
- Add liblocale-gettext-perl to libdpkg-perl Recommends.
- Wrap and document dependency relationships.
diff --git a/doc/README.feature-removal-schedule b/doc/README.feature-removal-schedule
index b9877fe..7e23f49 100644
--- a/doc/README.feature-removal-schedule
+++ b/doc/README.feature-removal-schedule
@@ -10,14 +10,6 @@ Why:
backwards compatibility but will be removed once all packages have the
debian/source/format file. This is unlikely to happen before 1.17.x.
-What: Source-Version (substvar)
-Status: obsolete
-When: 1.16.x
-Warning: lintian (substvar-source-version-is-deprecated)
-Why:
- The semantics of Source-Version are misleading when applied to binNMUs.
- Should switch to use binary:Version or source:Version substvars.
-
What: --print-installation-architecture (dpkg option)
Status: obsolete
When: 1.15.x
@@ -170,3 +162,13 @@ Why:
.
In addition there's no known users in Debian, so it was deemed safe to remove
the support without a transition.
+
+What: Source-Version (substvar)
+Status: removed
+When: 1.18.11
+Warning: program, lintian (substvar-source-version-is-deprecated)
+Why:
+ The semantics of Source-Version were misleading when applied to binNMUs.
+ Should switch to use binary:Version or source:Version substvars.
+ .
+ The code got changed to emit errors.
diff --git a/man/deb-substvars.man b/man/deb-substvars.man
index c7fb76f..6a0437a 100644
--- a/man/deb-substvars.man
+++ b/man/deb-substvars.man
@@ -108,8 +108,9 @@ for example; since dpkg 1.13.19).
.TP
.B Source\-Version
The source package version (from the changelog file). This variable is now
-\fBdeprecated\fP as its meaning is different from its function, please use
-the \fBsource:Version\fP or \fBbinary:Version\fP as appropriate.
+\fBobsolete\fP and emits an error when used as its meaning is different from
+its function, please use the \fBsource:Version\fP or \fBbinary:Version\fP as
+appropriate.
.TP
.B Installed\-Size
The approximate total size of the package's installed files. This value is
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm
index 0f70507..65e14e1 100644
--- a/scripts/Dpkg/Substvars.pm
+++ b/scripts/Dpkg/Substvars.pm
@@ -19,7 +19,7 @@ package Dpkg::Substvars;
use strict;
use warnings;
-our $VERSION = '1.04';
+our $VERSION = '1.05';
use POSIX qw(:errno_h);
@@ -49,7 +49,7 @@ strings.
use constant {
SUBSTVAR_ATTR_USED => 1,
SUBSTVAR_ATTR_AUTO => 2,
- SUBSTVAR_ATTR_OLD => 4,
+ SUBSTVAR_ATTR_AGED => 4,
};
=head1 METHODS
@@ -244,8 +244,8 @@ sub set_version_substvars {
$self->set('source:Version', $sourceversion, $attr);
$self->set('source:Upstream-Version', $upstreamversion, $attr);
- # XXX: Source-Version is now deprecated, remove in the future.
- $self->set('Source-Version', $binaryversion, $attr | SUBSTVAR_ATTR_OLD);
+ # XXX: Source-Version is now obsolete, remove in 1.19.x.
+ $self->set('Source-Version', $binaryversion, $attr | SUBSTVAR_ATTR_AGED);
}
=item $s->set_arch_substvars()
@@ -296,9 +296,9 @@ sub substvars {
$self->mark_as_used($vn);
$count++;
- if (not $opts{no_warn} and $self->{attr}{$vn} & SUBSTVAR_ATTR_OLD) {
- warning($opts{msg_prefix} .
- g_('deprecated substitution variable ${%s}'), $vn);
+ if ($self->{attr}{$vn} & SUBSTVAR_ATTR_AGED) {
+ error($opts{msg_prefix} .
+ g_('obsolete substitution variable ${%s}'), $vn);
}
} else {
warning($opts{msg_prefix} . g_('unknown substitution variable ${%s}'),
@@ -395,6 +395,10 @@ sub output {
=head1 CHANGES
+=head2 Version 1.05 (dpkg 1.18.11)
+
+Obsolete substvar: Emit an error on Source-Version substvar usage.
+
=head2 Version 1.04 (dpkg 1.18.0)
New method: $s->filter().
diff --git a/t/pod-spell.t b/t/pod-spell.t
index a70fc6f..2b903cb 100644
--- a/t/pod-spell.t
+++ b/t/pod-spell.t
@@ -81,6 +81,7 @@ qa
reportfile
rfc822
sig
+substvar
substvars
unparsed
update-buildflags
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list