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

Re: Distribution installer that defaults to Debian?



On Tue, Dec 21, 2010 at 11:22:52AM +0200, Damyan Ivanov wrote:
> -=| gregor herrmann, Tue, Dec 21, 2010 at 12:44:04AM +0100 |=-
> > On Mon, 20 Dec 2010 10:51:06 -1000, Joel Roth wrote:
> > > What I tried is:
> > > 
> > >    use Debian::AptContents;
> > >    my $c = Debian::AptContents->new({ homedir => '/tmp/dh-make-perl'});
> > >    
> > >    my $dep = $c->find_perl_module_package('Padre','123.0');
> > >    
> > >    print $dep->ver; # 123.0  (actual version is 0.76.ds1-1)
> > 
> > Hm. I guess the Debian::Dependency only returns what's fed to it.
> > I thought it also knows additonally about the available versions ...
> 
> From the POD:
>     Given Perl module name (e.g. Foo::Bar), returns 
>     a Debian::Dependency object representing the required Debian 
>     package and version. If the module is a core one, suitable 
>     dependency on perl is returned.
> 
> So unless the dependency is in the core, the $version parameter is 
> used verbatim. Basically you tell find_perl_module_package "give me 
> a suitable Debian package dependency for that module and version" and 
> it does just that. If you want to depend on Padre 123.0 (for example 
> in META.yml), this would translate to "padre (>= 123.0)". Of course, 
> such a dependency would be unsatisfiable given the available padre 
> package versions, but find_perl_module_package doesn't care.

That's pretty much what I found by my usual trial-and-error
experiements. (Is it because I don't read, don't believe,
or just have to try for myself? :-)
 
> As for finding available package versions, I am not sure what would be 
> the best approach. We usually leave this to the package manager :)
> rmadison is a tool that can help, but it requires network connection 
> and may not match what is available from the package repositories 
> listed in /etc/apt/soures.list.
 
> Another way is to query apt's local database perhaps via 
> AptPkg::PkgRecords.

Thanks. I'll look into those.

Joel



-- 
Joel Roth


Reply to: