[packagekit] Adding a new INFO enumerated type?

Matthias Clasen matthias.clasen at gmail.com
Wed Apr 23 10:40:54 PDT 2008


On Wed, Apr 23, 2008 at 6:10 AM, Richard Hughes <hughsient at gmail.com> wrote:

>
>  I'm erring on the latter, and doing something like this:
>
>  typedef enum {
>         PK_INFO_ENUM_LOCAL = 1 << 0,
>         PK_INFO_ENUM_AVAILABLE = 1 << 1,
>         PK_INFO_ENUM_REMOTE = 1 << 2,
>  ...
>  } PkInfoEnum;
>
>  LOCAL means "on my hard drive, not available on the server"
>  AVAILABLE means "on the server, and on the hard drive"
>  REMOTE means "on the server, and not on the hard drive"
>

Ususally when dealing with bitfields, one expects them to be mutually
exclusive.
It seems bad to have AVAILABLE mean the same as LOCAL|REMOTE and still
reserve a bit for it.

Also, to me 'available locally' doesn't really mean the same as
'installed', intuitively.
I would expect 'available locally' mean: the package is on local
media, I can install it without network. Whereas 'installed' means,
well, that it is installed, which doesn't usually imply being
available for reinstallation without getting the package again from
somewhere.


More information about the PackageKit mailing list