Bug 6440

Summary: gawk fails to install on some hosts who install files similar to yocto paths
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Gortmaker <paulg>
Component: coreAssignee: Paul Gortmaker <paulg>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, nitin.a.kamble
Version: unspecified   
Target Milestone: 1.7   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Gortmaker 2014-06-12 20:08:53 UTC
A recent update of gawk now fails at do_install when it tries to execute this:

make[4]: Entering directory '/mnt/home/paul/poky/build/tmp/work/corei7-64-poky-
linux/gawk/4.1.1-r0/build/extension'
for i in filefuncs.la fnmatch.la fork.la inplace.la ordchr.la readdir.la readfi
le.la revoutput.la revtwoway.la rwarray.la testext.la time.la ; do \
        rm -f /usr/lib/gawk/$i ; \
done
rm: cannot remove '/usr/lib/gawk/filefuncs.la': Permission denied
rm: cannot remove '/usr/lib/gawk/fnmatch.la': Permission denied
rm: cannot remove '/usr/lib/gawk/fork.la': Permission denied
rm: cannot remove '/usr/lib/gawk/inplace.la': Permission denied
rm: cannot remove '/usr/lib/gawk/ordchr.la': Permission denied
....
rm: cannot remove '/usr/lib/gawk/testext.la': Permission denied
rm: cannot remove '/usr/lib/gawk/time.la': Permission denied
Makefile:1235: recipe for target 'install-data-hook' failed

Note the "rm -f /usr/lib/gawk/$i" -- is going right at the build host files, and hence the -EPERM (rightly so!).

The reason that this does not fail on _all_ hosts is that there _has_ to be those files there to begin with, as "rm -f /usr/lib/gawk/some_nonexistent_file" is not an error, and hence this won't fail on ubuntu 14.10 for example.

It fails for me because my build machine is itself running on a build of yocto, and hence we see this host contamination issue clearly, as the gawk libraries are installed to the same path.
Comment 1 Paul Gortmaker 2014-06-16 14:05:04 UTC
Fix sent to oe-core here:

  http://article.gmane.org/gmane.comp.handhelds.openembedded.core/52268

Portion of fix not yet upstream sent for gawk maintainers here:

  http://lists.gnu.org/archive/html/bug-gawk/2014-06/msg00001.html
Comment 2 Paul Gortmaker 2014-06-17 17:43:38 UTC
yocto commit c7bfbabab7274f31be9e484bbe277cf9d011072c

(From OE-Core rev: 8c7a883964e45e7b48b943731bd3b3da0cc289d9)
Comment 3 Saul Wold 2014-11-13 17:10:52 UTC
*** Bug 6415 has been marked as a duplicate of this bug. ***