[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: recognising ruby1.8



On Thu, Jun 17, 2004 at 12:29:30AM +0100, Dafydd Harries wrote:
> 
> Lintian warns about "#!/usr/bin/ruby1.8" being an unusual interpreter.
> Attached is a patch for Lintian that fixes that.

Fixed in SVN. I extended your patch a bit. Attached the full patch
for reference.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
Index: checks/scripts
===================================================================
--- checks/scripts	(revision 285)
+++ checks/scripts	(revision 286)
@@ -77,6 +77,8 @@
 			  'runhugs98' => '/usr/bin/runhugs98',
 			  'runhugs' => '/usr/bin/runhugs',
 			  'ruby' => '/usr/bin/ruby',
+			  'ruby1.6' => '/usr/bin/ruby1.6',
+			  'ruby1.8' => '/usr/bin/ruby1.8',
 			  'scsh' => '/usr/bin/scsh',
 			  'sed' => '/bin/sed',
 			  'sh' => '/bin/sh',
@@ -121,7 +123,6 @@
 				'rc' => 'rc',
 				'regina' => 'regina-rexx',
 				'rexx' => 'regina-rexx',
-				'ruby' => 'ruby',
 				'runhugs1.4' => 'hugs',
 				'runhugs98' => 'hugs98',
 				'scsh' => 'scsh',
@@ -241,6 +242,10 @@
 		my $ver = $1 ? $1 : "";
 		tag_error("python-script-but-no-python-dep", $filename)
 		    unless ($deps{"python$ver"});
+	    } elsif ($base =~ /^ruby(\d.\d)?$/) {
+		my $ver = $1 ? $1 : "";
+		tag_error("ruby-script-but-no-ruby-dep", $filename)
+		    unless ($deps{"ruby$ver"});
             } elsif ($base eq 'pike') {
                 tag_error("pike-script-but-no-pike-dep", $filename)
                     unless ($deps{'pike'} or $deps{'pike7'});
Index: checks/scripts.desc
===================================================================
--- checks/scripts.desc	(revision 285)
+++ checks/scripts.desc	(revision 286)
@@ -333,6 +333,19 @@
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
 
+Tag: ruby-script-but-no-ruby-dep
+Type: error
+Info: Packages with scripts that are executed with ruby must depend on the
+ package ruby. Those that have scripts executed with a versioned ruby
+ package need a dependency on the equivalent version of ruby.
+ .
+ For example, if a script in the package uses #!/usr/bin/ruby, then the
+ package needs a dependency on "ruby". If a script uses
+ #!/usr/bin/ruby1.6, then the package need a dependency on "ruby1.6".
+ .
+ In some cases a weaker relationship, such as Suggests or Recommends, will
+ be more appropriate.
+
 Tag: wrong-path-for-rc
 Type: error
 Info: The rc shell is installed as /usr/bin/rc on Debian systems.
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 285)
+++ debian/changelog	(revision 286)
@@ -59,6 +59,8 @@
     + [FL] Don't issue executable-not-elf-or-script for files
       that are named *.exe on request of mono maintainers (Closes: #251075)
     + [CW] Add python2.4 as a valid interpreter (Closes: #254482)
+    + [FL] Add ruby1.[68] as valid interpreters, introduce new
+      ruby-script-but-no-ruby-dep error, copied from the python stuff
   * checks/shared-libs:
     + [FL] Don't report shlib-with-executable-bit and
       shlib-with-bad-permissions on symbolic links to such files

Reply to: