[patch icedtea/openjdk] print proper system information using /etc/lsb-release

Mark Wielaard mark at klomp.org
Tue Mar 4 05:32:38 PST 2008


Hi Matthias,

On Tue, 2008-03-04 at 10:36 +0100, Matthias Klose wrote:
> On Ubuntu we usually keep the version information in /etc/debian_version, which
> leads to somewhat incorrect system information; just check for /etc/lsb-release
> before falling back to the other file.
>
> 2008-03-04  Matthias Klose <doko at ubuntu.com>
> 
>         * patches/print-lsb-release.patch: Use /etc/lsb-release for
>         system information before trying /etc/debian_version.

The order seems right. Note that you would need to add
patches/print-lsb-release.patch to ICEDTEA_PATCHES in Makefile.am (and
regenerate Makefile.in) to get it actually applied.

What is in /etc/lsb-release that you cannot just use _print_ascii_file
to print it? 

> +  if ((bytes = read(fd, buf, sizeof(buf)-1)) == sizeof(buf)-1) {
> +     close(fd);
> +     return false;
> +  }
> +  close(fd);

Shouldn't this be a while loop to guard against short reads?

Cheers,

Mark




More information about the distro-pkg-dev mailing list