Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pull_and_build_from_git.py to support dependent package labels #217

Open
spham-amzn opened this issue Sep 14, 2023 · 0 comments
Open
Assignees

Comments

@spham-amzn
Copy link
Contributor

In build_and_pull_from_git.py , The depends_on_packages attribute for a package's build_config.json identifies additional 3rd party packages that are needed to build a particular 3p package due to build dependencies. These packages are downloaded to the temp working folder and then the build scripts that use them will apply their include/lib paths as part of the custom build. However, the scripts are tied directly to the name of the package, so it needs to match exactly the name of the package when referring to it, causing an issue where multiple places need to be updated.
For example:

        ...
        "depends_on_packages" :[ 
            ["zlib-1.2.11-rev5-linux", "9be5ea85722fc27a8645a9c8a812669d107c68e6baa2ca0740872eaeb6a8b0fc", ""]
        ],
       ...

Will download to a folder in the working $TEMP folder named zlib-1.2.11-rev5-linux. So the build script that needs to set the include/lib directory for its custom build will need to know the exact path:

    ZLIB_INCLUDE=$HOME/zlib-1..2.11-rev5-linx/zlib/include
    ZLIB_LIB=$HOME/zlib-1..2.11-rev5-linx/zlib/lib

We should be able to set a generic label for each of the entries so that only the labels are used, (extracted from the environment), so updates to the build_config.json will not require the build script to match the name exactly.
For example:

        ...
        "depends_on_packages" :[ 
            ["ZLIB", "zlib-1.2.11-rev5-linux", "9be5ea85722fc27a8645a9c8a812669d107c68e6baa2ca0740872eaeb6a8b0fc", ""]
        ],
       ...

will simplify the build script so $ZLIB is all that is needed for the path

    ZLIB_INCLUDE=$HOME/$ZLIB
    ZLIB_LIB=$HOME/$ZLIB
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

No branches or pull requests

1 participant