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

on the correct dependency for packages with scripts using /usr/bin/ruby



Hello all,

I am preparing a package for shoulda-context as part of upgrading shoulda,
which got split upstream into three packages. I've sent a patch for lintian to
cope with the fact the Ruby-Versions field we introduced with gem2deb is not
recognized [1], but I am still missing one lintian error:

$ lintian -iI ../ruby-shoulda-context_1.0.0~beta1-1_i386.changes ;
E: ruby-shoulda-context: ruby-script-but-no-ruby-dep usr/bin/convert_to_should_syntax
N: 
N:    Packages with Ruby scripts must depend on the package ruby. Those that
N:    have Ruby scripts that run under a specific version of Ruby need a
N:    dependency on the equivalent version of Ruby.
N:    
N:    For example, if a script in the package uses #!/usr/bin/ruby, the
N:    package needs a dependency on "ruby". If a script uses
N:    #!/usr/bin/ruby1.9, then the package need a dependency on "ruby1.9".
N:    
N:    In some cases a weaker relationship, such as Suggests or Recommends,
N:    will be more appropriate.
N:    
N:    Severity: important, Certainty: certain
N: 

So, lintian wants the package to depend on 'ruby', but it actually depends on
'ruby1.8 | ruby-interpreter' because that's what gem2deb generates.

Is there any good reason for us to not use 'ruby | ruby-interpreter' instead of
'ruby1.8 | ruby-interpreter'? Currently 'ruby' means 'Matz Ruby, version 1.8',
and 'ruby-interpreter' is provided by ruby1.8 and ruby1.9.1, and will probably
also be provided by other packages in the future.

This way, when the default Ruby version changes, instead of modifying all
packages to depend on 'ruby1.9.1 | ruby-interpreter', we will only need to
change which package 'ruby' depends on.

If we agree on that, I will submit a patch to lintian so that it checks for
'ruby | ruby-interpreter' for scripts using /usr/bin/ruby, instead of just
'ruby'.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623390

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro


Attachment: signature.asc
Description: Digital signature


Reply to: