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

Add Debian 'Replaces: colcon' field #628

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Mar 15, 2024

Upstream Debian has decided to package colcon, and they created a package simply called 'colcon' which provides only the /usr/bin/colcon executable and some weak dependencies as a sort of replacement for colcon-common-extensions. This conflicts with our python3-colcon-core package during unpacking.

We could add Conflicts: colcon, but I think this is a great use case for Replaces: because the only file provided by colcon is /usr/bin/colcon, which we obviously provide here. This way, folks can still successfully install colcon and get the weak dependencies even if our version of python3-colcon-core is installed, and our copy of /usr/bin/colcon will take precedence over the one provided by colcon.

https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-and-replacing-packages-replaces

Upstream Debian has decided to package colcon, and they created a
package simply called 'colcon' which provides only the /usr/bin/colcon
executable and some weak dependencies as a sort of replacement for
colcon-common-extensions. This conflicts with our python3-colcon-core
package during unpacking.

We could add 'Conflicts: colcon', but I think this is a great use case
for 'Replaces:' because the only file provided by 'colcon' is
/usr/bin/colcon, which we obviously provide here. This way, folks can
still successfully install 'colcon' and get the weak dependencies even
if our version of python-colcon-core is installed, and our copy of
/usr/bin/colcon will take precedence over the one provided by 'colcon'.
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.54%. Comparing base (03d6193) to head (a0ee3d9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #628   +/-   ##
=======================================
  Coverage   83.54%   83.54%           
=======================================
  Files          66       66           
  Lines        3816     3816           
  Branches      745      745           
=======================================
  Hits         3188     3188           
  Misses        554      554           
  Partials       74       74           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

For reference the upstream package: https://packages.debian.org/sid/colcon

I wasn't aware of the overwrite individual files. But this seems like a reasonable approach.

Will this potentially have us end up with the extensions that conflict even if the core executable is upgradeable?

I see that the package actually only has 3 files it installs: https://packages.debian.org/sid/all/colcon/filelist

/usr/bin/colcon
/usr/share/doc/colcon/changelog.Debian.gz
/usr/share/doc/colcon/copyright

So it's not really a big difference, except that others can still depend on it. The other approach would be to do the triplet, replaces, provides, conflicts. But I'm fine with trying this minimal approach.

@cottsay cottsay merged commit 532e213 into master Mar 16, 2024
42 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cottsay/replaces-upstream-colcon branch March 16, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants