Skip to content

Commits on Source 9

  • Tom Pollard's avatar
    Add cli main & user conf option for 'cache-buildtrees' context · 118644b2
    Tom Pollard authored
    _context.py: Add cache_buildtrees global user context, the default
    of which is set to by default to 'always' via the addition of
    cache-buildtrees to userconfig.yaml cache group. 'failure' & 'never'
    can be given as valid options.
    
    app.py & cli.py: Add --cache-buildtrees as a bst main option, which
    when passed with a valid option can override the default or user
    defined context for cache_buildtrees.
    
    tests/completions/completions.py: Update for the added flag.
    118644b2
  • Tom Pollard's avatar
    _frontend/cli.py: Ensure failed buildtree warning is correct · b546bac1
    Tom Pollard authored
    not _cached_sucess() could resolve to true if the element wasn't
    cached at all. switch to _cached_failure() to ensure condition
    reflects expected artifact state
    b546bac1
  • Tom Pollard's avatar
    Provide configuration for the optional creation of buildtrees · d2029444
    Tom Pollard authored
    Artifacts can be cached explicitly with an empty `build tree` when
    built via the cli main options or user config for all or only
    successful build artifacts. Default behaviour is to still create
    and cache all expected buildtrees.
    
    element.py: _cache_artifact() Check if context for cache_buildtrees
    has been set to always or failure with a corresponding build
    result, if not skip attempting to export the build-root. Element
    types without a build-root are cached with an empty buildtree
    regardless. Update _stage_sources_at() to warn the user that the
    buildtree import is empty.
    
    tests/integration: Add test to artifact.py for the optional caching
    of buildtree content from bst build. Rename build-tree.py to
    shellbuildtrees.py to reflect included test cases, add test for
    empty buildtree warning and failure option.
    
    NEWS: Add entry for new option.
    d2029444
  • Jürg Billeter's avatar
    Merge branch 'tpollard/896' into 'master' · 54ec032a
    Jürg Billeter authored
    Optional creation of buildtrees
    
    Closes #896
    
    See merge request !1135
    54ec032a
  • Jürg Billeter's avatar
    utils.py: Change _ensure_real_directory() to not resolve symlinks · 98091991
    Jürg Billeter authored
    Resolving symlinks during staging causes various issues:
    
    * Split rules may not work properly as the resolved paths will differ
      depending on whether another artifact with a directory symlink has
      been staged in the same root directory or not, e.g., as part of
      compose.
    
    * The order of symlinks in file lists is difficult to get right to
      guarantee consistent and predictable behavior as paths in a file list
      might rely on symlinks in the same file list. See #647 and #817.
    
    * Staging order differences can lead to surprising results. See #390.
    
    * Difficult to properly support absolute symlinks. Absolute symlinks are
      currently converted to relative symlinks, however, this doesn't always
      work. See #606 and #830.
    
    This will require changes in projects that rely on the current behavior.
    However, the changes are expected to be small and are often a sign of
    buggy element files. E.g., elements that don't fully obey `bindir` or
    `sbindir` variables.
    98091991
  • Jürg Billeter's avatar
    _casbaseddirectory.py: Do not resolve symlinks · 6d2573e9
    Jürg Billeter authored
    This matches the change in utils._process_list().
    
    This also removes the _Resolver class as it is now unused. We may want
    to support controlled symlink resolution in the future, in which case
    the _Resolver class can be resurrected from this commit.
    6d2573e9
  • Jürg Billeter's avatar
    utils.py: Do not mangle absolute symlinks · 38eae603
    Jürg Billeter authored
    Copy symlinks as they are, absolute or relative. We no longer resolve
    symlinks when copying files, which makes this safe.
    38eae603
  • Jürg Billeter's avatar
    b32c494d
  • Jürg Billeter's avatar
    5a32663b
Loading