From 8fe867991cb9530e8fca2d576ebe19d420dbb8f2 Mon Sep 17 00:00:00 2001 From: sisungo Date: Thu, 18 Jun 2026 01:20:14 +0800 Subject: [PATCH] feat (lib): fix cpp auto-pack symlink error Signed-off-by: sisungo --- lib/cpp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/cpp.py b/lib/cpp.py index 40e745d..716f676 100644 --- a/lib/cpp.py +++ b/lib/cpp.py @@ -83,7 +83,10 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter) pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}")) pc.addfile(ent.path, f"{dstdir}/{ent.name}") elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)): - pc.addfile(ent.path, f"{dstdir}/{ent.name}") + try: + pc.addfile(ent.path, f"{dstdir}/{ent.name}") + except Exception: + pass def _is_dev_file(ent) -> bool: @@ -94,6 +97,8 @@ def _is_dev_file(ent) -> bool: or ent.name.endswith(".pc") or ent.name.endswith(".h") or ent.name.endswith(".cmake") + or ent.name.endswith(".inc") + or ("Makefile" in ent.name) )