Revision ce4364e3
Added by Marc Dequènes about 15 years ago
- ID ce4364e3af9df743113db55dd855532c548827f5
lib/debian/version.rb | ||
---|---|---|
@revision = nil
|
||
else
|
||
@upstream = Debian_apt.debVS.upstream_version(version)
|
||
version =~ /^(?:(\d+):)?#{@upstream}(?:-(.+))?$/
|
||
@epoch = $1 ? $1 : 0
|
||
@revision = $2
|
||
@epoch, @revision = version.split(@upstream, 2)
|
||
@epoch = @epoch ? @epoch[0..-2].to_i : 0
|
||
@revision = @revision[1..-1] if @revision
|
||
|
||
# magic fence
|
||
raise "DebianVersion bug in parsing. Stopping before breaking the world !" if self.version != version
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
[fix] do version parsing better and raise an error if the recomposed version does does not match the provided one