Changeset 96d55ab in rtems-source-builder


Ignore:
Timestamp:
Mar 3, 2020, 12:02:58 AM (4 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, master
Children:
abd98a2
Parents:
4295d3d
git-author:
Chris Johns <chrisj@…> (03/03/20 00:02:58)
git-committer:
Chris Johns <chrisj@…> (03/03/20 00:18:05)
Message:

sb/pkgconfig: Cache pkgconfig based on a file name not name

  • Caching on name falsely assumed checks across different config instances in nested build sets as used in vertical stack building was valid. This stopped a valid check for a prefix seeing if a valid BSP config was present.

Updates #3893

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/pkgconfig.py

    r4295d3d r96d55ab  
    9292    dual_opts = ['-D', '-U', '-I', '-l', '-L']
    9393    lib_list_splitter = re.compile('[\s,]+')
     94    loaded_prefixes = None
    9495    loaded = {}
    9596
     
    417418
    418419    def load(self, name):
    419         if name in package.loaded:
    420             package._copy(package.loaded[name], self)
    421             return
    422420        self._log('loading: %s' % (name))
    423421        if self.name_:
     
    426424        file = self._find_package(name)
    427425        if file:
     426            if file in package.loaded:
     427                package._copy(package.loaded[file], self)
     428                return
    428429            self._log('load: %s (%s)' % (name, file))
    429430            if self.src:
     
    475476                for r in package.splitter(requires):
    476477                    if r[0] not in self.nodes[nt]:
    477                         if r[0] in package.loaded:
    478                             pkg = package.loaded[r[0]]
     478                        file = self._find_package(r[0])
     479                        if file in package.loaded:
     480                            pkg = package.loaded[file]
    479481                        else:
    480482                            pkg = package(r[0], self.prefix, self.output)
     
    487489                            self.nodes['failed'][r[0]] = pkg
    488490        if self.exists():
    489             self._log('load: exists')
    490             package.loaded[name] = self
     491            self._log('load: exists and loaded; cache as loaded')
     492            package.loaded[self.file_] = self
    491493
    492494    def get(self, label, private = True):
Note: See TracChangeset for help on using the changeset viewer.