-
Notifications
You must be signed in to change notification settings - Fork 7
Ignore not-indented ldd output #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I am not particularly knowledgeable about |
|
Hi @altendky , |
|
Sorry, I meant to swing back around and look at the test setup and add something. Got distracted... Anyways, note added to the OP and I'll look at that tomorrow maybe. Thanks for your consideration. |
|
@altendky could you please grant me permissions to add commits to your pull request? (Please see https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork) If you want to look into the test cases yourself, this is of course even better :-). |
|
@mristin, alrighty, now the _real_ PR is ready for consideration... Of course, the follow up is: what is the release schedule here? Not nagging, I appreciate all the reviews. Just looking to understand so I can plan my path forward accordingly. Cheers, thanks for all the work. |
mristin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments. We need to figure out a more precise way to determine whether a dependency is missing or not.
lddwrap/__init__.py
Outdated
| soname=soname, path=dep_path, found=found, mem_address=mem_address) | ||
| else: | ||
| if len(parts) != 2: | ||
| if line[0] not in {' ', '\t'}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very worried that this line might introduce a lot of hard-to-track bugs. I suppose you want to cover the ldd output from #14:
qt/6.0.2/gcc_64/plugins/sqldrivers/libqsqlpsql.so: /lib/x86_64-linux-gnu/libpq.so.5: no version information available (required by qt/6.0.2/gcc_64/plugins/sqldrivers/libqsqlpsql.so)
?
In my opinion, missing leading indention is not an indication enough for missing dependencies.
Why not check for no version information available similar how I check for not found at line 126?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bah, my GitHub inbox is getting trashed by another project. Glad I checked back... Yeah, I don't know my way around what the ldd 'format' really is. It would be nice to have some 'external' indicator that wouldn't be part of a file name, but I guess in this case we kind of have to just hope that the library file name doesn't contain weird phrases like we will check for. At least odds are decent that people won't build libraries named no version information available. :]
Change incoming. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty, I'm good with this but also remembered a bit along the way. I guess the 'why not', without claiming it is sufficient to be 'right', is that entering messages one at a time instead of catching all 'message' lines vs. 'dependency' lines generically ends up making more changes. But sure, this is a undefined formatting and we are (I am?) just extrapolating guesses as to what works out best. Anyways, it's obviously not that hard to add ignores.
If you are good with my adjustment per your request, then I'm almost good with this. I'll follow up with one final CI run of my project using this (qt-applications) to make sure it still works as desired in the field.
@altendky I can release a patch version as soon as we get this pull request in. |
mristin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the minor remarks.
Co-authored-by: Marko Ristin <marko@ristin.ch>
mristin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
|
@altendky ready for merge? |
|
@mristin, did one last test build, go for it. Cheers. |
|
@altendky thanks a lot! |
|
@altendky released: https://github.com/Parquery/pylddwrap/releases/tag/v1.2.0 Thanks again! |

Draft for:
The first line of this output caused the exception below.
Long winded traceback redacted by removing piles of wheel-building layers.
Traceback (most recent call last): <snip> File "./build.py", line 218, in linuxdeployqt_substitute_list_source for dependency in lddwrap.list_dependencies( File "/tmp/pip-build-env-ueu0a2p1/overlay/lib/python3.9/site-packages/icontract/_checkers.py", line 648, in wrapper result = func(*args, **kwargs) File "/tmp/pip-build-env-ueu0a2p1/overlay/lib/python3.9/site-packages/lddwrap/__init__.py", line 220, in list_dependencies dependencies = _cmd_output_parser(cmd_out=out) # type: List[Dependency] File "/tmp/pip-build-env-ueu0a2p1/overlay/lib/python3.9/site-packages/lddwrap/__init__.py", line 259, in _cmd_output_parser dep = _parse_line(line=line) File "/tmp/pip-build-env-ueu0a2p1/overlay/lib/python3.9/site-packages/lddwrap/__init__.py", line 165, in _parse_line raise RuntimeError( RuntimeError: Expected 2 parts in the line but found 9: /tmp/pip-req-build-lyab9hdl/build/qt_applications-t5l6p3ia/qt/6.0.2/gcc_64/plugins/sqldrivers/libqsqlpsql.so: /lib/x86_64-linux-gnu/libpq.so.5: no version information available (required by /tmp/pip-req-build-lyab9hdl/build/qt_applications-t5l6p3ia/qt/6.0.2/gcc_64/plugins/sqldrivers/libqsqlpsql.so)