debian/local/plymouth.hook: copy theme files with --dereference

Theme authors (and fellow plymouth theme packagers) might prefer to use symlinks in their themes if the files are identical to what is already shipped in other plymouth theme packages. Using cp with --dereference makes sure that if the file is a symlink, the content behind the file is copied instead of creating an initramfs with broken symlinks in it.

For example there already exist multiple two-step themes and several which are very similar to the spinner theme. This commit avoids having to copy files like the throbber or the animation but instead allows creating a symlink farm to the spinner theme.

This also eases copyright documentation for fellow packagers and reduces the amount of duplication in the archive.

Added Bonus: if the theme contains a broken symlink, then before this commit, there was no indication of that problem. With this commit, cp will error-out if it is unable to dereference the symlink.

Since filing this MR didn't initially work I also filed this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112280

In contrast to the patches in the bug, this commit closes that bug.

Merge request reports

Loading