[packagekit] Adding a new INFO enumerated type?

Patryk Zawadzki patrys at pld-linux.org
Wed Apr 23 10:54:39 PDT 2008


On Wed, Apr 23, 2008 at 7:40 PM, Matthias Clasen
<matthias.clasen at gmail.com> wrote:
> 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.

Note these are search flags and the only other option to handle this
with two flags would be specifying multiple bitmasks -  to say "(LOCAL
and not REMOTE) or (LOCAL and REMOTE) or (REMOTE and not LOCAL), I
don't really care"

-- 
Patryk Zawadzki
PLD Linux Distribution


More information about the PackageKit mailing list