[opensuse-packaging] automatic dependencies for perl modules?
Hello, I just stumbled over CPAN::FindDependencies [1]. IMHO this could be a good addition to cpanspec or the RPM perl macros (maybe %perl_requires?) to automatically add all the module dependencies (like "perl:(Foo:Bar)") of a perl module. At the moment it seems I have to add the dependencies manually. However, my perl knownledge is limited and I therefore can't tell if or how good this would work. What do the perl experts think? BTW: If I get the description of CPAN:FindDependencies right, it can check the requirements recursively. The RPMs should of course only include direct requires (maxdepth 1). Regards, Christian Boltz [1] http://search.cpan.org/~dcantrell/CPAN-FindDependencies-2.34/ or http://search.cpan.org/~dcantrell/CPAN- FindDependencies-2.34/lib/CPAN/FindDependencies.pm --
...womit die Geschichte wieder von vorn losgeht... Jaha, aber nun ist das eine vollkommen andere Situation: Jetzt hast Du nämlich eine von Suse generierte kdmrc für ein von Suse geliefertes KDE, und KDE ist eine vom Installationssupport abgedeckte Komponente. Also ist das ein meldefähiger und supportberechtigter Bug! :-) [> Gerald Martin und Kristian Köhntopp in suse-linux] -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Fri, Dec 03, 2010 at 05:01:27PM +0100, Christian Boltz wrote:
I just stumbled over CPAN::FindDependencies [1]. IMHO this could be a good addition to cpanspec or the RPM perl macros (maybe %perl_requires?) to automatically add all the module dependencies (like "perl:(Foo:Bar)") of a perl module. At the moment it seems I have to add the dependencies manually.
However, my perl knownledge is limited and I therefore can't tell if or how good this would work. What do the perl experts think?
Rpm already contains a perl script to automatically find dependencies by looking at the source code, but we've disabled it due to many false positives. We still have the "autoprovides" part running, that's why you see many perl() provides in our perl packages. Modern perl modules come with a META.yml file that also lists dependencies, maybe we should this for autogeneration. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 2010-12-03 17:50:08 (+0100), Michael Schroeder <mls@suse.de> wrote:
On Fri, Dec 03, 2010 at 05:01:27PM +0100, Christian Boltz wrote: [...] Modern perl modules come with a META.yml file that also lists dependencies, maybe we should this for autogeneration.
Done, it's what I'm using for my script that generates spec files for perl packages: http://linux01.gwdg.de/~pbleser/files/rpm/bm.pl cheers -- -o) Pascal Bleser <pascal.bleser@opensuse.org> /\\ http://opensuse.org -- I took the green pill _\_v FOSDEM XI: 5 + 6 Feb 2011, http://fosdem.org
Am Freitag, 3. Dezember 2010 schrieb Christian Boltz:
Hello,
I just stumbled over CPAN::FindDependencies [1]. IMHO this could be a good addition to cpanspec or the RPM perl macros (maybe %perl_requires?) to automatically add all the module dependencies (like "perl:(Foo:Bar)") of a perl module. At the moment it seems I have to add the dependencies manually.
However, my perl knownledge is limited and I therefore can't tell if or how good this would work. What do the perl experts think?
BTW: If I get the description of CPAN:FindDependencies right, it can check the requirements recursively. The RPMs should of course only include direct requires (maxdepth 1).
cpanspec already adds the requires from META.yml, but having automated dependencies is unfortunately very risky, because code like our $HAS_ZLIB; BEGIN { $HAS_ZLIB = eval 'use Compress::Zlib (); 1;'; } does not really _require_ Compress::Zlib. But I agree, we could add those automatic requires as comments from cpanspec. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Christian Boltz
-
Michael Schroeder
-
Pascal Bleser
-
Stephan Kulow