[Pkg-ruby-extras-maintainers] r367 - tools/ruby-pkg-tools/trunk/bin
Thierry Reding
beatle-guest at costa.debian.org
Tue Mar 21 17:52:36 UTC 2006
Author: beatle-guest
Date: 2006-03-21 17:52:34 +0000 (Tue, 21 Mar 2006)
New Revision: 367
Modified:
tools/ruby-pkg-tools/trunk/bin/pkg-ruby-get-sources
Log:
* Added code to look for upstream sources in a package's watch file, falling
back to using the pkg-ruby-extras.sources file if there's no watch file, or
no upstream tarball could be located by looking at it.
Modified: tools/ruby-pkg-tools/trunk/bin/pkg-ruby-get-sources
===================================================================
--- tools/ruby-pkg-tools/trunk/bin/pkg-ruby-get-sources 2006-03-21 16:01:31 UTC (rev 366)
+++ tools/ruby-pkg-tools/trunk/bin/pkg-ruby-get-sources 2006-03-21 17:52:34 UTC (rev 367)
@@ -223,11 +223,41 @@
else
puts "I: Nothing to do for archive type: #{ext}" if $verbose
end
+
+ return true
end
package, version = guess_package
tarball = nil
+# first try to download a source tarball by looking at the watch file, if the
+# package has one
+begin
+ watch = File.new('debian/watch')
+ puts "I: Using watch file" if $verbose
+ watch.each { |line|
+ if line =~ /(http|ftp):\/\/[^\s]+/ then
+ tarball = line.gsub(/\\/, '')
+ tarball.gsub!(/\(.*\)/, version)
+
+ if not $list_available then
+ if tarball then
+ puts "I: Found source tarball for package #{package}-#{version}: #{tarball}" if $verbose
+ if download(package,version,tarball) then
+ watch.close
+ exit 0
+ end
+ else
+ puts "I: Found no source tarball by looking at the watch file, continuing." if $verbose
+ end
+ end
+ end
+ }
+ watch.close
+rescue
+ puts "I: No watch file for this package." if $verbose
+end
+
[ $sources_file, $sources_url ].each { |file|
sources = get_available_sources(file)
if (sources) then
More information about the pkg-ruby-extras-maintainers
mailing list