[uClibc] (buildroot) toolchain/patch-kernel.sh may fail silently...

Vladimir Bychkovsky vladimir.bychkovsky at gmail.com
Sat Mar 5 18:47:56 UTC 2005


In the processing of porting PostgreSQL to Buildroot noticed the
following behavior:
If a patchname is misspelled, patch-kernel.sh does not fail even
though no patch is applied.

In the example below the patchname should be postresql*.patch instead
of postgresql*.patch1
-----------------------------------------
vladb at paihia buildroot $ make  postgresql-patch
(toolchain/patch-kernel.sh
/export/home/vladb/svn/buildroot/build_i386/postgresql-8.0.1
package/postgresql postgresql*.patch1)

Applying package/postgresql/postgresql*.patch1 using plaintext: 
cat: package/postgresql/postgresql*.patch1: No such file or directory
touch /export/home/vladb/svn/buildroot/build_i386/postgresql-8.0.1/.patched
---------------------------------------

Looking at toolchain/patch-kernel.sh revealed other potnetial problems:
---------------
...
    echo "Applying ${i} using ${type}: " 
    ${uncomp} ${i} | patch -p1 -E -d ${targetdir} 
    if [ $? != 0 ] ; then
        echo "Patch failed!  Please fix $i!"
	exit 1
    fi
...
--------------
If $(uncomp} ${i} command fails, the script assumes that (an empty)
the patch is applied correctly. In my case this command failed because
the archive did not exist. This could probably happen if patch archive
is corrupt also.

I understand that this is a minor issue, but I just wanted to bring to
attention of other developers.

HTH,
Vlad.



More information about the uClibc mailing list