DEP8 test incorrectly copies packages into container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
docker.io (Ubuntu) |
Fix Released
|
Wishlist
|
Michał Małoszewski |
Bug Description
This function[1] used in the DEP8 test:
copy_local_
for local_source in $(apt-get indextargets | grep-dctrl -F URI -e '^file:/' -sURI); do
local_
local_
lxc exec docker -- mkdir -p "${local_dir}"
tar -cC "${local_dir}" . | lxc exec docker -- tar -xC "${local_dir}"
done
}
Doesn't account for the fact that the result of that apt-get indextargets call still has the URI field name in it:
$ apt-get indextargets | grep-dctrl -F URI -e '^file:/' -sURI
URI: file:/tmp/
That will make local_source be URI: first, then file:/.... second, and so on.
When given a string like "URI:", dirname returns just ".". That tar command then transfers "." to the container.
https:/
Changed in docker.io (Ubuntu): | |
assignee: | nobody → Michał Małoszewski (michal-maloszewski99) |
Changed in docker.io (Ubuntu): | |
status: | Fix Committed → Fix Released |
AFAICS dirname returns the full string if it isn't a file, not "." (at least for me).
But still you are right that this isn't doing what is intended.
I agree that nowadays a prefix filter like this would be needed: source# URI: file:}
${local_
Maybe it was starting with just "file:" in an older version?