Hello all, here is a small patch for kdemerge script to fix a serious bug which can lead to wiping out all files (but not directories) from original ports directory.
It looks like the bug will be triggered only under certain conditions or environments because for some users the script seems to work. But it did not work for me. I have the ports directory on its own UFS2 file system in a separate partition within a separate slice. That is the only difference I am aware off. So I looked through the script and found the problem. With the attached patch everything works fine and as intended for me. It should work for all. So I ask everyone to please test the patch. If everything goes well it would be nice if the patch gets committed. Thanks in advance! :-) While there, I also added a small check to the path assignments so it does not matter if user specified paths contain problematic inputs like trailing slashes etc. -- Regards Marco Bröder <marco.broe...@gmx.eu> OpenPGP key fingerprint 5615106E031AF3D364CC0F9E4DCE6524F595082F
Index: kdemerge =================================================================== --- kdemerge (revision 4626) +++ kdemerge (working copy) @@ -35,6 +35,13 @@ # Path to the official ports collection. PORTSDIR="/usr/ports" +# End of user editable section. +# Do NOT change anything below this line! + +# Check input for trailing slashes, resolve symbolic links. Return real path. +KDEDIR=`/bin/realpath ${KDEDIR}` +PORTSDIR=`/bin/realpath ${PORTSDIR}` + # Merge UPDATING if [ -f ${KDEDIR}/UPDATING-area51 ]; then cp ${KDEDIR}/UPDATING-area51 ${PORTSDIR}/ @@ -62,6 +69,7 @@ continue fi if [ ! -f ${KDEDIR}/${category}/${port}/Makefile ]; then + continue fi if [ ! -d ${PORTSDIR}/${category} ]; then
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information