mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00563
Re: Calling update_cpan_libs
> I thought there was a way to call a method
> from a module without needing to compile
> the rest of that module
There are such ways. CGI.pm uses them. I suspect for our purpose, this grey magic is a bit over-kill.
> odd that SQL::Library is one of the CPAN
> packages that update_cpan_libs() fetches,
> but also one that is required for the module
> to run. Now I see it's "update" cpan_libs and
> not "get" cpan libs
yeah, MVHub::Utils::Setup started out as a checklist and for a few years
we weren't documenting dependencies.
On 08/08/2011 12:46 AM, Emaad Ahmed Manzoor wrote:
> Hey,
>
> FIRST GUESS
>> >
>> > SQL::Library isn't installed on your local system. This seems unlikely, as
>> > you've been using it all along, but I've never seen this error msg unless
>> > the library isn't missing.
>> >
> It's not installed (removed it to test the update_cpan_libs() method). I'm
> assuming the mvhub-dev doesn't have SQL::Library.
>
>
>> > MORE THOUGHTS
>> >
>>> > > use MVHub::Utils::DB;
>> >
>> > Assuming for the moment that SQL::Library isn't installed...
>> >
>> > As you observe, this is probably the line that is the source of your
>> > immediate problem. MVHub::Utils::DB uses SQL::Library and (indirectly) so
>> > does MVHub::Utils::Setup in a bunch of places example: get_db_version()
>> >
>> > ...and a pointer to a general class of circular dependency problems.
>> >
>> > MVHub::Utils::Setup is responsible for installing modules from CPAN, but it
>> > depends on modules that haven't been installed.
>> >
> I got that, but I thought there was a way to call a method from a module
> without needing to compile the rest of that module (Perl noobism). It struck
> me as odd that SQL::Library is one of the CPAN packages that
> update_cpan_libs() fetches, but also one that is required for the module to
> run. Now I see it's "update" cpan_libs and not "get" cpan libs
>
>
>> > Some possible solutions:
>> >
>> > 1) make Debian packages from the CPAN packages we need
>> > 2) break off MVHub::Utils::Setup::CPANLibs
>> >
>> > a. don't use libs that aren't part of Perl-core
>> > or installed as Debian packages (assuming that
>> > happens before preinst)
>> >
>> > b. call update_cpan_libs() from debian package
>> > preinst script
>> >
>> > Sadly, MVHub::Utils::Setup::CPANLibs isn't likely to be installed/usable
>> > from preisnt. Maybe (ugh!) copy 'n paste
>> > update_cpan_libs() into preinst
>> >
>> >
> I'm going with a combination (2) and finding existing Debian packages; there
> are a few other libraries with the same issue: IPC::System::Simple is
> required for 'autodie', but it's also fetched with update_cpan_libs(), so
> I've added libipc-system-simple into debian_installed_packages.t and into
> the package dependencies.
>
>
>> > 3) play games with BEGIN {} eval 'use SQL::Library;'
>> >
>> > 4) Ask http://perlmonks.org , http://pkg-perl.alioth.debian.**org/<http://pkg-perl.alioth.debian.org/>
>> > http://lists.debian.org/**debian-webapps/<http://lists.debian.org/debian-webapps/>
>> >
>> > The Right Way (tm) to deal with this is to package the modules we need as
>> > Debian packages. We'll need to do this to get the user-orientated package
>> > into Debian/Ubuntu
>> >
> We can do this eventually, but it might block us for a while if we wait for
> this to proceed. I'll move ahead with CPAN-pulling for now.
>
> Thanks!
>
> -- Emaad Ahmed Manzoor
References