aboutsummaryrefslogtreecommitdiffstats
path: root/version_info.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-07-15 22:31:53 +0000
committerGuy Harris <guy@alum.mit.edu>2010-07-15 22:31:53 +0000
commit04cf498c25a6e1862986ae8cbaf8d0c61c290226 (patch)
treea30eb6fbe67a2d8f1922b7c27a8b4b7fb00c2fdd /version_info.c
parent96e8176ac2289c055c10fff4a60f0396305ffc33 (diff)
More information on getting the distribution name and release.
svn path=/trunk/; revision=33545
Diffstat (limited to 'version_info.c')
-rw-r--r--version_info.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/version_info.c b/version_info.c
index 1c01ba743b..ca0a937418 100644
--- a/version_info.c
+++ b/version_info.c
@@ -433,6 +433,35 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *))
* it doesn't indicate whether "distrib" is literally
* "distrib" or is the name for the distribution, and
* also speaks of an /etc/debian_version file.
+ *
+ * "lsb_release" apparently parses /etc/lsb-release, which
+ * has shell-style assignments, assigning to, among other
+ * values, DISTRIB_ID (distributor/distribution name),
+ * DISTRIB_RELEASE (release number of the distribution),
+ * DISTRIB_DESCRIPTION (*might* be name followed by version,
+ * but the manpage for lsb_release seems to indicate that's
+ * not guaranteed), and DISTRIB_CODENAME (code name, e.g.
+ * "licentious" for the Ubuntu Licentious Lemur release).
+ * the lsb_release man page also speaks of the distrib-release
+ * file, but Debian doesn't have one, and Ubuntu 7's
+ * lsb_release command doesn't look for one.
+ *
+ * I've seen references to /etc/redhat-release as well.
+ *
+ * At least on my Ubuntu 7 system, /etc/debian_version
+ * doesn't contain anything interesting (just some Debian
+ * codenames).
+ *
+ * See also
+ *
+ * http://bugs.python.org/issue1322
+ *
+ * http://www.novell.com/coolsolutions/feature/11251.html
+ *
+ * http://linuxmafia.com/faq/Admin/release-files.html
+ *
+ * and the Lib/Platform.py file in recent Python 2.x
+ * releases.
*/
g_string_append_printf(str, "%s %s", name.sysname, name.release);
#endif /* HAVE_OS_X_FRAMEWORKS */