bin/tpkg in tpkg-1.25.1 vs bin/tpkg in tpkg-1.27.1
- old
+ new
@@ -268,12 +268,11 @@
opts.on('--debug', 'Print lots of messages about what tpkg is doing') do |opt|
@debug = opt
Tpkg::set_debug(@debug)
end
opts.on('--version', 'Show tpkg version') do |opt|
- puts Tpkg::VERSION
- exit
+ @action = :query_version
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
@@ -489,10 +488,12 @@
else
puts "#{field}: #{metadata[field]}"
end
end
end
+ tpkg_version = metadata[:tpkg_version] || "< 1.26.1"
+ puts "This package was built with tpkg version #{tpkg_version}."
if metadata[:dependencies]
puts "This package depends on other packages, use --qd/--qld to view the dependencies."
end
puts "================================================================================"
end
@@ -629,7 +630,9 @@
puts "Operating System: #{Tpkg::get_os}"
puts "Architecture: #{Tpkg::get_arch}"
when :query_history
tpkg = instantiate_tpkg(@tpkg_options)
tpkg.installation_history
+when :query_version
+ puts Tpkg::VERSION
end
exit ret_val