[X] I searched open reports and couldn't find a duplicate
What happened?
Attempting to round-trip a .conda package using the cph CLI resulted in a .conda package that was unextractable.
Example (using noarch/uncertainties-3.2.0-pyhd8ed1ab_0.conda):
cph extract uncertainties-3.2.0-pyhd8ed1ab_0.conda
rm uncertainties-3.2.0-pyhd8ed1ab_0.conda
cph create uncertainties-3.2.0-pyhd8ed1ab_0 ./uncertainties-3.2.0-pyhd8ed1ab_0.conda # note the relative path here
rm -rf uncertainties-3.2.0-pyhd8ed1ab_0
cph extract uncertainties-3.2.0-pyhd8ed1ab_0.conda # Crashes here
The fundamental issue appears to be that an additional pair of folders got created in the .conda archive called "info-." and "pkg-." and the info and pkg tar.zst files are inside those two additional folders.
In other words, the original .conda package, prior to extraction, contains the following two paths:
Checklist
What happened?
Attempting to round-trip a .conda package using the cph CLI resulted in a .conda package that was unextractable.
Example (using
noarch/uncertainties-3.2.0-pyhd8ed1ab_0.conda
):The fundamental issue appears to be that an additional pair of folders got created in the .conda archive called "info-." and "pkg-." and the info and pkg tar.zst files are inside those two additional folders.
In other words, the original .conda package, prior to extraction, contains the following two paths:
uncertainties-3.2.0-pyhd8ed1ab_0.conda/info-uncertainties-3.2.0-pyhd8ed1ab_0.tar.zst
uncertainties-3.2.0-pyhd8ed1ab_0.conda/pkg-uncertainties-3.2.0-pyhd8ed1ab_0.tar.zst
The ruined .conda package after round-trip contains the following two paths:
uncertainties-3.2.0-pyhd8ed1ab_0.conda/info-./uncertainties-3.2.0-pyhd8ed1ab_0.tar.zst
uncertainties-3.2.0-pyhd8ed1ab_0.conda/pkg-./uncertainties-3.2.0-pyhd8ed1ab_0.tar.zst
After some more testing, it appears that the culprit is https://github.com/conda/conda-package-handling/blob/ee025e5259a031a093123920096481cafd9ff2a2/src/conda_package_handling/conda_fmt.py#L67. This line naively includes the entire file path as part of the internal info/pkg archive names.
Suggested fix:
Conda Info
No response
Conda Config
No response
Conda list
No response
Additional Context
No response