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

Symlinks and content downloader #7415

Closed
Fishaphrodite opened this issue Nov 1, 2022 · 4 comments
Closed

Symlinks and content downloader #7415

Fishaphrodite opened this issue Nov 1, 2022 · 4 comments
Assignees

Comments

@Fishaphrodite
Copy link

This is more for reference so people don't get tricked by this behavior, as I don't believe anyone would care much in general

If your /userdata/roms folder is a symlink to somewhere else, downloading something targeting inside the /userdata/roms folder will remove the link and put and empty directory instead (I assume it does this to ensure a realpath exists, without checking if any links satisfy the path itself). This can be verified by downloading blade buster for the NES from the content downloader for exemple.

This also occurs if only the system folder itself is a symlink (so a symlink /userdata/roms/nes will be replaced by an empty nes folder before extracting said package); I assume it recreates parents folder for the whole path if it doesn't find an actual folder along the way.

For information, this does Not remove any files, the links are the only ones getting removed, not their source. Also for those reading that are not aware, batocera itself doesn't use symlinks to handle where the /userdata folder points at, it mounts another folder, this issue doesn't happen unless you manually specifically symlink stuff.

@dmanlfc
Copy link
Collaborator

dmanlfc commented Nov 3, 2022

why is this here? should this not go in a wiki ?

@Fishaphrodite
Copy link
Author

Fishaphrodite commented Nov 3, 2022

It's still a valid issue to have your share structure screwed up by the content downloader, even if it's a niche use case. Symlinks are a feature of the filesystem used by default in bato after all.

I guess it could be noted somewhere in the wiki as well in the meantime.

EDIT: if you'd rather have this being closed as "won't fix" or something, that's not a problem.

@uureel
Copy link

uureel commented Dec 28, 2022

It's still a valid issue to have your share structure screwed up by the content downloader, even if it's a niche use case. Symlinks are a feature of the filesystem used by default in bato after all.

I guess it could be noted somewhere in the wiki as well in the meantime.

EDIT: if you'd rather have this being closed as "won't fix" or something, that's not a problem.

this isn't sane and shouldn't be happening; might possibly be attributed to busybox tar used in batocera, i recall seeing a few days ago someone mentioned on dc that bato's bb tar 'can't handle symlinks' - reading this now rings the bell. @dmanlfc

@n2qz n2qz self-assigned this Dec 30, 2023
@n2qz n2qz added triage needed cannot fix the ask is impossible not a bug and removed triage needed labels Dec 30, 2023
@n2qz
Copy link

n2qz commented Dec 31, 2023

The behavior is expected and normal for the pacman package manager used to install packages from the content downloader.

If your /userdata/roms folder is a symlink to somewhere else

Use sharedevice=DEVICES with a ROMS@ mount, instead of a symlink.

This also occurs if only the system folder itself is a symlink (so a symlink /userdata/roms/nes

Use a manual bind mount instead of a symbolic link, for mapping a roms folder to a different drive, for use with the content downloader.

@n2qz n2qz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants