Skip to content

Buildimprov#1155

Draft
sachintu47 wants to merge 1 commit intomainfrom
buildimprov
Draft

Buildimprov#1155
sachintu47 wants to merge 1 commit intomainfrom
buildimprov

Conversation

@sachintu47
Copy link
Copy Markdown
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Content Update

Category

  • zopen build framework
  • zopen package manager
  • Documentation
  • CI/CD
  • Tools

Description

Related Issues

  • Related Issue #
  • Closes #

[optional] Are there any post-deployment tasks or follow-up actions required?

@sachintu47
Copy link
Copy Markdown
Member Author

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: This PR refines zopen’s build/install flow by improving how dependencies are represented and how environment setup is generated during builds.

Changes:

  • Marks several implicit tool dependencies as :bin (e.g., sed:bin, curl:bin) and extends tarball implicit deps similarly.
  • Adds :bin parsing support via parseDeps and introduces normalizeDeps to deduplicate/prefer full deps when both full and bin-only entries exist.
  • Refactors setDepsEnv to normalize deps up front, re-verify after installs/upgrades, and then source the compatible dependency environment.
  • Adjusts dependency env sourcing to optionally suppress build-only behavior for bin-only deps (via ZOPEN_IN_ZOPEN_BUILD handling).
  • Changes generated .env content to gate PKG_CONFIG_PATH additions behind ZOPEN_IN_ZOPEN_BUILD.
  • Fixes the zopen-generate template snippet by commenting out an otherwise stray closing brace.

Technical Notes: The new :bin mechanism aims to distinguish “tools needed on PATH” from full environment-providing dependencies, and the build env generation is being split to better control which variables are present during builds vs runtime.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@sachintu47 sachintu47 force-pushed the buildimprov branch 3 times, most recently from c73ccb0 to cb8a6e4 Compare April 2, 2026 14:51
…ncies

This commit implements a streamlined environment separation strategy for zopen-build
and zopen-generate, focusing on a single-variable signal (ZOPEN_IN_ZOPEN_BUILD)
to differentiate between build-time and runtime environments.

Key changes:
- Combined installDeps and sourceDepsEnv into a unified setDepsEnv function
  in bin/zopen-build for atomic dependency handling.
- Implemented support for the pkg:bin dependency format by temporarily
  unsetting ZOPEN_IN_ZOPEN_BUILD during sourcing in setDepsEnv.
- Updated createEnvAndSetup to guard PKG_CONFIG_PATH in generated .env files
  with a ZOPEN_IN_ZOPEN_BUILD check, ensuring dev paths are only added
  during build-time sourcing.
- Simplified .depsenv generation to rely on natural environment propagation
  of the build signal, removing redundant save/restore logic.
- Updated normalizeDeps in include/common.sh to ensure full dependencies
  take precedence over :bin requests.
- Restored zopen-generate templates to use zopen_append_to_env with
  ZOPEN_IN_ZOPEN_BUILD guards for build-only flags (CFLAGS, LDFLAGS, etc.).
- Fixed a persistent 'isWritable' typo in generated setup scripts.

These changes ensure that runtime environments for packages remain clean while
providing all necessary development flags during the build process of
dependent ports.
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

if [ ! -z "\${ZOPEN_IN_ZOPEN_BUILD}" ]; then
if [ -d "\${${projectName}_HOME}/lib/pkgconfig" ]; then
PKG_CONFIG_PATH="\${${projectName}_HOME}/lib/pkgconfig:\$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="\$(deleteDuplicateEntries "\$PKG_CONFIG_PATH" ":")"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated .env line export PKG_CONFIG_PATH="$(deleteDuplicateEntries ...)" contains unescaped nested quotes (e.g., "$PKG_CONFIG_PATH" / ":"), which will make .env fail to source with a shell syntax error. This looks like it should be a single properly-quoted command substitution string in the output file.

Severity: high

Other Locations
  • bin/zopen-build:1757

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant