Re: Distribution installer that defaults to Debian? Code at github!!
Sorry, I originally sent this to the wrong list.
--- Begin Message ---
On Sun, Dec 19, 2010 at 01:36:26PM -1000, Joel Roth wrote:
> Hi all,
> I often find myself going through the same ritual
> when installing a new module, say Something::Great
> Do I have it already?
> perl -MSomething::Great -e 1
> Does Debian have it?
> apt-cache search libsomething-great-perl
> If Debian has it, I install with apt-get, if not,
> I install with a CPAN client (these days cpanm)
> into a local::lib.
> Is anyone aware of some tool that does this? Otherwise I might
> write a simple script.
I dived into cpanminus and hacked in apt-get support
for installing packages and their dependencies.
What I didn't get is how to see what version of a Debian
package is ready to install. (Version is checked *after*
Note that Debian support is conditional on
* `which perl` returning /usr/bin/perl (to play safe with perlbrew)
* Dpkg::Version and Debian::AptContents are installed
Also note that this hacked cpanm executes
'sudo apt-get --assume-yes install libfoo-perl'.
It doesn't (but probably should) require the -S|--sudo
Finally, I didn't follow Miyagawa's OO coding practices...
just threw in variables and subs. Proof of concept,
so to say.
Let me know it's at all interesting or useful to you.
--- End Message ---