Absolute symlinks are wrong in mode=dir #16

Closed
opened 2021-10-28 09:43:48 +00:00 by Ghost · 2 comments

When I run mmdebstrap with --mode=fakechroot --format=dir then absolute symlinks in the generated tree contain the full real path:

ROOT/etc/localtime -> /home/nils/packetalarm/is/OUT/ROOT/usr/share/zoneinfo/Etc/UTC

When I run it with --format=tar the same symlink is generated correctly as:

localtime -> /usr/share/zoneinfo/Etc/UTC

(The /etc/localtime symlink is just an example. All absolute symlinks in the generated tree contain the actual complete filenames)

But imho the only real use of an output with --format=dir is either to chroot to it, or to create a tarball of it myself. In both cases, the absolute symlinks point to the wrong location.

When I run mmdebstrap with --mode=fakechroot --format=dir then absolute symlinks in the generated tree contain the full real path: ROOT/etc/localtime -> /home/nils/packetalarm/is/OUT/ROOT/usr/share/zoneinfo/Etc/UTC When I run it with --format=tar the same symlink is generated correctly as: localtime -> /usr/share/zoneinfo/Etc/UTC (The /etc/localtime symlink is just an example. All absolute symlinks in the generated tree contain the actual complete filenames) But imho the only real use of an output with --format=dir is either to chroot to it, or to create a tarball of it myself. In both cases, the absolute symlinks point to the wrong location.
Owner

No. This is not a bug but just how fakechroot works. If you don't want it, then don't use fakechroot.

Suppose mmdebstrap would convert all symlinks to not have the full path. Then anybody who wants to create a tarball of it later (as you intend to) would have broken symlinks inside the chroot. So this is not an option.

If you disagree, please explain further why this would be useful.

No. This is not a bug but just how fakechroot works. If you don't want it, then don't use fakechroot. Suppose mmdebstrap would convert all symlinks to not have the full path. Then anybody who wants to create a tarball of it later (as you intend to) would have broken symlinks inside the chroot. So this is not an option. If you disagree, please explain further why this would be useful.
Owner

If you don't have any further input, I'll close this bug.

If you don't have any further input, I'll close this bug.
josch closed this issue 2021-12-06 10:24:52 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#16
No description provided.