[gentoo-x86] / eclass / eutils.eclass Project Root:

GentooDiff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph

version 1.306, Sat Sep 20 18:58:57 2008 UTC version 1.307, Sat Sep 20 19:03:31 2008 UTC
Line 266 
Line 266 
   
                         # Check for absolute paths in patches.  If sandbox is disabled,                          # Check for absolute paths in patches.  If sandbox is disabled,
                         # people could (accidently) patch files in the root filesystem.                          # people could (accidently) patch files in the root filesystem.
                         # Or trigger other unpleasantries #237667.                          # Or trigger other unpleasantries #237667.  So disallow -p0 on
                           # such patches.
                         local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')                          local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
                         if [[ -n ${abs_paths} ]] ; then                          if [[ -n ${abs_paths} ]] ; then
                                 ewarn "Absolute paths found in ${patchname}!  Please remove them!"                                  count=1
                                 ewarn "${abs_paths}"                                  echo "NOTE: skipping -p0 due to absolute paths in patch:" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
                                   echo "${abs_paths}" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
                         fi                          fi
   
                         # Allow for prefix to differ ... im lazy, so shoot me :/                          # Allow for prefix to differ ... im lazy, so shoot me :/

Generate output suitable for use with a patch program
Legend:
Removed from v.1.306  
changed lines
  Added in v.1.307

www@gentoo.org

Powered by ViewCVS 1.0_pre20050929

ViewCVS and CVS Help