Commit 332c86df authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

libdca.recipe: Fix symlink creation code

Fixes CI error:
Traceback (most recent call last):
  File "/builds/nirbheek/cerbero/cerbero/build/", line 461, in _cook_recipe_step
    ret = stepfunc()
  File "/builds/nirbheek/cerbero/cerbero/build/", line 93, in wrapped
  File "/builds/nirbheek/cerbero/recipes/libdca.recipe", line 34, in post_install
    os.symlink(src, os.path.join(self.config.prefix, dest))

FileExistsError: [Errno 17] File exists: 'lib/libdts.a' -> '/builds/nirbheek/cerbero/cerbero-build/dist/mingw_x86_64/libdca.a'
Part-of: <!618>
parent 102f0638
Pipeline #208212 passed with stages
in 71 minutes and 32 seconds
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from pathlib import Path
class Recipe(recipe.Recipe):
name = 'libdca'
......@@ -25,11 +26,13 @@ class Recipe(recipe.Recipe):
# Create relative symlinks to prevent breakage during packaging
if self.config.platform != Platform.WINDOWS:
dangling = [
('lib/libdts.a', 'libdca.a'),
('share/man/man1/extract_dts.1', 'extract_dca.1'),
('share/man/man1/dtsdec.1', 'dcadec.a'),
('libdca.a', 'lib/libdts.a'),
('extract_dca.1', 'share/man/man1/extract_dts.1'),
('dcadec.1', 'share/man/man1/dtsdec.1'),
prefix = Path(self.config.prefix)
for src, dest in dangling:
os.remove(os.path.join(self.config.prefix, src))
os.symlink(src, os.path.join(self.config.prefix, dest))
dest = prefix / dest
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment