[packagekit] search-file pattern search
Mounir Lamouri
mounir.lamouri at gmail.com
Tue Jun 23 10:46:59 PDT 2009
Richard Hughes wrote:
> On Tue, Jun 23, 2009 at 4:35 PM, Mounir Lamouri<mounir.lamouri at gmail.com> wrote:
>> On Tue, Jun 23, 2009 at 4:39 PM, Richard Hughes<hughsient at gmail.com> wrote:
>>> On Tue, Jun 23, 2009 at 2:53 PM, Mounir Lamouri<mounir.lamouri at gmail.com> wrote:
>>>> I'm a bit lost in the doc/ directory.
>>>> Where should I add the new specification description ?
>>> It's src/org.freedesktop.PackageKit.Transaction.xml -- these
>>> introspection documents get parsed when we generate the docs.
>> Then, the patched documentation is here :
>> http://dev.gentoo.org/~volkmar/packagekit-searchfile-specification.patch
>
> What about something like this:
>
> A filename or fully qualified path and filename on the system.
>
> If the search term begins with a <doc:tt>/</doc:tt> it will be assumed
> the entire path has been given and only packages that contain this
> exact path and filename will be returned.
>
> If the search term does not start with <doc:tt>/</doc:tt> then it
> should be treated as a single filename, which can be in any directory.
I agree.
Patch updated :
http://dev.gentoo.org/~volkmar/packagekit-searchfile-specification.patch
>> I was thinking we could add something in pk-transaction.c to pop an
>> error if search is not valid. In other words, as we assume
>> "/something" is an entire path and "[^/]something" is a filename. And
>> as far as I know, '/' is not accepted in UNIX filename, it could be
>> helpfull for backends (and user if error message is clear enough) if
>> an error is prompted if the key doesn't begin with '/' but contains a
>
> Yes, makes sense.
>
>> If foo/bar can't produce any result, better to tell the user it's
>> invalid than tell the user nothing has been found.
>> Another time, i'm ok to write the needed patch if the feature is accepted.
>
> Yes, sounds fine. You'll need to create another error enum, something
> like INVALID_SEARCH_PATH.
I'm going to write a patch for this too.
Mounir
More information about the PackageKit
mailing list