Skip to content

Commit

Permalink
Add missing dependencies and a tool to check it
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-costas committed Sep 19, 2024
1 parent 7f7aae4 commit 2070ba6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ parts:
done
debs:
after: [ libgnome-games-support, libadwaita, libgweather, libayatana-appindicator, libsoup3, librest ]
after: [ libgnome-games-support, libadwaita, libgweather, libayatana-appindicator, libsoup3, librest, buildenv, at-spi2-core, webp-pixbuf-loader ]
plugin: nil
stage-packages:
- appstream
Expand Down
43 changes: 43 additions & 0 deletions tools/check_dependencies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

import os
import sys
import yaml

# Ensure that "deb" part depends on all previous parts

config_file = "snapcraft.yaml"
if not os.path.exists(config_file):
config_file = os.path.join("snap", "snapcraft.yaml")

data = yaml.safe_load(open(config_file, "r"))

parts = {}

for part in data['parts']:
if part == "debs":
break
parts[part] = False

def filldeps(part):
global data
global parts
if 'after' not in data['parts'][part]:
return

deps = data['parts'][part]['after']
for dep in deps:
parts[dep] = True
filldeps(dep)

filldeps("debs")
failed = False
for part in parts:
if parts[part]:
continue
print(f"DEBS must depend on {part}")
failed = True

if failed:
sys.exit(1)
print("All dependencies are correct")

0 comments on commit 2070ba6

Please sign in to comment.