IndexError: list index out of range
I'm trying to plumb rechunk into my [personal image](https://github.com/samcday/workstation-config) machinery. I came up with this [initial stab](https://github.com/samcday/workstation-config/commit/d15137f91c2584d940e97a56ee2dc186bc48a57d), but [it's failing](https://github.com/samcday/workstation-config/actions/runs/10364453555/job/28689765050) with:
```
>>>>>>> Reading OSTree ref 'master': 64%|██████▍ | 191890/300000 [00:08<00:04, 22633.42files/s]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/bin/rechunk:8 in <module> │
│ │
│ 5 from rechunk.__main__ import main │
│ 6 if __name__ == '__main__': │
│ 7 │ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) │
│ ❱ 8 │ sys.exit(main()) │
│ 9 │
│ │
│ /usr/local/lib/python3.12/site-packages/rechunk/__main__.py:177 in main │
│ │
│ 174 def main(): │
│ 175 │ setup_logger() │
│ 176 │ try: │
│ ❱ 177 │ │ argparse_func() │
│ 178 │ except KeyboardInterrupt: │
│ 179 │ │ logger = logging.getLogger(__name__) │
│ 180 │ │ logger.info("Received keyboard interrupt. Exiting.") │
│ │
│ /usr/local/lib/python3.12/site-packages/rechunk/__main__.py:151 in │
│ argparse_func │
│ │
│ 148 │ │ │ .replace("\\r", "\r") │
│ 149 │ │ ) │
│ 150 │ │
│ ❱ 151 │ alg_main( │
│ 152 │ │ repo=args.repo, │
│ 153 │ │ ref=args.ref, │
│ 154 │ │ contentmeta_fn=args.contentmeta, │
│ │
│ /usr/local/lib/python3.12/site-packages/rechunk/alg.py:573 in main │
│ │
│ 570 │ │ ostree_map, ostree_hash = get_ostree_map(repo, ref) │
│ 571 │ │ │
│ 572 │ │ # Use the database by pulling it from ostree │
│ ❱ 573 │ │ packages = run_with_ostree_files( │
│ 574 │ │ │ repo, ostree_map, ["/usr/share/rpm/rpmdb.sqlite"], get_pac │
│ 575 │ │ ) │
│ 576 │ │ logger.info(f"Found {len(packages)} packages.") │
│ │
│ /usr/local/lib/python3.12/site-packages/rechunk/ostree.py:192 in │
│ run_with_ostree_files │
│ │
│ 189 │ │ │ │ logger.warning(f"File not found in OSTree: {fn}") │
│ 190 │ │ │ │ raise FileNotFoundError(fn) │
│ 191 │ │ │
│ ❱ 192 │ │ return callback(dir) │
│ 193 │
│ 194 │
│ 195 if __name__ == "__main__": │
│ │
│ /usr/local/lib/python3.12/site-packages/rechunk/fedora.py:38 in get_packages │
│ │
│ 35 │ │ │ data = line[1:].split(" ") │
│ 36 │ │ │ name = data[0] │
│ 37 │ │ │ nevra = data[1] │
│ ❱ 38 │ │ │ version = data[2] │
│ 39 │ │ │ release = data[3] │
│ 40 │ │ │ size = int(data[4]) │
│ 41 │ │ │ package = Package( │
╰──────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range
```
It seems to be dying somewhere deep in the process of processing the packages in the image. I wonder if this is because I'm [doing](https://github.com/samcday/workstation-config/blob/8dfea40/Dockerfile#L112-L113) some [strange things?](https://github.com/samcday/workstation-config/blob/8dfea40/Dockerfile#L118-L119)
关闭于 2024-08-13 6 条评论