1. From man page does allude to that.
" -P foo, --package foo
Don't follow dpkg-divert diversions by package foo when updating configuration files.
"
which implies ucf should (and does) respect/handle diversions.
2. Further: "ucf should respect dpkg-divert" [0] indicates it is a feature and has been supported since 3.0040 and has been accepted by the upstream maintainer.
3. Likewise the most recent change by the upstream maintainer is also addressing similar issue [1]:
```
ucf (3.0043) unstable; urgency=high
* The argument to dpkg-divert needs to be the actual file name, not the
fully escaped regexp safe one.
* Bug fix: "dpkg-divert error when upgrading grub with diverted config",
thanks to <email address hidden></a>; (Closes: #962818).
So I believe ucf is expected handle diversions even if this specific patch wasn't acked by the upstream maintainer.
> If we do decide to go ahead, then there are a few things that need fixing, please.
Updated the bug description as well as the changelog (re-uploaded).
FWIW, we do have NMU ucf in several Ubuntu releases in general:
```
ucf | 3.0027+nmu1 | trusty | source, all
ucf | 3.0036 | xenial | source, all
ucf | 3.0038 | bionic | source, all
ucf | 3.0038+nmu1 | focal | source, all
ucf | 3.0043 | jammy | source, all
ucf | 3.0043+nmu1 | mantic | source, all
ucf | 3.0043+nmu1 | noble | source, all
ucf | 3.0043+nmu1 | oracular | source, all
And specifically, the NMU versions on mantic, noble, and Oracular have all got _this patch_ already (which I am backporting to Jammy here). So I think it's reasonable to assume the backport is safe.
@Robie
1. From man page does allude to that.
" -P foo, --package foo
Don't follow dpkg-divert diversions by package foo when updating configuration files.
"
which implies ucf should (and does) respect/handle diversions.
2. Further: "ucf should respect dpkg-divert" [0] indicates it is a feature and has been supported since 3.0040 and has been accepted by the upstream maintainer.
3. Likewise the most recent change by the upstream maintainer is also addressing similar issue [1]:
```
ucf (3.0043) unstable; urgency=high
* The argument to dpkg-divert needs to be the actual file name, not the
fully escaped regexp safe one.
* Bug fix: "dpkg-divert error when upgrading grub with diverted config",
thanks to <email address hidden></a>; (Closes: #962818).
-- Manoj Srivastava <email address hidden> Mon, 15 Jun 2020 22:37:53 -0700
```
So I believe ucf is expected handle diversions even if this specific patch wasn't acked by the upstream maintainer.
> If we do decide to go ahead, then there are a few things that need fixing, please.
Updated the bug description as well as the changelog (re-uploaded).
FWIW, we do have NMU ucf in several Ubuntu releases in general:
```
ucf | 3.0027+nmu1 | trusty | source, all
ucf | 3.0036 | xenial | source, all
ucf | 3.0038 | bionic | source, all
ucf | 3.0038+nmu1 | focal | source, all
ucf | 3.0043 | jammy | source, all
ucf | 3.0043+nmu1 | mantic | source, all
ucf | 3.0043+nmu1 | noble | source, all
ucf | 3.0043+nmu1 | oracular | source, all
And specifically, the NMU versions on mantic, noble, and Oracular have all got _this patch_ already (which I am backporting to Jammy here). So I think it's reasonable to assume the backport is safe.
Please let me know if there are further concerns.
[0] https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 477773 /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 962818
[1] https:/