Skip to content

Commit c2204b3

Browse files
committed
dependency_script: cp rather than symlink to $DOWNLOAD_CACHE
When the downloaded file is an archive which gets unpacked in the working directory, this is harmless. However, when the download file is moved directly to $INSTALL_DIR (e.g. JAR files) this leaves the installation with a symlink pointing at the cache - which might get deleted. Also, some tools will look for their own dependencies relative to the real file (and not the symlink) which will point them at $DOWNLOAD_CACHE rather than $INSTALL_DIR.
1 parent 8699242 commit c2204b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

planemo/shed2tap/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,11 @@ def _commands_and_downloaded_file(url, target_filename=None, sha256sum=None):
516516
'elif [[ -f "$DOWNLOAD_CACHE/%s" ]]' % downloaded_filename,
517517
'then',
518518
' echo "Reusing cached %s"' % downloaded_filename,
519-
' ln -s "$DOWNLOAD_CACHE/%s" "%s"' % (downloaded_filename, target_filename),
519+
' cp "$DOWNLOAD_CACHE/%s" "%s"' % (downloaded_filename, target_filename),
520520
'else',
521521
' echo "Downloading %s"' % downloaded_filename,
522522
' curl -L -o "$DOWNLOAD_CACHE/%s" "%s"' % (downloaded_filename, url),
523-
' ln -s "$DOWNLOAD_CACHE/%s" "%s"' % (downloaded_filename, target_filename),
523+
' cp "$DOWNLOAD_CACHE/%s" "%s"' % (downloaded_filename, target_filename),
524524
]
525525
if sha256sum:
526526
# This is inserted into the if-else for a fresh download only.

0 commit comments

Comments
 (0)