[packagekit] Delimitors for handling multiple package_ids

Richard Hughes hughsient at gmail.com
Fri Sep 26 05:51:49 PDT 2008


On Wed, 2008-08-20 at 16:59 +0100, Richard Hughes wrote:
> > > into it and split on that on the other end.  That actually breaks
> > the
> > > conary backend, anyone mind switching it to a "%"?  I think that
> is
> > less
> > > likely to break anything.  Comments?
> 
> No problem for me.

It turns out this is a problem actually, as % in a printf seems to break
things pretty bad when running the daemon in verbose mode.

The whole ^, |, \t space thing is pretty broken right now. I've just
discovered a bug in GetDepends where multiple package_id are not being
processed.

I've committed a patch into git which sorts things out, once and for
all. There's a constant PK_PACKAGE_IDS_DELIM (or PACKAGE_IDS_DELIM in
python) that splits the package_ids, and PK_BACKEND_SPAWN_FILENAME_DELIM
(python FILENAME_DELIM) is used to delimit multiple paths.

Other changes:

* pk_package_ids_to_text no longer takes a delimiter argument, as it's
hardcoded to the define.
* pk_va_list_to_argv no longer does insane things with "|"

I think I've trivially converted all the backends and client code, but
please check with your backend you're doing the right thing.

Seems to pass the unit tests, and works okay for me after playing with
activation and that sort of thing.

Commit id is 442e1f1bbdaa3a0549183602d36ca6dfb21c12bc

Richard.





More information about the PackageKit mailing list