Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chisel dies on symlink when run for second time #5

Open
woky opened this issue Jun 3, 2022 · 0 comments
Open

Chisel dies on symlink when run for second time #5

woky opened this issue Jun 3, 2022 · 0 comments

Comments

@woky
Copy link
Contributor

woky commented Jun 3, 2022

Chisel version: 2b260842c9c

Currently chisel cannot be run repeatedly on already populated output directory when there are symlinks. IOW chisel run is not idempotent.

Example slice (libc6_libs dependency omitted for brevity):

$ cat slices/libkeyutils1.yaml 
package: libkeyutils1

slices:
  libs:
    contents:
      /lib/x86_64-linux-gnu/libkeyutils.so.*:

First run is OK:

$ mkdir output
$ chisel cut --release . --root output/ libkeyutils1_libs
...
2022/06/03 12:16:25 Extracting files from package "libkeyutils1"...
$ tree --noreport -p output/
[drwxrwxr-x]  output/
└── [drwxr-xr-x]  lib
    └── [drwxr-xr-x]  x86_64-linux-gnu
        ├── [lrwxrwxrwx]  libkeyutils.so.1 -> libkeyutils.so.1.9
        └── [-rw-r--r--]  libkeyutils.so.1.9

Second run fails (no changes in output/):

$ chisel cut --release . --root output/ libkeyutils1_libs
...
2022/06/03 12:17:03 Extracting files from package "libkeyutils1"...
error: cannot extract from package "libkeyutils1": symlink libkeyutils.so.1.9 output/lib/x86_64-linux-gnu/libkeyutils.so.1: file exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant