Absolute symlinks are wrong in mode=dir #16

Closed
opened 2 years ago by Ghost · 2 comments
Ghost commented 2 years ago

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.
josch commented 2 years ago
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.
josch commented 2 years ago
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 2 years ago
Sign in to join this conversation.
No Label
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
Loading…
There is no content yet.