Control: affects -1 src:xterm Control: severity -1 serious On 2022-04-19 13:59 +0100, Colin Watson wrote:
> Control: affects -1 src:openssh > > On Tue, Apr 19, 2022 at 12:05:22PM +0900, Hiroyuki YAMAMORI wrote: >> When rebuilding rsh-redone, the following message is output and the build >> fails. >> >> dh_installalternatives: error: Alternative "/usr/bin/rsh-redone-rsh" for >> "rsh" in debian/rsh-redone-client.alternatives does not exist in >> debian/rsh-redone-client or is a directory >> make: *** [debian/rules:16: binary] Error 25 >> dpkg-buildpackage: error: debian/rules binary subprocess returned exit >> status 2 >> >> >> Solved with the following patch. >> >> --- a/usr/bin/dh_installalternatives >> +++ b/usr/bin/dh_installalternatives >> @@ -99,7 +99,7 @@ sub _parse_alternative_and_generate_main >> if (index($link_name, '/') > -1) { >> error(qq{Invalid link name "${link_name}" in >> "${alternatives_file}": Must not contain slash}); >> } >> - if ( ! -l "${tmpdir}/${impl_path}" or -d _) { >> + if ( ! -e "${tmpdir}/${impl_path}" or -d _ or ! -r _) { >> error(qq{Alternative "${impl_path}" for "${link_name}" in >> ${alternatives_file} does not exist in ${tmpdir} or is a directory}); >> } >> if ($link_name eq $impl_path) { > > This also causes openssh to fail to build (see e.g. > https://salsa.debian.org/flurb/openssh/-/jobs/2683517). Something like > this patch looks reasonable to me, and at any rate the previous code > doesn't make sense; it seems to require the potential *target* of the > alternative to be a symlink. I get the same error in xterm, so I have raised the severity as at least three packages now fail to build. Cheers, Sven