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

Re: Debianizing Filter::Crypto::Decrypt



2009/11/12 C.J. Adams-Collier <cjac@colliertech.org>:
>
>> If you want a less distro-specific testing method (even if the results
>> is perhaps distro-specific) then perhaps use lsb_release instead
>> (contained in lsb-base in Debian) which on Debian queries the content of
>> /etc/debian_version.
>
>> - Jonas
>
>
> Thanks Jonas.
>
> It looks like CentOS doesn't have a lsb_release in the path, so we'd
> have to search $ENV{PATH} and then call it.
>
> I don't see an easy way to tell from the output whether a distribution
> is debian-based.
>
> cjac@hardy0:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description:    Ubuntu 8.04.3 LTS
> Release:        8.04
> Codename:       hardy
>
> cjac@lenny0:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Debian
> Description:    Debian GNU/Linux 5.0.1 (lenny)
> Release:        5.0.1
> Codename:       lenny
>
> Perhaps for now
>
>  -e q{/etc/debian_version} && !-e q{/usr/bin/perldoc.stub}
>
> is the easiest and least prone to error.
>
> Steve?
>

I think avoiding lsb_release looks simpler.

Is it correct to always check in /usr/bin for perldoc.stub, though?
Pod::Usage locates perldoc itself by looking in $Config{scriptdir}.
Would perldoc.stub be there as well, alongside perldoc, or is it
always in /usr/bin ?


Reply to: