Bug 10297 - Two suggested notes in the Other Tips section re. removing tmp/ and searching
Summary: Two suggested notes in the Other Tips section re. removing tmp/ and searching
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 22 Sept 2016: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-09-17 03:22 UTC by ulfalizer
Modified: 2016-09-22 23:10 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfalizer 2016-09-17 03:22:27 UTC
Hello again,

Here's two suggested notes to add after the existing notes in
'2.3.12. Other Tips'.

1. Removing tmp/ often fixes temporary issues. This hint could be added:

  * Removing [TMPDIR] (usually tmp/, within the
    [Build Directory](http://www.yoctoproject.org/docs/2.2/dev-manual/dev-manual.html#build-directory))
    can often fix temporary build issues. Removing TMPDIR is usually a
    relatively cheap operation, because task output will be cached in
    [SSTATE_DIR](http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-SSTATE_DIR)
    (usually sstate-cache/, also in the Build Directory).

    Note that removing TMPDIR might be a workaround rather than a fix. Trying
    to determine the underlying cause of an issue is a good idea.


2. To encourage people to search through existing recipes and classes, I think it
would help if we provided a small helper function. Feel free to leave out the
last part if you think it might lead to unproductive spam. :)

  * Seeing how a feature is used in practice in existing recipes is
    often very helpful. It is recommended that you configure some method that
    always you to quickly search through files.
    
    Using GNU Grep, the shell function below can be used to recursively search
    through common recipe-related files, skipping binary files, .git
    directories, and the build directory (assuming its name starts with
    "build"):

      g() {
          grep -Ir \
               --exclude-dir=.git \
               --exclude-dir='build*' \
               --include='*.bb*' \
               --include='*.inc*' \
               --include='*.conf*' \
               --include='*.py*' \
               "$@"
      }

    Below are some usage examples:

      $ g FOO    # Search recursively for "FOO"
      $ g -i foo # Search recursively for "foo", ignoring case
      $ g -w FOO # Search recursively for "FOO" as a word, ignoring e.g. "FOOBAR"

    If figuring out how some feature works requires a lot of searching, it
    might indicate that the documentation should be extended or improved.
    Consider filing a documentation bug at our
    [Bugzilla](https://bugzilla.yoctoproject.org/) in that case. Note that the
    manuals might not be the right place to document variables that are purely
    internal and have a limited scope (e.g. internal variables used to
    implement a single .bbclass file).


Cheers,
Ulf
Comment 1 Scott Rifenbark 2016-09-21 23:10:16 UTC
Ulf, 

Nice tips... 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-others

Thanks, 
Scott
Comment 2 ulfalizer 2016-09-22 05:21:16 UTC
Looks good to me!

Thanks,
Ulf
Comment 3 Scott Rifenbark 2016-09-22 23:10:50 UTC
Setting status to RESOLVED and doc flag to "done."

Scott