The _dist_info helper function had a logic error where it was checking
if 'entry.startswith(entry)' instead of 'entry.startswith(name)'. This
caused the function to always evaluate incorrectly when checking for
.dist-info or .egg-info entries in the zipapp.
This bug was preventing the test assertions from properly validating
that package metadata directories are included in the built cephadm
zipapp.
Fixes a bug introduced in commit
31c8010faa4.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
def _dist_info(entry, name):
return (
- entry.startswith(entry) or entry.startswith(entry.lower())
+ entry.startswith(name) or entry.startswith(name.lower())
) and (entry.endswith('.dist-info') or entry.endswith('.egg-info'))