bottlerocket-os / bottlerocket-os/twoliter
Packages re-built after they are build with `build-package`
- Dominant language
- Rust
- Stars
- 34
- Forks
- 43
- Avg merge
- 11h 13m
- Merged PRs (30d)
- 16
Description
### What's the problem
I would expect that a package build with `build-package` isn't rebuild once I run `make ARCH=`
### What really happened?
Any package build first with `build-package` is rebuild when `make ARCH=` is run:
```bash
❯ PACKAGE=cni make twoliter build-package
Found Twoliter v0.5.0 installed.
Skipping installation.
[2024-10-18T00:43:25Z INFO twoliter::project::lock] Resolving project references to check against lock file
[2024-10-18T00:43:25Z INFO twoliter::project::lock::image] Resolving dependency image dependency 'bottlerocket-sdk-0.46.0@public.ecr.aws/bottlerocket/bottlerocket-sdk:v0.46.0'.
[cargo-make] INFO - cargo make 0.36.13
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: /Makefile.toml
[cargo-make] INFO - Task: build-package
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: check-cargo-version
[cargo-make] INFO - Running Task: setup
[cargo-make] INFO - Running Task: setup-build
[cargo-make] INFO - Running Task: fetch-sdk
[cargo-make] INFO - Running Task: fetch-sources
[cargo-make] INFO - Running Task: fetch-vendored
[cargo-make] INFO - Running Task: publish-setup
00:43:28 [INFO] Found infra config at path: /Infra.toml
00:43:28 [INFO] No repo config in '/Infra.toml' - using local roles/keys
[cargo-make] INFO - Running Task: cargo-metadata
[cargo-make] INFO - Running Task: validate-kits
[cargo-make] INFO - Running Task: build-package
Compiling cni v0.1.0 (/kit/packages/cni)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.31s
[cargo-make] INFO - Build Done in 18.05 seconds.
❯ make ARCH=x86_64
Found Twoliter v0.5.0 installed.
Skipping installation.
[2024-10-18T00:43:54Z INFO twoliter::project::lock] Resolving project references to check against lock file
[2024-10-18T00:43:54Z INFO twoliter::project::lock::image] Resolving dependency image dependency 'bottlerocket-sdk-0.46.0@public.ecr.aws/bottlerocket/bottlerocket-sdk:v0.46.0'.
[2024-10-18T00:43:55Z INFO twoliter::project::lock] Extracting kit dependencies. dependencies=[]
[2024-10-18T00:43:55Z INFO twoliter::project::lock] Resolving project references to check against lock file
[2024-10-18T00:43:55Z INFO twoliter::project::lock::image] Resolving dependency image dependency 'bottlerocket-sdk-0.46.0@public.ecr.aws/bottlerocket/bottlerocket-sdk:v0.46.0'.
[cargo-make] INFO - cargo make 0.36.13
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: /Makefile.toml
[cargo-make] INFO - Task: build-kit
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: check-cargo-version
[cargo-make] INFO - Running Task: setup
[cargo-make] INFO - Running Task: setup-build
[cargo-make] INFO - Running Task: fetch-sdk
[cargo-make] INFO - Running Task: fetch-sources
[cargo-make] INFO - Running Task: fetch-vendored
[cargo-make] INFO - Running Task: publish-setup
00:44:01 [INFO] Found infra config at path: /kit/Infra.toml
00:44:01 [INFO] No repo config in '/kit/Infra.toml' - using local roles/keys
[cargo-make] INFO - Running Task: cargo-metadata
[cargo-make] INFO - Running Task: validate-kits
[cargo-make] INFO - Running Task: build-kit
Compiling cni v0.1.0 (/packages/cni)
Compiling bottlerocket-core-kit v0.1.0 (/kits/bottlerocket-core-kit)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 33.21s
[cargo-make] INFO - Build Done in 35.96 seconds.
```
Contributor guide
Research direction
Reproduce the issue with `PACKAGE=cni make twoliter build-package`, followed by `make ARCH=x86_64`, and compare the `build-package` and `build-kit` task behavior. Start by tracing those task entry points and their Cargo build outputs. Done means a package built by `build-package` is not compiled again when the subsequent architecture build runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100