Skip to content

BUG: failure to unpack empty archive #5854

@h-vetinari

Description

@h-vetinari

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

In conda-forge/linux-sysroot-feedstock#93, I've tried switching our RPMs from Alma to Rocky Linux, and it turns out I ended up downloading an RPM that's empty (though with the correct hash).

$ curl -LO https://dl.rockylinux.org/pub/rocky/10.0/BaseOS/x86_64/os/Packages/k/kernel-6.12.0-55.41.1.el10_0.x86_64.rpm
$ rpm -qlp kernel-6.12.0-55.41.1.el10_0.x86_64.rpm
warning: kernel-6.12.0-55.41.1.el10_0.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 6fedfc85: NOKEY
(contains no files)

However, conda-build falls over on that

Downloading https://dl.rockylinux.org/pub/rocky/10.0/BaseOS/x86_64/os/Packages/k/kernel-6.12.0-55.41.1.el10_0.x86_64.rpm
Extracting download
Traceback (most recent call last):
  File "/opt/conda/bin/conda-build", line 11, in <module>
    sys.exit(execute())
             ^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/conda_build/cli/main_build.py", line 622, in execute
    api.build(
  File "/opt/conda/lib/python3.12/site-packages/conda_build/api.py", line 211, in build
    return build_tree(
           ^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/conda_build/build.py", line 3669, in build_tree
    packages_from_this = build(
                         ^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/conda_build/build.py", line 2461, in build
    try_download(m, no_download_source=False, raise_error=True)
  File "/opt/conda/lib/python3.12/site-packages/conda_build/render.py", line 835, in try_download
    source.provide(metadata)
  File "/opt/conda/lib/python3.12/site-packages/conda_build/source.py", line 1041, in provide
    unpack(
  File "/opt/conda/lib/python3.12/site-packages/conda_build/source.py", line 197, in unpack
    folder = os.path.join(tmpdir, flist[0])
                                  ~~~~~^^^
IndexError: list index out of range

Conda Info

Details
++ conda info

     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /home/conda/.condarc
 populated config files : /opt/conda/.condarc
                          /home/conda/.condarc
          conda version : 25.9.1
    conda-build version : 25.9.0
         python version : 3.12.12.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=zen2
                          __conda=25.9.1=0
                          __glibc=2.39=0
                          __linux=6.11.0=0
                          __unix=0=0
       base environment : /opt/conda  (writable)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/conda/feedstock_root/build_artifacts/pkg_cache
                          /opt/conda/pkgs
       envs directories : /opt/conda/envs
                          /home/conda/.conda/envs
               platform : linux-64
             user-agent : conda/25.9.1 requests/2.32.5 CPython/3.12.12 Linux/6.11.0-1018-azure almalinux/10.0 glibc/2.39 solver/libmamba conda-libmamba-solver/25.4.0 libmambapy/2.3.3
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

Conda Config

Details
++ conda config --env --show-sources
==> /opt/conda/.condarc <==
add_pip_as_python_dependency: False
auto_update_conda: False
aggressive_update_packages:
  - ca-certificates
  - certifi
channel_priority: strict
channels:
  - conda-forge
show_channel_urls: True
conda_build:
  pkg_format: 2
  zstd_compression_level: 19

==> /home/conda/.condarc <==
pkgs_dirs:
  - /home/conda/feedstock_root/build_artifacts/pkg_cache
  - /opt/conda/pkgs
solver: libmamba
conda-build:
  root-dir: /home/conda/feedstock_root/build_artifacts

==> envvars <==
allow_softlinks: False
bld_path: /home/conda/feedstock_root/build_artifacts

Conda list

Details
++ conda list --show-channel-urls
# packages in environment at /opt/conda:
#
# Name                        Version          Build               Channel
_libgcc_mutex                 0.1              conda_forge         conda-forge
_openmp_mutex                 4.5              2_gnu               conda-forge
anaconda-cli-base             0.6.0            pyhd8ed1ab_0        conda-forge
anaconda-client               1.13.0           pyh29332c3_1        conda-forge
annotated-types               0.7.0            pyhd8ed1ab_1        conda-forge
archspec                      0.2.5            pyhd8ed1ab_0        conda-forge
attrs                         25.4.0           pyh71513ae_0        conda-forge
beautifulsoup4                4.14.2           pyha770c72_0        conda-forge
boltons                       25.0.0           pyhd8ed1ab_0        conda-forge
brotli-python                 1.2.0            py312h67db365_0     conda-forge
bzip2                         1.0.8            hda65f42_8          conda-forge
c-ares                        1.34.5           hb9d3cd8_0          conda-forge
ca-certificates               2025.11.12       hbd8a1cb_0          conda-forge
certifi                       2025.11.12       pyhd8ed1ab_0        conda-forge
cffi                          2.0.0            py312h460c074_1     conda-forge
chardet                       5.2.0            pyhd8ed1ab_3        conda-forge
charset-normalizer            3.4.4            pyhd8ed1ab_0        conda-forge
click                         8.1.8            pyh707e725_0        conda-forge
colorama                      0.4.6            pyhd8ed1ab_1        conda-forge
conda                         25.9.1           py312h7900ff3_0     conda-forge
conda-build                   25.9.0           py312ha128529_1     conda-forge
conda-env                     2.6.0            1                   conda-forge
conda-forge-ci-setup          4.23.1           py312hef7310e_100   conda-forge
conda-forge-metadata          0.12.0           pyhcf101f3_1        conda-forge
conda-index                   0.7.0            pyhd8ed1ab_0        conda-forge
conda-libmamba-solver         25.4.0           pyhd8ed1ab_0        conda-forge
conda-oci-mirror              0.2.3            pyhd8ed1ab_0        conda-forge
conda-package-handling        2.4.0            pyh7900ff3_2        conda-forge
conda-package-streaming       0.12.0           pyhd8ed1ab_0        conda-forge
cpp-expected                  1.3.1            h171cf75_0          conda-forge
defusedxml                    0.7.1            pyhd8ed1ab_0        conda-forge
deprecated                    1.3.1            pyhd8ed1ab_0        conda-forge
distro                        1.9.0            pyhd8ed1ab_1        conda-forge
evalidate                     2.0.5            pyhe01879c_0        conda-forge
filelock                      3.20.0           pyhd8ed1ab_0        conda-forge
fmt                           12.0.0           h2b0788b_0          conda-forge
frozendict                    2.4.7            py312h4c3975b_0     conda-forge
git                           2.51.2           pl5321h28be001_0    conda-forge
h2                            4.3.0            pyhcf101f3_0        conda-forge
hpack                         4.1.0            pyhd8ed1ab_0        conda-forge
hyperframe                    6.1.0            pyhd8ed1ab_0        conda-forge
icu                           75.1             he02047a_0          conda-forge
idna                          3.11             pyhd8ed1ab_0        conda-forge
jinja2                        3.1.6            pyhd8ed1ab_0        conda-forge
joblib                        1.5.2            pyhd8ed1ab_0        conda-forge
jq                            1.8.1            h73b1eb8_0          conda-forge
jsonpatch                     1.33             pyhd8ed1ab_1        conda-forge
jsonpointer                   3.0.0            py312h7900ff3_2     conda-forge
jsonschema                    4.25.1           pyhe01879c_0        conda-forge
jsonschema-specifications     2025.9.1         pyhcf101f3_0        conda-forge
jupyter_core                  5.9.1            pyhc90fa1f_0        conda-forge
keyutils                      1.6.3            hb9d3cd8_0          conda-forge
krb5                          1.21.3           h659f571_0          conda-forge
lcms2                         2.17             h717163a_0          conda-forge
ld_impl_linux-64              2.45             h1aa0949_0          conda-forge
lerc                          4.0.0            h0aef613_1          conda-forge
libarchive                    3.8.2            gpl_h7be2006_100    conda-forge
libcurl                       8.17.0           h4e3cde8_0          conda-forge
libdeflate                    1.25             h17f619e_0          conda-forge
libedit                       3.1.20250104     pl5321h7949ede_0    conda-forge
libev                         4.33             hd590300_2          conda-forge
libexpat                      2.7.1            hecca717_0          conda-forge
libffi                        3.5.2            h9ec8514_0          conda-forge
libfreetype                   2.14.1           ha770c72_0          conda-forge
libfreetype6                  2.14.1           h73754d4_0          conda-forge
libgcc                        15.2.0           h767d61c_7          conda-forge
libgcc-ng                     15.2.0           h69a702a_7          conda-forge
libgomp                       15.2.0           h767d61c_7          conda-forge
libiconv                      1.18             h3b78370_2          conda-forge
libjpeg-turbo                 3.1.2            hb03c661_0          conda-forge
liblief                       0.16.6           hecca717_1          conda-forge
liblzma                       5.8.1            hb9d3cd8_2          conda-forge
liblzma-devel                 5.8.1            hb9d3cd8_2          conda-forge
libmamba                      2.3.3            h09abcb8_1          conda-forge
libmambapy                    2.3.3            py312h9b917ee_1     conda-forge
libnghttp2                    1.67.0           had1ee68_0          conda-forge
libnsl                        2.0.1            hb9d3cd8_1          conda-forge
libpng                        1.6.50           h421ea60_1          conda-forge
libsolv                       0.7.35           h9463b59_0          conda-forge
libsqlite                     3.51.0           hee844dc_0          conda-forge
libssh2                       1.11.1           hcf80075_0          conda-forge
libstdcxx                     15.2.0           h8f9b012_7          conda-forge
libstdcxx-ng                  15.2.0           h4852527_7          conda-forge
libtiff                       4.7.1            h9d88235_1          conda-forge
libuuid                       2.41.2           he9a06e4_0          conda-forge
libwebp-base                  1.6.0            hd42ef1d_0          conda-forge
libxcb                        1.17.0           h8a09558_0          conda-forge
libxcrypt                     4.4.36           hd590300_1          conda-forge
libxml2                       2.15.1           h26afc86_0          conda-forge
libxml2-16                    2.15.1           ha9997c6_0          conda-forge
libzlib                       1.3.1            hb9d3cd8_2          conda-forge
lz4-c                         1.10.0           h5888daf_1          conda-forge
lzo                           2.10             h280c20c_1002       conda-forge
mamba                         2.3.3            heaf8479_1          conda-forge
markdown-it-py                4.0.0            pyhd8ed1ab_0        conda-forge
markupsafe                    3.0.3            py312h8a5da7c_0     conda-forge
mbedtls                       3.6.3.1          h5888daf_0          conda-forge
mdurl                         0.1.2            pyhd8ed1ab_1        conda-forge
menuinst                      2.4.1            py312h7900ff3_0     conda-forge
msgpack-python                1.1.2            py312hd9148b4_1     conda-forge
nbformat                      5.10.4           pyhd8ed1ab_1        conda-forge
ncurses                       6.5              h2d0b736_3          conda-forge
nlohmann_json-abi             3.12.0           h0f90c79_1          conda-forge
oniguruma                     6.9.10           hb9d3cd8_0          conda-forge
openjpeg                      2.5.4            h55fea9a_0          conda-forge
openssl                       3.6.0            h26f9b46_0          conda-forge
oras-py                       0.1.14           pyhd8ed1ab_0        conda-forge
packaging                     25.0             pyh29332c3_1        conda-forge
patch                         2.8              hb03c661_1002       conda-forge
patchelf                      0.17.2           h58526e2_0          conda-forge
pcre2                         10.46            h1321c63_0          conda-forge
perl                          5.32.1           7_hd590300_perl5    conda-forge
pillow                        12.0.0           py312h0889fd4_0     conda-forge
pip                           25.3             pyh8b19718_0        conda-forge
pixi                          0.59.0           ha759004_0          conda-forge
pkginfo                       1.12.1.2         pyhd8ed1ab_0        conda-forge
platformdirs                  4.5.0            pyhcf101f3_0        conda-forge
pluggy                        1.6.0            pyhd8ed1ab_0        conda-forge
psutil                        7.1.3            py312h5253ce2_0     conda-forge
pthread-stubs                 0.4              hb9d3cd8_1002       conda-forge
py-lief                       0.16.6           py312h1289d80_1     conda-forge
pybind11-abi                  4                hd8ed1ab_3          conda-forge
pycosat                       0.6.6            py312h4c3975b_3     conda-forge
pycparser                     2.22             pyh29332c3_1        conda-forge
pydantic                      2.12.4           pyh3cfb1c2_0        conda-forge
pydantic-core                 2.41.5           py312h868fb18_1     conda-forge
pydantic-settings             2.12.0           pyh3cfb1c2_0        conda-forge
pygments                      2.19.2           pyhd8ed1ab_0        conda-forge
pysocks                       1.7.1            pyha55dd90_7        conda-forge
python                        3.12.12          hd63d673_1_cpython  conda-forge
python-dateutil               2.9.0.post0      pyhe01879c_2        conda-forge
python-dotenv                 1.2.1            pyhcf101f3_0        conda-forge
python-fastjsonschema         2.21.2           pyhe01879c_0        conda-forge
python-libarchive-c           5.3              pyhe01879c_1        conda-forge
python_abi                    3.12             8_cp312             conda-forge
pytz                          2025.2           pyhd8ed1ab_0        conda-forge
pyyaml                        6.0.3            py312h8a5da7c_0     conda-forge
rattler-build                 0.49.0           he64ecbb_0          conda-forge
rattler-build-conda-compat    1.4.9            pyhd8ed1ab_0        conda-forge
readchar                      4.2.1            pyhe01879c_0        conda-forge
readline                      8.2              h8c095d6_2          conda-forge
referencing                   0.37.0           pyhcf101f3_0        conda-forge
reproc                        14.2.5.post0     hb9d3cd8_0          conda-forge
reproc-cpp                    14.2.5.post0     h5888daf_0          conda-forge
requests                      2.32.5           pyhd8ed1ab_0        conda-forge
requests-toolbelt             1.0.0            pyhd8ed1ab_1        conda-forge
rich                          14.2.0           pyhcf101f3_0        conda-forge
ripgrep                       15.1.0           hdab8a38_0          conda-forge
rpds-py                       0.28.0           py312h868fb18_2     conda-forge
ruamel.yaml                   0.18.16          py312h4c3975b_0     conda-forge
ruamel.yaml.clib              0.2.14           py312h4c3975b_0     conda-forge
setuptools                    80.9.0           pyhff2d567_0        conda-forge
shellingham                   1.5.4            pyhd8ed1ab_2        conda-forge
shyaml                        0.6.2            pyhd3deb0d_0        conda-forge
simdjson                      4.0.7            hb700be7_0          conda-forge
six                           1.17.0           pyhe01879c_1        conda-forge
soupsieve                     2.8              pyhd8ed1ab_0        conda-forge
su-exec                       0.2              h166bdaf_1003       conda-forge
tini                          0.19.0           h166bdaf_1          conda-forge
tk                            8.6.13           noxft_ha0e22de_103  conda-forge
tomli                         2.3.0            pyhcf101f3_0        conda-forge
tqdm                          4.67.1           pyhd8ed1ab_1        conda-forge
traitlets                     5.14.3           pyhd8ed1ab_1        conda-forge
truststore                    0.10.3           pyhe01879c_0        conda-forge
typer                         0.20.0           pyhefaf540_1        conda-forge
typer-slim                    0.20.0           pyhcf101f3_1        conda-forge
typer-slim-standard           0.20.0           h4daf872_1          conda-forge
typing-extensions             4.15.0           h396c80c_0          conda-forge
typing-inspection             0.4.2            pyhd8ed1ab_0        conda-forge
typing_extensions             4.15.0           pyhcf101f3_0        conda-forge
tzdata                        2025b            h78e105d_0          conda-forge
urllib3                       2.5.0            pyhd8ed1ab_0        conda-forge
wheel                         0.45.1           pyhd8ed1ab_1        conda-forge
wrapt                         1.17.3           py312h4c3975b_1     conda-forge
xorg-libxau                   1.0.12           hb03c661_1          conda-forge
xorg-libxdmcp                 1.1.5            hb03c661_1          conda-forge
xz                            5.8.1            hbcc6ac9_2          conda-forge
xz-gpl-tools                  5.8.1            hbcc6ac9_2          conda-forge
xz-tools                      5.8.1            hb9d3cd8_2          conda-forge
yaml                          0.2.5            h280c20c_3          conda-forge
yaml-cpp                      0.8.0            h59595ed_0          conda-forge
zlib-ng                       2.2.5            hde8ca8f_0          conda-forge
zstandard                     0.25.0           py312h5253ce2_1     conda-forge
zstd                          1.5.7            hb8e6e7a_2          conda-forge

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type::bugdescribes erroneous operation, use severity::* to classify the type

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions