<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9169</bug_id>
          
          <creation_ts>2016-02-25 02:43:17 +0000</creation_ts>
          <short_desc>add fix_buildpaths.bbclass to fix build path</short_desc>
          <delta_ts>2016-07-29 02:16:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M3</target_milestone>
          <dependson>7058</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59462</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-02-25 02:43:17 +0000</bug_when>
    <thetext>Description:
While do buildpaths QA checking, some files (such as Makefile) has
build path is reasonable, and we do not want the QA warning/error
output fot this file, so provide a way to ignore the checking.

Design:
Add variable QA_BUILDPATHS_SKIP_PATTERN to ignore buildpaths QA
while filename (do not include directory) matches patterns,
the patterns are Unix shell style and separated by space.

    Patterns are Unix shell style:
    
    *       matches everything
    ?       matches any single character
    [seq]   matches any character in seq
    [!seq]  matches any char not in seq</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59466</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-02-25 15:44:04 +0000</bug_when>
    <thetext>I&apos;m not convinced this is a good idea, we shouldn&apos;t ever be installing build paths into the target? The Makefile should be being processed to translate these to target paths?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59660</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-03-03 03:04:29 +0000</bug_when>
    <thetext>Hi Richard,

Yes, I once tried to analyse 10+ recipes&apos; Makefile which has build
path in it, and hope to find one way/solution to process these
Makefiles to remove build path, but it&apos;s hard to do it, always has
Makefile exceptional.

If we choose to fix each Makefile manually, it costs a lot of time.
And the Makefile usually installed to ptest package, the influence
is not big, that&apos;s why the buildpaths QA ignore pattern with Makefile
by default.

I once tried to ignore ptest package, but dropped by myself, it
has potential risk in ptest package if build paths exist in .a/.so

If you decide to process Makefile rather than ignore it, I will
work on it when other build path issues fixed. But I suggest
we keep the ignore pattern, because I found some build path
could not be remove (I will file another bug to trace the issue)

Suggestions?

Thanks
Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59745</commentid>
    <comment_count>3</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-03-07 07:18:23 +0000</bug_when>
    <thetext>As Richard suggested, we do not add buildpaths QA ignore pattern.
In order to process the Makefile file with common solution, add
a bbclass to do that.

In fix_buildpaths.bbclass
1. It define variable PACKAGE_BUILDPATH_FILES which lists files that have
   --sysroot and -fdebug-prefix-map.

   If package has files need to remove --sysroot and -fdebug-prefix-map,
   inherit the bbclass and assign variable PACKAGE_BUILDPATH_FILES.
   These options will be removed at do_package time.

2. TODO</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59747</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-03-07 08:42:10 +0000</bug_when>
    <thetext>Update description:

1. Define variable PACKAGE_BUILDPATH_FILES to list files that have
build paths and need to remove.

2. Define variable PACKAGE_BUILDPATH_PATTERNS to list build path
patterns, which used by sed, it removes --sysroot and 
-fdebug-prefix-map in files listed in PACKAGE_BUILDPATH_FILES
by default.

3. Define python function to remove --sysroot and -fdebug-prefix-map
in variable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64628</commentid>
    <comment_count>5</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-07-29 02:16:03 +0000</bug_when>
    <thetext>Rejected by community, I think it is not a good idea.

So directly close it with won&apos;t fix</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>