Hi Inge,

On 12/02/16 12:54, Inge Gutheil wrote:
Hello,
I wanted to patch an installation by adding 2 files to the distribution.
I said
diff -ruN /directory/in/the/distribution
/directory/with/additional/files >> update.patch
and always got the message
Build of
/homea/software/mathprod/JURECA/ELPA/ELPA-2015.11.001-intel-para-2015.07.eb
failed (err: "build failed (first 300 chars): Can't determine patch
level for patch /homea/software/mathprod/JURECA/ELPA/elpa_examples.patch
from directory
/dev/shm/mathprod/ELPA/2015.11.001/intel-para-2015.07-pure-mpi/elpa-2015.11.001")
After looking for the error message "Can't determine patch level for
patch /" I got to
https://github.com/hpcugent/easybuild-framework/blob/master/easybuild/tools/filetools.py
and saw that patch level is
# - based on +++ lines

# - first +++ line that matches an existing file determines guessed level

# - we will try to match that level from current directo


As I only added two files there was no +++ line that matches an existing
file and thus the patch level could not be determined.

This is a known problem, and Martin was working on a fix for this problem, see https://github.com/hpcugent/easybuild-framework/pull/1489.

The implementation has some issues though, so it's not finished yet, hopefully soon.


I solved this problem by just patching README by adding a comment, now
there was a
+++ line that matches an existing file
--- elpa-2015.11.001/README    2016-02-12 09:43:54.642611000 +0100
+++ elpa-2015.11.001_ok/README    2016-02-12 09:41:25.588212000 +0100
@@ -87,3 +87,6 @@
and it worked.
I don't know whether there is another way to determine the patch level
other than with a +++ line that matches an existing file.
If not, it would be helpful to document this problem somewhere.

Tweaking the patch file to make EasyBuild guess the patch level correctly is one way, but you can also just specify the patch level to EasyBuild, for example with:

    patches = [('update.patch', 2)]

This tells EasyBuild to apply this patch using "patch -p2 < update.patch".

This is indeed not clear yet in the documentation, I'll try and look into fixing that.


regards,

Kenneth

Regards
Inge Gutheil

--
--

Inge Gutheil
Juelich Supercomputing Centre
Institute for Advanced Simulation
Forschungszentrum Juelich GmbH
52425 Juelich, Germany

      Phone:   +49-2461-61-3135
      Fax:     +49-2461-61-6656
      E-mail:[email protected]



------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------

Reply via email to