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

No longer able to use symlinks to roms #38

Closed
abuchanan920 opened this issue Feb 23, 2024 · 3 comments
Closed

No longer able to use symlinks to roms #38

abuchanan920 opened this issue Feb 23, 2024 · 3 comments

Comments

@abuchanan920
Copy link

Describe the bug
I have my roms on a samba share and mounted to my arcade machine at /mnt/Emulation/MAME. Under that I have various subdirectories for roms for different mame versions, such as /mnt/Emulation/MAME/mame-2010.

In my /home/pi/RetroPie/roms/arcade directory, I have symlinks to the appropriate roms, such as:
/home/pi/RetroPie/roms/arcade/romfile.zip -> /mnt/Emulation/MAME/mame-2010/romfile.zip

This used to work just fine and would result in the gamefile.xml file having a path to the rom as /home/pi/RetroPie/roms/arcade/romfile.zip (the location of the symlink) but now has /mnt/Emulation/MAME/mame-2013/romfile.zip (the target of the symlink) along with some odd directories at the bottom of the file such as:

	<folder>
		<path>./../../../../../mnt/Emulation/MAME/target-mame2003-plus</path>
		<name>target-mame2003-plus</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation/MAME</path>
		<name>MAME</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation</path>
		<name>Emulation</name>
	</folder>
	<folder>
		<path>./../../../../../mnt</path>
		<name>mnt</name>
	</folder>
	<folder>
		<path>./../../../../..</path>
		<name>..</name>
	</folder>
	<folder>
		<path>./../../../..</path>
		<name>..</name>
	</folder>
	<folder>
		<path>./../../..</path>
		<name>..</name>
	</folder>
	<folder>
		<path>./../..</path>
		<name>..</name>
	</folder>
	<folder>
		<path>./..</path>
		<name>..</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation/MAME/target-mame2010</path>
		<name>target-mame2010</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation/MAME/target-fbneo</path>
		<name>target-fbneo</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation/MAME/target-mame2016</path>
		<name>target-mame2016</name>
	</folder>
	<folder>
		<path>./../../../../../mnt/Emulation/MAME/target-078</path>
		<name>>target-078</name>
	</folder>

This results in emulationstation not working properly and giving a ton of errors that look like:

Feb 23 01:47:43 lvl0:   File path "/mnt/Emulation/MAME/target-mame2003-plus/sonicwi2.zip" is outside system path "/home/pi/RetroPie/roms/arcade"
Feb 23 01:47:43 lvl0:   Error finding/creating FileData for "/mnt/Emulation/MAME/target-mame2003-plus/sonicwi2.zip", skipping.

It seems that 4aff225 is the root cause. Probably the change from using the absolute path to the canonical path around line 180 in the new file.

To Reproduce
See above

Expected behavior
The path to the symlink should be what is reflected in gamelist.xml file, not the target of the symlink which will break emulationstation.

Special circumstances
Described above

Terminal output
[Replace this text with any useful Skyscraper terminal output that might help clarify your issue. For longer output use pastebin.com, ix.io or similiar.]

Technical information

  • Skyscraper version: 3.10.1 (compiled locally on Raspian Bookworm 64-bit)
  • Configuration switches applied (config.ini, commandline, ...)
    • I've tried a number of things here actually, but this one demonstrates it - an empty config.ini and run like: /opt/retropie/supplementary/skyscraper/Skyscraper -p arcade -g /home/pi/.emulationstation/gamelists/arcade -o /home/pi/.emulationstation/downloaded_media/arcade --flags unattend,skipped,videos I've tried adding flags like relative and nosubdirs to no avail.
  • OS and Version Raspian Bookworm 64-bit

Additional context
[Replace this text with any additional context that might help understand this issue better. Optional.]

@Gemba
Copy link
Owner

Gemba commented Feb 24, 2024

Thanks for the detailed report and PR. Valid claim.

I assume it is ok for you if the relative path would be canonical (everything right of the caret below)? e.g:

/home/pi/RetroPie/roms/<platform>/<symlink-inside-of-platform>/rom.zip # --> would be absolute: path/to/rom.zip
---------------------------------^

I remember having some trouble when the inputDir is not canonical, but I am pretty sure to be able to use the absolute path for the gamelist creation. Leave it with me.

@abuchanan920
Copy link
Author

I think so, yes

Gemba added a commit that referenced this issue Feb 26, 2024
Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.
@Gemba
Copy link
Owner

Gemba commented Feb 26, 2024

I followed your reverting, and remembered why I did change it in the first place. Thus I addressed also the corner-case I noticed.
Can you build from https://github.com/Gemba/skyscraper/tree/fix_issue_38 and test if it is ok also on your side?

@Gemba Gemba closed this as completed in 597be95 Feb 27, 2024
retrobit pushed a commit to retrobit/skyscraper that referenced this issue Mar 4, 2024
Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.
retrobit added a commit to retrobit/skyscraper that referenced this issue Mar 4, 2024
Updated `aliasMap.csv` comments

platform psp: added *.chd

Dev Container support w/Dockerfile (Gemba#23)

Co-authored-by: retrobit <6226450+retrobit@users.noreply.github.com>

Rel 3.10.0 (Gemba#26)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

Rel 3.10.0 (Gemba#27)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

* Version 3.10.0

Fix issue 28 (Gemba#32)

* simplified code with predefined function

* Fix Gemba#28

Fix cont. integration workflo (Gemba#33)

* update package index before install

Being pedantic/consistent

Pedantic/clarifying/consistent

Removed file used for testing

Reverted ES Game List scraper - doesn't make sense to use `aliasMap.csv` with this scraper

Not sure why this keeps getting added... I avoid staging it purposefully. Removed.

Scummvm: Changes to generate a ROM folder.svm/ as <game/> launcher instead of folder. (Gemba#35)

* Scummvm: Changes to generate a ROM `folder.svm/` as `<game/>` launcher instead of folder.

update README

Update from RetroPie Project (2024-02-22)

cf. RetroPie/EmulationStation#866

Cpp Std 17

Add new platforms (Gemba#37)

Updated platforms_idmap.csv and peas.json

Update docs:

- Removed passages about creating a symlink on RetroPie (now part of the scriptmodule).
- Edit paragraph about bash_completion on RetroPie

Fix Gemba#38 (Gemba#43)

Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.

Version 3.10.2
retrobit added a commit to retrobit/skyscraper that referenced this issue Mar 4, 2024
Updated `aliasMap.csv` comments

platform psp: added *.chd

Dev Container support w/Dockerfile (Gemba#23)

Co-authored-by: retrobit <6226450+retrobit@users.noreply.github.com>

Rel 3.10.0 (Gemba#26)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

Rel 3.10.0 (Gemba#27)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

* Version 3.10.0

Fix issue 28 (Gemba#32)

* simplified code with predefined function

* Fix Gemba#28

Fix cont. integration workflo (Gemba#33)

* update package index before install

Being pedantic/consistent

Pedantic/clarifying/consistent

Removed file used for testing

Reverted ES Game List scraper - doesn't make sense to use `aliasMap.csv` with this scraper

Not sure why this keeps getting added... I avoid staging it purposefully. Removed.

Scummvm: Changes to generate a ROM folder.svm/ as <game/> launcher instead of folder. (Gemba#35)

* Scummvm: Changes to generate a ROM `folder.svm/` as `<game/>` launcher instead of folder.

update README

Update from RetroPie Project (2024-02-22)

cf. RetroPie/EmulationStation#866

Cpp Std 17

Add new platforms (Gemba#37)

Updated platforms_idmap.csv and peas.json

Update docs:

- Removed passages about creating a symlink on RetroPie (now part of the scriptmodule).
- Edit paragraph about bash_completion on RetroPie

Fix Gemba#38 (Gemba#43)

Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.

Version 3.10.2
retrobit added a commit to retrobit/skyscraper that referenced this issue Mar 4, 2024
Updated `aliasMap.csv` comments

platform psp: added *.chd

Dev Container support w/Dockerfile (Gemba#23)

Co-authored-by: retrobit <6226450+retrobit@users.noreply.github.com>

Rel 3.10.0 (Gemba#26)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

Rel 3.10.0 (Gemba#27)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

* Version 3.10.0

Fix issue 28 (Gemba#32)

* simplified code with predefined function

* Fix Gemba#28

Fix cont. integration workflo (Gemba#33)

* update package index before install

Being pedantic/consistent

Pedantic/clarifying/consistent

Removed file used for testing

Reverted ES Game List scraper - doesn't make sense to use `aliasMap.csv` with this scraper

Not sure why this keeps getting added... I avoid staging it purposefully. Removed.

Scummvm: Changes to generate a ROM folder.svm/ as <game/> launcher instead of folder. (Gemba#35)

* Scummvm: Changes to generate a ROM `folder.svm/` as `<game/>` launcher instead of folder.

update README

Update from RetroPie Project (2024-02-22)

cf. RetroPie/EmulationStation#866

Cpp Std 17

Add new platforms (Gemba#37)

Updated platforms_idmap.csv and peas.json

Update docs:

- Removed passages about creating a symlink on RetroPie (now part of the scriptmodule).
- Edit paragraph about bash_completion on RetroPie

Fix Gemba#38 (Gemba#43)

Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.

Version 3.10.2
retrobit added a commit to retrobit/skyscraper that referenced this issue Mar 4, 2024
Updated `aliasMap.csv` comments

platform psp: added *.chd

Dev Container support w/Dockerfile (Gemba#23)

Co-authored-by: retrobit <6226450+retrobit@users.noreply.github.com>

Rel 3.10.0 (Gemba#26)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

Rel 3.10.0 (Gemba#27)

* simplified bash completion with built-in/provided functions...

plus:
- qmake: user defined install path
- doc: minor enhancements

* Prevention of very unlikely arithmetic overflow: Multiplication result converted to larger type

* Version 3.10.0

Fix issue 28 (Gemba#32)

* simplified code with predefined function

* Fix Gemba#28

Fix cont. integration workflo (Gemba#33)

* update package index before install

Being pedantic/consistent

Pedantic/clarifying/consistent

Removed file used for testing

Reverted ES Game List scraper - doesn't make sense to use `aliasMap.csv` with this scraper

Not sure why this keeps getting added... I avoid staging it purposefully. Removed.

Scummvm: Changes to generate a ROM folder.svm/ as <game/> launcher instead of folder. (Gemba#35)

* Scummvm: Changes to generate a ROM `folder.svm/` as `<game/>` launcher instead of folder.

update README

Update from RetroPie Project (2024-02-22)

cf. RetroPie/EmulationStation#866

Cpp Std 17

Add new platforms (Gemba#37)

Updated platforms_idmap.csv and peas.json

Update docs:

- Removed passages about creating a symlink on RetroPie (now part of the scriptmodule).
- Edit paragraph about bash_completion on RetroPie

Fix Gemba#38 (Gemba#43)

Plus cornercase solved: When default ES inputFolder is symlinked from
/home/pi/RetroPie/roms to /home/pi/roms f.i. and user provides from that symlink
downwards rom files on CLI.

Version 3.10.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants