(another fail to Reply To List) -- jack
-------- Forwarded Message --------
Subject: Re: [easybuild] Applying patch to only one of four sources
Date: Wed, 5 Dec 2018 09:54:29 -0600
From: Jack Perdue <[email protected]>
To: Wolfram Zieger <[email protected]>
Howdy Wolfram,
I'm no expert but decided to look at:
framework/easyblock.py
and found these bits in patch_step():
# patch source at specified index (first source if not
specified)
srcind = patch.get('source', 0)
# if patch level is specified, use that (otherwise let
apply_patch derive patch level)
level = patch.get('level', None)
# determine suffix of source path to apply patch in (if any)
srcpathsuffix = patch.get('sourcepath', patch.get('copy', ''))
# determine whether 'patch' file should be copied rather
than applied
copy_patch = 'copy' in patch and 'sourcepath' not in patch
I know the 'patches' parameter has options like 'level'.
Never used the 'source' option though. Sounds like
something to try. I'm guessing in your case you might
want something like source='2' (for the third source).
Jack Perdue
Lead Systems Administrator
High Performance Research Computing
TAMU Division of Research
[email protected] http://hprc.tamu.edu
HPRC Helpdesk: [email protected]
On 12/5/18 9:14 AM, Wolfram Zieger wrote:
Hello,
Within my eb script (dummy toolchain) I have four sources where a
certain install order is necessary.
It installs fine.
But: If I apply a patch meant for source No. 3, the patch gets applied
to source No. 1 which fails (see relevant log entries at the end)
What can I do to make sure the patch is applied to the third source
instead of the first source?
---------[part of eb
script]-----------------------------------------------
source_urls = [
'https://somethingsomething.com/one/',
'https://somethingsomething.com/two/',
'https://somethingsomething.com/three/',
'https://somethingsomething.com/four/',
]
sources = [
'one-install.tar.gz',
'two-setup.tar.gz',
'three-something.tar.gz',
'four-goodone.tar.gz',
]
patches = [
'three-1.2.3_enhanced.patch',
]
--------------------------------------------------------------------------------
By the way - using empty '' values for the patches list is not working.
Should I use dummy patches for the first two?
BTW - Here is the relevant part of the log:
----log--------------------------------------------------------------------------
Can't determine patch level for patch
/my/ebscripts/three-1.2.3_enhanced.patch from directory
/my/modulebuildingroot/build/somethingsomething/1.2.3/dummy-dummy-myversionssuffix/one-install-1.2.3
(at
my/modulebuildingroot/software/EasyBuild/3.5.3/lib/python2.7/site-packages/easybuild_framework-3.5.3-py2.7.egg/easybuild/tools/filetools.py:910
in apply_patch)
--------------------------------------------------------------------------------
Yeah, it's EasyBUild 3.5.3, but I do not think it's a bug, I think,
it's either my syntax or it doesn't work this way at all.
Of course, it complains about "patch level", but
patches = [
('three-1.2.3_enhanced.patch', 1),
]
(reduced patch depth) even more clearly shows, that it cannot find the
file to patch in software source 1 instead of 3.
Best regards,
Wolfram