[DRE-commits] [SCM] pkg-ruby-extras.git branch, master, updated. aac2be6f2015ef2fc242a1e8310f95157e440a30
Antonio Terceiro
terceiro at softwarelivre.org
Fri Jul 29 06:49:58 UTC 2011
The following commit has been merged in the master branch:
commit 8b08a18b02decd28bbc1979e4f14ac886b6013ab
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Thu Jul 28 23:45:14 2011 -0700
Even faster way of reading current version from changelog
diff --git a/pkg-overview b/pkg-overview
index d722a6d..648297d 100755
--- a/pkg-overview
+++ b/pkg-overview
@@ -71,11 +71,9 @@ def rmadison_to_version(src)
end
def changelog_version(src)
- v = `cd #{src} && sed -e '2,$d; s/.*(\\(.*.\\)).*/\\1/' debian/changelog 2>/dev/null`.strip
- if $?.exitstatus != 0
- STDERR.puts "ERROR: #{src}: dpkg-parsechangelog failed."
- return nil
- end
+ header = File.readlines(File.join(src, 'debian/changelog')).first
+ header =~ /\((.*)\)/
+ v = $1
v.gsub!(/^[0-9]+:/,'') # strip epoch
return DebVersion::new(v)
end
--
pkg-ruby-extras.git
More information about the Pkg-ruby-extras-commits
mailing list