]> git.proxmox.com Git - debcargo-conf.git/commitdiff
chain_build: improve apt detection
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 3 Jul 2023 12:08:46 +0000 (14:08 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 3 Jul 2023 12:08:46 +0000 (14:08 +0200)
there might be cache entries that are not install candidates, add another
condition to the guard. one example would be repositories that are pinned with
a negative priority.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
dev/chain_build.py

index ff496df925e6785864b31bf51bc9b67501993373..c92818d26fc07e416d2e70b1cb7462a51e9122f8 100755 (executable)
@@ -86,7 +86,7 @@ def find_built(specs: list[tuple[str, str]]) -> list[tuple[str, str, str]]:
                        except:
                                pass
                pkg = aptc.get(f'librust-{_crate}-dev')
-               if pkg is not None and (ver == '*' or pkg.candidate.version.startswith(ver)):
+               if pkg is not None and pkg.candidate is not None and (ver == '*' or pkg.candidate.version.startswith(ver)):
                        built.append((crate, pkg.candidate.version, 'apt'))
                        continue
                if ver == '*':