Skip to content
Snippets Groups Projects

inspect-library: Treat "-" as meaning stdin

Merged Simon McVittie requested to merge wip/smcv/inspect-library-stdin into master

To test:

echo "foo@Base" | ./_build/helpers/x86_64-linux-gnu-inspect-library libz.so.1 -

This isn't used for anything yet, but when we give it more integration into the library, we might want to use a pipe to supply the list of symbols. For instance, if we use deb-symbols(5) symbols lists (which describe one or more shared libraries, each with their symbols) to describe the Steam Runtime, then we'll want something like this pseudocode:

while lines remain:
    SONAME = next line until first whitespace

    run helper with pipes on stdin and stdout

    while next line starts with one of ('|', '*', ' '):
        if next line starts with ' ':
            symbol@version = rest of line until first whitespace
            write symbol@version to pipe
        else:
            ignore '* Field: value' or '| alternative dependency'

    close pipe to helper's stdin
    collect results from stdout
    collect exit status
    add SrtLibrary to list of libraries

Merge request reports

Pipeline #1287 passed

Pipeline passed for 8fb99b99 on wip/smcv/inspect-library-stdin

Approval is optional

Merged by Ludovico de NittisLudovico de Nittis 5 years ago (Jul 26, 2019 12:57pm UTC)

Merge details

  • Changes merged into master with 3e7e9536.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #1288 passed

Pipeline passed for 3e7e9536 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading