[oe] error message on missing patchfile

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Sun Aug 8 15:15:03 UTC 2010


Hi,

By accident I misplaced a patch file and I noticed that the build
process does not give an error for it during distribute_sources, but
only in do_patch.
It sems to me that the error should be given when distributing the sources.

I've checked in the logs and it says:
run.SRC_DISTRIBUTECOMMAND.4388:    ln -sf
"/home/frans/oe/openembedded/recipes/urjtag/urjtag-0.10/m4.patch"

This ln succeeds even if the file is not there.

I've tried to fix this and generate an error but apparenty my
knowledge of the build machinery is not enough.
Below is the patch that I produced.
The problem is that I get an error message saying unexpeced '(' on the line:
!         raise bb.build.FuncFailed("File does not exist: %s" % ${SRC})
Anyone a suggestion on what is wrong?


*** src_distribute_local.bbclass	Sun Aug  8 14:58:24 2010
--- src_distribute_local.bbclass.sav	Sun Aug  8 14:43:20 2010
***************
*** 7,27 ****
  # symlinks the files to the SRC_DISTRIBUTEDIR
  SRC_DISTRIBUTECOMMAND-symlink () {
      test -e "${SRC}.md5" && ln -sf "${SRC}.md5" .
!     ln -sf "${SRC}" .
  }

  # copies the files to the SRC_DISTRIBUTEDIR
  SRC_DISTRIBUTECOMMAND-copy () {
      test -e "${SRC}.md5" && cp -f "${SRC}.md5" .
!     cp -fr "${SRC}" .
  }

  # moves the files to the SRC_DISTRIBUTEDIR and symlinks them back
  SRC_DISTRIBUTECOMMAND-move+symlink () {
      if ! [ -L ${SRC} ]; then
!         src=`basename "${SRC}"`
!         mv ${SRC} .
!         ln -sf $src "${SRC}"
          if [ -e ${SRC}.md5 ]; then
              mv ${SRC}.md5 .
              ln -sf $src "${SRC}.md5"
--- 7,42 ----
  # symlinks the files to the SRC_DISTRIBUTEDIR
  SRC_DISTRIBUTECOMMAND-symlink () {
      test -e "${SRC}.md5" && ln -sf "${SRC}.md5" .
!     if test -e {SRC}
!     then
!         ln -sf "${SRC}" .
!     else
!         raise bb.build.FuncFailed("File does not exist: %s" % ${SRC})
!     fi
  }

  # copies the files to the SRC_DISTRIBUTEDIR
  SRC_DISTRIBUTECOMMAND-copy () {
      test -e "${SRC}.md5" && cp -f "${SRC}.md5" .
!     if test -e {SRC}
!     then
!         cp -fr "${SRC}" .
!     else
!         raise bb.build.FuncFailed("File does not exist: %s" % ${SRC})
!     fi
  }

  # moves the files to the SRC_DISTRIBUTEDIR and symlinks them back
  SRC_DISTRIBUTECOMMAND-move+symlink () {
      if ! [ -L ${SRC} ]; then
!         if test -e {SRC}
!         then
!             src=`basename "${SRC}"`
!             mv ${SRC} .
!             ln -sf $src "${SRC}"
!         else
!             raise bb.build.FuncFailed("File does not exist: %s" % ${SRC})
!         fi
          if [ -e ${SRC}.md5 ]; then
              mv ${SRC}.md5 .
              ln -sf $src "${SRC}.md5"




More information about the Openembedded-devel mailing list