Skip to content

Commit

Permalink
debian: handle new .gir locations
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Feb 24, 2024
1 parent b373855 commit d354007
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pgidocgen/create_debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# version 2.1 of the License, or (at your option) any later version.

import os
import glob
import sys
import subprocess
import shutil
Expand Down Expand Up @@ -176,11 +177,12 @@ def fetch_girs(girs, dest):
os.mkdir(dst)
for path in entries:
subprocess.check_call(["dpkg", "-x", path, tmp_root])
base_src = os.path.join(tmp_root, "usr", "share", "gir-1.0")
if not os.path.isdir(base_src):
continue
for e in os.listdir(base_src):
src = os.path.join(base_src, e)
girs = glob.glob(tmp_root + "/**/gir-1.0/*.gir", recursive=True)
for src in girs:
# in some cases when gir files move from share to lib there
# are symlinks for backwards compat, just ignore them
if os.path.islink(src):
continue
shutil.copy(src, dst)
shutil.rmtree(tmp_root)

Expand Down

0 comments on commit d354007

Please sign in to comment.