Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Error when output folder name starts with a . #362

Open
dhirschfeld opened this issue Aug 6, 2023 · 0 comments
Open

Error when output folder name starts with a . #362

dhirschfeld opened this issue Aug 6, 2023 · 0 comments

Comments

@dhirschfeld
Copy link
Contributor

❯ boa build --pkg-format 2 --output-folder='./.build/dist' '.build/conda'

fails with:

RuntimeError: Multi-download failed. Reason: Transfer finalized, status: 404 [https://conda.anaconda.org/t/dh-365f7d4a-c85f-4354-8d75-ded85f35e164/.build/dist/noarch/repodata.json] 3388 bytes
Traceback
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/user/code/github/mamba-org/boa/boa/core/run_build.py:307 in build_recipe                   │
│                                                                                                  │
│   304 │   │   │                                                                                  │
│   305 │   │   │   o.config._build_id = o0.config.build_id                                        │
│   306 │   │   │                                                                                  │
│ ❱ 307 │   │   │   o.finalize_solve(sorted_outputs)                                               │
│   308 │   │   │                                                                                  │
│   309 │   │   │   meta = MetaData(recipe_path, o)                                                │
│   310 │   │   │   o.set_final_build_id(meta, sorted_outputs)                                     │
│                                                                                                  │
│ /home/user/code/github/mamba-org/boa/boa/core/recipe_output.py:595 in finalize_solve             │
│                                                                                                  │
│   592 │   def finalize_solve(self, all_outputs):                                                 │
│   593 │   │                                                                                      │
│   594 │   │   self._solve_env("build", all_outputs)                                              │
│ ❱ 595 │   │   self._solve_env("host", all_outputs)                                               │
│   596 │   │   self._solve_env("run", all_outputs)                                                │
│   597 │   │                                                                                      │
│   598 │   │   # TODO figure out if we can avoid this?!                                           │
│                                                                                                  │
│ /home/user/code/github/mamba-org/boa/boa/core/recipe_output.py:535 in _solve_env                 │
│                                                                                                  │
│   532 │   │   │   else:                                                                          │
│   533 │   │   │   │   subdir = self.config.build_subdir                                          │
│   534 │   │   │                                                                                  │
│ ❱ 535 │   │   │   solver, pkg_cache = get_solver(                                                │
│   536 │   │   │   │   subdir, output_folder=self.config.output_folder                            │
│   537 │   │   │   )                                                                              │
│   538 │   │   │   if env == "host":                                                              │
│                                                                                                  │
│ /home/user/code/github/mamba-org/boa/boa/core/solver.py:50 in get_solver                         │
│                                                                                                  │
│    47 │   │   │   os.makedirs(pkg_cache, exist_ok=True)                                          │
│    48 │                                                                                          │
│    49 │   if not solver_cache.get(subdir):                                                       │
│ ❱  50 │   │   solver_cache[subdir] = MambaSolver([], subdir, output_folder)                      │
│    51 │                                                                                          │
│    52 │   return solver_cache[subdir], pkg_cache                                                 │
│    53                                                                                            │
│                                                                                                  │
│ /home/user/code/github/mamba-org/boa/boa/core/solver.py:141 in __init__                          │
│                                                                                                  │
│   138 │   │   self.local_index = []                                                              │
│   139 │   │   self.local_repos = {}                                                              │
│   140 │   │   # load local repo, too                                                             │
│ ❱ 141 │   │   self.replace_channels()                                                            │
│   142 │                                                                                          │
│   143 │   def replace_installed(self, prefix):                                                   │
│   144 │   │   prefix_data = libmambapy.PrefixData(prefix)                                        │
│                                                                                                  │
│ /home/user/code/github/mamba-org/boa/boa/core/solver.py:153 in replace_channels                  │
│                                                                                                  │
│   150 │                                                                                          │
│   151 │   def replace_channels(self):                                                            │
│   152 │   │   console.print(f"[blue]Reloading output folder: {self.output_folder}")              │
│ ❱ 153 │   │   self.local_index = get_index(                                                      │
│   154 │   │   │   (self.output_folder,), platform=self.platform, prepend=False                   │
│   155 │   │   )                                                                                  │
│   156                                                                                            │
│                                                                                                  │
│ /opt/mambaforge/envs/bin/lib/python3.11/site-packages/mamba/utils.py:124 in get_index            │
│                                                                                                  │
│   121 │   │   │   sd.finalize_checks()                                                           │
│   122 │   │   dlist.add(sd)                                                                      │
│   123 │                                                                                          │
│ ❱ 124 │   is_downloaded = dlist.download(api.MAMBA_DOWNLOAD_FAILFAST)                            │
│   125 │                                                                                          │
│   126 │   if not is_downloaded:                                                                  │
│   127 │   │   raise RuntimeError("Error downloading repodata.")                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Multi-download failed. Reason: Transfer finalized, status: 404 [https://conda.anaconda.org/t/dh-365f7d4a-c85f-4354-8d75-ded85f35e164/.build/dist/noarch/repodata.json] 3387 bytes

Whereas using ./.build/dist works:

❯ boa build --pkg-format 2 --output-folder='./.build/dist' '.build/conda'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant