Skip to content

ostree-ext: specify zeroed patch version for ostree#1365

Closed
jeckersb wants to merge 1 commit into
bootc-dev:mainfrom
jeckersb:use-ostree-patch-version
Closed

ostree-ext: specify zeroed patch version for ostree#1365
jeckersb wants to merge 1 commit into
bootc-dev:mainfrom
jeckersb:use-ostree-patch-version

Conversation

@jeckersb
Copy link
Copy Markdown
Collaborator

This was changed previously in #1328, this reverts to the old format.

Signed-off-by: John Eckersberg jeckersb@redhat.com

This was changed previously in bootc-dev#1328, this reverts to the old format.

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates the ostree dependency in ostree-ext/Cargo.toml to specify the full patch version 0.20.0. A review comment suggests considering an exact version pin for ostree due to its re-exported nature, to enhance API stability.

Comment thread ostree-ext/Cargo.toml
containers-image-proxy = "0.7.0"
# We re-export this library too.
ostree = { features = ["v2025_2"], version = "0.20" }
ostree = { features = ["v2025_2"], version = "0.20.0" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Consider using an exact version pin for ostree to ensure API stability for ostree-ext consumers, given that ostree is re-exported.

ostree = { features = ["v2025_2"], version = "=0.20.0" }

@jeckersb
Copy link
Copy Markdown
Collaborator Author

I'm confused as to why this is required, since 0.20 and 0.20.0 should be equivalent when specifying via cargo, but without it when trying to build rpm-ostree against main here I get:

    Updating git repository `https://github.com/containers/bootc`
    Updating git repository `https://github.com/containers/composefs-rs`
    Updating crates.io index
error: failed to select a version for `ostree`.
    ... required by package `ostree-ext v0.15.3 (https://github.com/containers/bootc?rev=a9f01fe59ff656142704c7e1181d43f9d63b5d56#a9f01fe5)`
    ... which satisfies git dependency `ostree-ext` of package `rpmostree-rust v0.1.0 (/var/home/jeckersb/git/rpm-ostree)`
versions that meet the requirements `^0.20` (locked to 0.20.0) are: 0.20.0

the package `ostree-ext` depends on `ostree`, with features: `v2025_2` but `ostree` does not have these features.


failed to select a version for `ostree` which could resolve this conflict

🤷

@jeckersb jeckersb marked this pull request as draft June 12, 2025 03:49
@jeckersb
Copy link
Copy Markdown
Collaborator Author

Actually now it's not working even with this, so I think maybe I just have some weird cargo state locally or something.

I'm marking as draft and then going to sleep, this is a sign I should stop messing with this when it's almost midnight 😆

@cgwalters
Copy link
Copy Markdown
Collaborator

I hit something like this in the past and it was super subtle, basically the caching in the build.rs for pkg-config doesn't correctly invalidate when you update system libraries; i.e. this flow:

  • have bootc local build with older libostree (C shared library) with populated target/ build cache
  • update ostree
  • cargo build won't correctly re-probe for an updated ostree features

two hard problems in computer science etc

@cgwalters
Copy link
Copy Markdown
Collaborator

Actually sorry a problem may be that you also need to cargo update ostree?

@jeckersb
Copy link
Copy Markdown
Collaborator Author

Actually sorry a problem may be that you also need to cargo update ostree?

Yeah that was most of it 🤦. Closing this.

@jeckersb jeckersb closed this Jun 12, 2025
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.

2 participants