mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
Ensure that version numbers begin with well, a number, when building a deb, otherwise dpkg-deb will refuse to build it.
This commit is contained in:
@@ -594,14 +594,13 @@ sub version {
|
||||
# get
|
||||
return unless defined wantarray; # optimization
|
||||
$_=$this->{version};
|
||||
# Make sure the version contains a digit at the start, as required
|
||||
# by dpkg-deb.
|
||||
unless (/^[0-9]/) {
|
||||
$_="0".$_;
|
||||
}
|
||||
# filter out some characters not allowed in debian versions
|
||||
s/[^-.+~:A-Za-z0-9]//g; # see lib/dpkg/parsehelp.c parseversion
|
||||
# Make sure the version contains digets.
|
||||
unless (/[0-9]/) {
|
||||
# Drat. Well, add some. dpkg-deb won't work
|
||||
# on a version w/o numbers!
|
||||
return $_."0";
|
||||
}
|
||||
return $_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user