summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Source/Package.pm8
-rw-r--r--scripts/Dpkg/Source/Package/V1.pm8
-rw-r--r--scripts/Dpkg/Source/Package/V3/Bzr.pm (renamed from scripts/Dpkg/Source/Package/V3/bzr.pm)2
-rw-r--r--scripts/Dpkg/Source/Package/V3/Custom.pm (renamed from scripts/Dpkg/Source/Package/V3/custom.pm)2
-rw-r--r--scripts/Dpkg/Source/Package/V3/Git.pm (renamed from scripts/Dpkg/Source/Package/V3/git.pm)2
-rw-r--r--scripts/Dpkg/Source/Package/V3/Native.pm (renamed from scripts/Dpkg/Source/Package/V3/native.pm)2
-rw-r--r--scripts/Dpkg/Source/Package/V3/Quilt.pm (renamed from scripts/Dpkg/Source/Package/V3/quilt.pm)2
-rw-r--r--scripts/Makefile.am10
-rw-r--r--scripts/po/POTFILES.in10
9 files changed, 26 insertions, 20 deletions
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 3b543afe2..6187db4a2 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -223,9 +223,15 @@ sub upgrade_object_type {
if ($format =~ /^([\d\.]+)(?:\s+\((.*)\))?$/) {
my ($version, $variant, $major, $minor) = ($1, $2, $1, undef);
+
+ if (defined $variant and $variant ne lc $variant) {
+ error(_g("source package format '%s' is not supported: %s"),
+ $format, _g('format variant must be in lowercase'));
+ }
+
$major =~ s/\.[\d\.]+$//;
my $module = "Dpkg::Source::Package::V$major";
- $module .= "::$variant" if defined $variant;
+ $module .= '::' . ucfirst $variant if defined $variant;
eval "require $module; \$minor = \$${module}::CURRENT_MINOR_VERSION;";
$minor //= 0;
if ($update_format) {
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index 596c44e80..61a9f742b 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -30,7 +30,7 @@ use Dpkg::Source::Archive;
use Dpkg::Source::Patch;
use Dpkg::Exit;
use Dpkg::Source::Functions qw(erasedir);
-use Dpkg::Source::Package::V3::native;
+use Dpkg::Source::Package::V3::Native;
use POSIX qw(:errno_h);
use Cwd;
@@ -108,11 +108,11 @@ sub do_extract {
my $native = $difffile ? 0 : 1;
if ($native and ($tarfile =~ /\.orig\.tar\.gz$/)) {
warning(_g('native package with .orig.tar'));
- $native = 0; # V3::native doesn't handle orig.tar
+ $native = 0; # V3::Native doesn't handle orig.tar
}
if ($native) {
- Dpkg::Source::Package::V3::native::do_extract($self, $newdirectory);
+ Dpkg::Source::Package::V3::Native::do_extract($self, $newdirectory);
} else {
my $expectprefix = $newdirectory;
$expectprefix .= '.orig';
@@ -288,7 +288,7 @@ sub do_build {
if ($sourcestyle eq 'n') {
$self->{options}{ARGV} = []; # ensure we have no error
- Dpkg::Source::Package::V3::native::do_build($self, $dir);
+ Dpkg::Source::Package::V3::Native::do_build($self, $dir);
} elsif ($sourcestyle =~ m/[nurUR]/) {
if (stat($tarname)) {
unless ($sourcestyle =~ m/[nUR]/) {
diff --git a/scripts/Dpkg/Source/Package/V3/bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm
index 9bc69f23e..7fb911297 100644
--- a/scripts/Dpkg/Source/Package/V3/bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm
@@ -19,7 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-package Dpkg::Source::Package::V3::bzr;
+package Dpkg::Source::Package::V3::Bzr;
use strict;
use warnings;
diff --git a/scripts/Dpkg/Source/Package/V3/custom.pm b/scripts/Dpkg/Source/Package/V3/Custom.pm
index 475a7cf46..09d4f5cdf 100644
--- a/scripts/Dpkg/Source/Package/V3/custom.pm
+++ b/scripts/Dpkg/Source/Package/V3/Custom.pm
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-package Dpkg::Source::Package::V3::custom;
+package Dpkg::Source::Package::V3::Custom;
use strict;
use warnings;
diff --git a/scripts/Dpkg/Source/Package/V3/git.pm b/scripts/Dpkg/Source/Package/V3/Git.pm
index 5bb83ed3c..db69f50c0 100644
--- a/scripts/Dpkg/Source/Package/V3/git.pm
+++ b/scripts/Dpkg/Source/Package/V3/Git.pm
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-package Dpkg::Source::Package::V3::git;
+package Dpkg::Source::Package::V3::Git;
use strict;
use warnings;
diff --git a/scripts/Dpkg/Source/Package/V3/native.pm b/scripts/Dpkg/Source/Package/V3/Native.pm
index de706f39a..8dcd3866a 100644
--- a/scripts/Dpkg/Source/Package/V3/native.pm
+++ b/scripts/Dpkg/Source/Package/V3/Native.pm
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-package Dpkg::Source::Package::V3::native;
+package Dpkg::Source::Package::V3::Native;
use strict;
use warnings;
diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm
index a2843dd3e..6370ae728 100644
--- a/scripts/Dpkg/Source/Package/V3/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-package Dpkg::Source::Package::V3::quilt;
+package Dpkg::Source::Package::V3::Quilt;
use strict;
use warnings;
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 9d1f3f2bb..0cec3540a 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -94,11 +94,11 @@ nobase_dist_perllib_DATA = \
Dpkg/Source/Package.pm \
Dpkg/Source/Package/V1.pm \
Dpkg/Source/Package/V2.pm \
- Dpkg/Source/Package/V3/bzr.pm \
- Dpkg/Source/Package/V3/custom.pm \
- Dpkg/Source/Package/V3/native.pm \
- Dpkg/Source/Package/V3/git.pm \
- Dpkg/Source/Package/V3/quilt.pm \
+ Dpkg/Source/Package/V3/Bzr.pm \
+ Dpkg/Source/Package/V3/Custom.pm \
+ Dpkg/Source/Package/V3/Native.pm \
+ Dpkg/Source/Package/V3/Git.pm \
+ Dpkg/Source/Package/V3/Quilt.pm \
Dpkg/Source/Patch.pm \
Dpkg/Source/Quilt.pm \
Dpkg/Substvars.pm \
diff --git a/scripts/po/POTFILES.in b/scripts/po/POTFILES.in
index b00cb5211..3c1b6e072 100644
--- a/scripts/po/POTFILES.in
+++ b/scripts/po/POTFILES.in
@@ -55,11 +55,11 @@ scripts/Dpkg/Source/Patch.pm
scripts/Dpkg/Source/Package.pm
scripts/Dpkg/Source/Package/V1.pm
scripts/Dpkg/Source/Package/V2.pm
-scripts/Dpkg/Source/Package/V3/bzr.pm
-scripts/Dpkg/Source/Package/V3/custom.pm
-scripts/Dpkg/Source/Package/V3/native.pm
-scripts/Dpkg/Source/Package/V3/git.pm
-scripts/Dpkg/Source/Package/V3/quilt.pm
+scripts/Dpkg/Source/Package/V3/Bzr.pm
+scripts/Dpkg/Source/Package/V3/Custom.pm
+scripts/Dpkg/Source/Package/V3/Native.pm
+scripts/Dpkg/Source/Package/V3/Git.pm
+scripts/Dpkg/Source/Package/V3/Quilt.pm
scripts/Dpkg/Source/Quilt.pm
scripts/Dpkg/Substvars.pm
scripts/Dpkg/Vars.pm