[packagekit] mediarepo support in yum backend

مؤيد السعدي muayyad.alsadi at ojuba.org
Wed Jul 29 04:33:54 PDT 2009


Hello,

On Wed, 29 Jul 2009 08:38:04 +0100, Richard Hughes <hughsient at gmail.com>
wrote:
> 2009/7/28 مؤيد السعدي <muayyad.alsadi at ojuba.org>:
>> should I do yumMediaManagerHAL.py which derives from yumMediaManager
>> just as a proof of concept and as reference implementation (or for old
>> distros)
> 
> You could if you want, but I'm not going to install it by default as
> otherwise the HAL code will never be replaced.
> 

OK, apply this patch please

it adds an exception so that the yum will work normally if no
implementation is present

+        try:
+            manager = MediaManager()
+        except NotImplemented:
+            # yumRepo will catch this
+            raise yum.Errors.MediaError, "media handling is not
implemented"

and it adds some comments to your modified version of yumMediaManager
and it adds a hal version as a proof of concept which derives from the
dummy implementation

any one who wants to test it he should replace

from yumMediaManager import MediaManager
with
from yumMediaManagerHAL import MediaManagerHAL as MediaManager

and when some implementation is added (using GIO) it would be
from yumMediaManagerGIO import MediaManagerGIO as MediaManager

and same for DeviceKit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PackageKit-yum-mediarepo-hal.patch
Type: text/x-diff
Size: 10300 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090729/84380d62/attachment-0004.patch>


More information about the PackageKit mailing list