Search depended packages by path suffix#858
Merged
Merged
Conversation
Package search by substring finds the substring in libc6-dev package in bookworm causing dev packages to be installed in the slim image. Fixes docker-library#857.
Contributor
Author
|
I verified what changed due to this commit: |
Member
LGTM $ docker run -it --rm python:slim bash
root@097ad189d1b7:/# diff -u \
<(find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' 2>/dev/null | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "%s\n", so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u) \
<(find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' 2>/dev/null | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u)
--- /dev/fd/63 2023-08-25 21:01:29.769054925 +0000
+++ /dev/fd/62 2023-08-25 21:01:29.769054925 +0000
@@ -1,6 +1,5 @@
libbz2-1.0
libc6
-libc6-dev
libcom-err2
libcrypt1
libdb5.3 |
Member
|
Thank you! |
docker-library-bot
added a commit
to docker-library-bot/official-images
that referenced
this pull request
Aug 25, 2023
Changes: - docker-library/python@81b6e5f: Merge pull request docker-library/python#858 from kohtala/issue-857 - docker-library/python@2a443de: Update 3.9 to 3.9.18 - docker-library/python@3baa203: Update 3.8 to 3.8.18 - docker-library/python@ffc9b5b: Update 3.11 to 3.11.5, pip 23.2.1 - docker-library/python@9102bda: Update 3.10 to 3.10.13
Contributor
Author
|
Thank you. I realize it would have been helpful, had I noticed to include the quote already in the comments. Sorry for that. |
Member
|
For my own future reference, the specific offending file path is this one: 😮💨 Edit: a more clear/complete example: $ docker run -it --rm python:3.11.4-slim bash
root@1b9dc2995f40:/# dpkg-query --search lib/x86_64-linux-gnu/libc.so.6
libc6-dev:amd64: /usr/share/gdb/auto-load/lib/x86_64-linux-gnu/libc.so.6-gdb.py
libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6 |
This was referenced Apr 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package search by substring finds the substring in libc6-dev package in bookworm causing dev packages to be installed in the slim image.
Fixes #857.