packages: Pkgbase.update(): fixups
This commit is contained in:
parent
e691afd328
commit
16b2f1a3c2
1 changed files with 5 additions and 4 deletions
|
@ -180,11 +180,12 @@ class Pkgbase(Pkgbuild):
|
||||||
if lazy and self.sources_refreshed:
|
if lazy and self.sources_refreshed:
|
||||||
return
|
return
|
||||||
parsed = parse_pkgbuild(self.path, sources_refreshed=True)
|
parsed = parse_pkgbuild(self.path, sources_refreshed=True)
|
||||||
basepkgs = [p for p in parsed if isinstance(p, Pkgbase)]
|
basepkg = parsed[0]
|
||||||
if not len(basepkgs) == 1:
|
assert isinstance(basepkg, (Pkgbase, SubPkgbuild))
|
||||||
raise Exception(f"error refreshing {self.name}: wrong number of base packages found: {basepkgs}")
|
if isinstance(basepkg, SubPkgbuild):
|
||||||
|
basepkg = basepkg.pkgbase
|
||||||
self.sources_refreshed = True
|
self.sources_refreshed = True
|
||||||
self.update(basepkgs[0])
|
self.update(basepkg)
|
||||||
|
|
||||||
|
|
||||||
class SubPkgbuild(Pkgbuild):
|
class SubPkgbuild(Pkgbuild):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue