Bunch of random strings somewhat related to your proposal:

Build:

 * Assuming loaded source DB (during distribution build)

* Source query: pkg:gnome-keyring[@fgit='3f7ff7']//cfunc:gkm_rpc_log/trans-calls::*/arg:line/c:string/string()

(All string "line" [1] literals used in calls (direct and transitive) to gkm_rpc_log [**])

 * Filling the err-message grammar (snippet from [3]):

    err-message = "WARNING: " "gnome-keyring" ":: " (
        ...
        | "couldn't secure socket: " everything
        | "couldn't connect to: " everything ": " everything
        | "couldn't send socket credentials: " everything
        ...
        )

(the grammar is needed for parsing the user input for points 1st and 3rd of your note (see also [***] alternative))

Runtime:

* parse the user/service query "WARNING: gnome-keyring:: couldn...": applying the above gremmar and rendering part of the syntax tree in response.

Kind Regards,
Alek

[*] Let's forget for a minute about the fact of hundreds different patters in the whole codebase, let's pretend that we have to handle just the sample error message from your propsal ;-)

[**] Imaginary xpath/xquery-like language for code queries ([4,5,6] - leading large scale implementation AFAIK):
  pkg: pacakges namespace
3f7ff7: 3f7ff7289907d2a27912909e63908eadb16d97bf == 3.2.1-3: Current F16 git for gnome-keyring - implies upstream 6d5818 [2]
  cfunc: C functions namespace
trans-calls: transitive calls axis (like ancestor-or-self but for "calling" relation instead of "nesting" tree relation)
  arg: argument names namespace
  c: C language constructs namespace
string(): in xpath string() function tries to convert the context tree node to string scalar

[***] Less elegant, but also less complicated (we do not need grammar and parsing, but just code-point _key_ matching) option is to convince Tomas to include build instrumentation in the spec (David's gcc plugin based in case of gnome-keyring) for hard error messages pre-enumeration with the following effect:
 [3] L250 becomes: "[FGKR0TK] couldn't secure socket: %s"
 [3] L256 becomes: "[FGKR0TL] couldn't connect to: %s: %s"
 [3] L262 becomes: "[FGKR0TM] couldn't send socket credentials: %s"


[1] http://git.gnome.org/browse/gnome-keyring/tree/pkcs11/rpc-layer/gkm-rpc-dispatch.c?id=6d5818#n72 [2] http://git.gnome.org/browse/gnome-keyring/tree/?id=6d58181fcddc5c13762a1920a464787ebc27d4bc [3] http://git.gnome.org/browse/gnome-keyring/tree/pkcs11/rpc-layer/gkm-rpc-module.c?id=6d5818#n246 [4] http://www.lug-erding.de/vortrag/Purely%20Relational%20XQuery%20LUG%20Erding.pdf
[5] http://hackage.haskell.org/package/Pathfinder
[6] http://dev.monetdb.org/hg/MonetDB/file/f7d6c302cc9c/pathfinder/compiler/algebra/algebra.c
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to