Bug 21550 - pk_get_distro_id needs debian/ubuntu support
Summary: pk_get_distro_id needs debian/ubuntu support
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: client-library (show other bugs)
Version: unspecified
Hardware: Other All
: low enhancement
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 11:44 UTC by Manatsawin Hanmongkolchai
Modified: 2009-05-05 01:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Manatsawin Hanmongkolchai 2009-05-04 11:44:43 UTC
The gpk-service-pack and pkgenpack both not working in Ubuntu. It's error while creating the service pack itself because it can't generate metadata.conf.

After few minutes looking into the source, pk_get_distro_id does not have Debian/Ubuntu's version.

My suggestion is parsing the /etc/lsb-release file, which is in this format:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"

and in Debian there is also /etc/debian_version, which in my Ubuntu having only 5.0 in that file
Comment 1 Richard Hughes 2009-05-05 01:56:56 UTC
commit 1ae5039a025b2d3e7c6517014194499a9c1a6a8b
Author: Richard Hughes <richard@hughsie.com>
Date:   Tue May 5 09:55:53 2009 +0100

    Add support for /etc/lsb-release to pk_get_distro_id() to fix fd#21550


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.