android-tools icon indicating copy to clipboard operation
android-tools copied to clipboard

Don't use absolute dir for mkbootimg symlink

Open Thaodan opened this issue 1 year ago • 2 comments

I noticed that the absolute symlink did not work on my system. While investigating I noticed that on SUSE the symlink gets relinked to be relative to be relative to the install location of the symlink after which the link works. Using a relative link seems safer to me.

Thaodan avatar Mar 14 '24 08:03 Thaodan

Your change contains 2 set of modifications - cmake file cleanup, and the relative symlink change itself.

I noticed that the absolute symlink did not work on my system.

Once you apply the cmake cleanup part, what is the target's absolute path for that symlink? I wonder if your cleanup part is enough to fix the issue.

anatol avatar Mar 20 '24 01:03 anatol

Your change contains 2 set of modifications - cmake file cleanup, and the relative symlink change itself.

I can separate those changes.

I noticed that the absolute symlink did not work on my system.

Once you apply the cmake cleanup part, what is the target's absolute path for that symlink? I wonder if your cleanup part is enough to fix the issue.

RPM does like not like relative symlinks as they relative to the host environment and not to the builder which breaks for example the execution inside the built process.

To check if the script still works we start it once which doesn't work with an absolute link.

https://github.com/rpm-software-management/rpm/issues/668

Thaodan avatar Mar 22 '24 10:03 Thaodan

Something like this would be welcomed for the Snap release. Right now I'm replacing the symlink in a post-installation step during packaging.

fredldotme avatar Jun 06 '24 10:06 fredldotme

@Thaodan could you please split your change into multiple commit per its functionality: one commit for the symlink change, and another commit for the cleanup?

anatol avatar Jun 18 '24 01:06 anatol

@Biswa96 the PR is ready for merge. Could you please take a look?

anatol avatar Jul 04 '24 03:07 anatol