[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:
> 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.

Hi, 

Thanks for the pointer. I'm playing with that right now.

    use feature ':5.10';
    use AptPkg::Cache;
    my $apt = AptPkg::Cache->new();
    my $record = $apt->packages; # AptPkg::PkgRecords object
    my $h = $record->lookup($package_name);
    say "$package_name $h->{VerStr}"

To integrate with cpan clients, it would help to have a reliable
way to get the corresponding upstream version. Here are some
samples:

Package        Debian version   Probable CPAN version
-----------------------------------------------------
padre          0.76.ds1-1       0.76
nama           1.064-6          1.064
libdancer-perl 1.2000+dfsg-1    1.2000

Any references? I could whip up a regex, of course...

cheers,

Joel

-- 
Joel Roth


Reply to: