Hello, Am Montag, 3. September 2012 schrieb Stephan Kulow:
On 03.09.2012 10:50, Olaf Hering wrote:
Is there a reason why the required modules of a perl script are not encoded in the Requires of a package? In the example below I would expect a Requires: perl(Data::Dumper) to be included in inst-source-utils to pull in all required packages to actually run the script.
In general yes (see Coolo's exception), and if the module is really required, then it should be mentioned in Requires:
root@carron:~/X # sed -n '/^[[:blank:]]*use[[:blank:]].*::/p' /usr/bin/createpatch The reason is that such requires are *very* often just plain wrong. You can have modules, and you can have code like this:
eval { require "Nowaythisisreal"; $somethingveryfishy=1; }
Indeed, there are cases where a Requires: makes no sense. Besides your fishy example, there might be cases where modules are only loaded conditionally (for example, if a script is called with a --use-more- modules ;-) option) OTOH, I'm not sure if having the automatic dependency detection completely disabled makes sense. Sure, there are cases where it bites back, but it will also cause some breakage if a required perl module isn't Required/installed. What about re-enabling the dependency detection for perl modules, but let it create Recommends: instead of Requires:? Or add a rpmlint check that warns about possibly missing Requires: or Recommends: to give packagers more control? I'd use a warning like "$script requires the Foo::Bar perl module, but this isn't mentioned in your spec file as Requires:perl(Foo::Bar) or Recommends:perl(Foo::Bar). Please add it, or $way_to_silence_this_warning_for_Foo::Bar" Gruß Christian Boltz -- Evolution ist ein echter Outlook-Clone - es kopiert saemtliche Fehler. [Thomas Hertweck in suse-linux] -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org