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 support for using external 3-way merge tool when handling @config items #2317

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

arrowd
Copy link
Contributor

@arrowd arrowd commented Sep 18, 2024

The introduced MERGETOOL config option expects a value in form "/path/to/program %b %l %r %o" where

  • "%b" is the file containing the original config shipped by the previous version of the package
  • "%l" is the file containing the current config (%b that is possibly altered by the user)
  • "%r" is the new config that is going to be installed by the new package
  • "%o" is the file that should be created by the too and contain the merge result
  • "%n" is the name of file as listed in the pkg-plist with leading '/' stripped

If the merge tool return a non-zero code, pkg will attempt to the merging using a builtin algorithm.

libpkg/pkg_add.c Outdated Show resolved Hide resolved
libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Outdated Show resolved Hide resolved
@arrowd
Copy link
Contributor Author

arrowd commented Sep 28, 2024

So, no need for rootfd in merge_with_external_tool() since all files it creates are in /tmp?

libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Show resolved Hide resolved
libpkg/pkg_add.c Outdated Show resolved Hide resolved
…items

The introduced MERGETOOL config option expects a value in form
"/path/to/program %b %l %r %o" where
* "%b" is the file containing the original config shipped by the previous
  version of the package
* "%l" is the file containing the current config (%b that is possibly altered
  by the user)
* "%r" is the new config that is going to be installed by the new package
* "%o" is the file that should be created by the too and contain the merge result

If the merge tool return a non-zero code, pkg will attempt to the merging using
a builtin algorithm.

Sponsored by:	Future Crew, LLC
@bapt bapt merged commit 19d215b into freebsd:main Oct 29, 2024
0 of 3 checks passed
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