[packagekit] ServicePack: Matching update media to distros
Richard Hughes
hughsient at gmail.com
Thu Mar 27 10:01:22 PDT 2008
On Thu, 2008-03-27 at 16:56 +0000, Richard Hughes wrote:
> Following this email will be specific thread for discussion. So no code
> yet -- but I'm working on it.
For the update media, we need a way to detect if a user has inserted a
"Fedora 9 64bit" into an "Ubuntu Hardy ppc64" machine.
With this in mind I'm thinking of creating a distro-string, something
like:
fedora-8-i386
ubuntu-6.2-ppc64
So that if the two distro-strings do not match then the update and
install media will be refused and the user warned.
Now, two issues:
* Is this enough data (name-version-arch) to identify compatible updates
for a distro?
* How to get the data - given that most don't follow LSB.
I'm thinking of creating a library function
string=pk_get_distro_id(void) that you guys can just patch to read
things like /etc/mandrake-release and parse it into something that looks
like fedora-8-i386.
Sane?
Richard.
More information about the PackageKit
mailing list