order of patches under ports/xxx/zzz/files
Anton Shterenlikht
mexas at bris.ac.uk
Wed Jul 10 09:03:48 UTC 2013
I'm trying to understand exactly how the patches
located in files directory in a port apply.
For example, port math/metis-edf has under files:
# ls files/
medis-patch-Lib_Makefile.txt patch-Lib::proto.h patch-Test::Makefile
patch-CONFIG::configure patch-Lib_Makefile patch-onmetis
patch-CONFIG_onmetis.in patch-Programs::Makefile
#
Patch medis-patch-Lib_Makefile.txt must be applied
on top of patch-Lib_Makefile. This does seem to
work, but what process makes sure that the order
of patch application is exactly that.
I can see that it works manually:
# cd ./work/metis-edf-4.1/
/usr/ports/math/metis-edf/work/metis-edf-4.1
# patch < ../../files/patch-Lib_Makefile
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- Lib/Makefile.orig 2008-12-03 11:08:03.000000000 +0100
|+++ Lib/Makefile 2010-05-16 16:33:40.000000000 +0200
--------------------------
Patching file Lib/Makefile using Plan A...
Hunk #1 succeeded at 2.
Hunk #2 succeeded at 22.
done
# patch < ../../files/medis-patch-Lib_Makefile.txt
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- Lib/Makefile.intermediate 2013-03-22 20:40:34.429173000 +0000
|+++ Lib/Makefile
--------------------------
Patching file Lib/Makefile using Plan A...
Hunk #1 succeeded at 22.
done
#
and that applying the second patch directly does not
work:
# cd ../..
# make clean extract
===> Cleaning for metis-edf-4.1.2_3
===> metis-edf-4.1.2_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by metis-edf-4.1.2_3 for building
===> Extracting for metis-edf-4.1.2_3
=> SHA256 Checksum OK for aster-full-src-10.8.0-3.noarch.tar.gz.
(cd /usr/ports/math/metis-edf/work && /usr/bin/tar -xf /usr/ports/math/metis-edf/work/aster-full-src-10.8.0/SRC/metis-edf-4.1-2.noarch.tar.gz --no-same-owner --no-same-permissions)
# cd work/metis-edf-4.1/
# patch < ../../files/medis-patch-Lib_Makefile.txt
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- Lib/Makefile.intermediate 2013-03-22 20:40:34.429173000 +0000
|+++ Lib/Makefile
--------------------------
Patching file Lib/Makefile using Plan A...
Hunk #1 failed at 22.
1 out of 1 hunks failed--saving rejects to Lib/Makefile.rej
done
#
But how does the ports environment know the order
of patch application?
Thanks
Anton
More information about the freebsd-ports
mailing list