Discussion:
Bug#1086809: ucfq has undeclared dependency on a full perl installation: Getopt/Long/Parser.pm not present in perl-base
Add Reply
Mark Hindley
2024-11-06 11:30:01 UTC
Reply
Permalink
Package: ucf
Version: 3.0043+nmu1
Severity: serious
Justification: Undeclared dependency, breaks unrelated packages

Dear Maintainer,

ucfq uses the perl module Getopt/Long/Parser.pm[1]. In perl 5-40 (which bundled
Getopt-Long 2.57) this module has been split to a separate file [2]. Relying on
the Essential perl-base being installed is now inadequate:

apollo:/# dpkg -l|grep 'perl\|ucf'
ii perl-base 5.40.0-6 amd64 minimal Perl system
ii ucf 3.0043+nmu1 all Update Configuration File(s): preserve user changes to config files
apollo:/# ucfq
Can't locate Getopt/Long/Parser.pm in @INC (you may need to install the Getopt::Long::Parser module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64
-linux-gnu/perl/5.40.0 /usr/local/share/perl/5.40.0 /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_
64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/lib/x86_64-linux-gnu/perl-base/Getopt/Long.pm line 143.

Either ucf needs to depend on perl or perl-base needs to include
Getopt/Long/Parser.pm. Copying Niko for his opinion, I suppose other packages
may be impacted by this change?

Mark

[1] https://salsa.debian.org/srivasta/ucf/-/blob/master/ucfq?ref_type=heads#L799

[2] https://metacpan.org/dist/Getopt-Long/changes#L24

-- System Information:
Debian Release: 12.7
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-26-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: OpenRC (via /run/openrc), PID 1: init

Versions of packages ucf depends on:
ii debconf [debconf-2.0] 1.5.82
ii sensible-utils 0.0.17+nmu1

ucf recommends no packages.

ucf suggests no packages.

-- debconf information:
* ucf/changeprompt: install_new
* ucf/changeprompt_threeway: keep_current
* ucf/show_diff:
ucf/title:
ucf/conflicts_found:
Niko Tyni
2024-11-06 20:40:01 UTC
Reply
Permalink
Control: reassign -1 perl-base 5.40.0-6
Control: retitle -1 perl-base: reinstate Getopt::Long::Parser
Post by Mark Hindley
Package: ucf
Version: 3.0043+nmu1
Severity: serious
Justification: Undeclared dependency, breaks unrelated packages
ucfq uses the perl module Getopt/Long/Parser.pm[1]. In perl 5-40 (which bundled
Getopt-Long 2.57) this module has been split to a separate file [2]. Relying on
Thanks for the report and for copying me.

Indeed this works on bookworm with just perl-base but dies
on trixie/sid:

# perl -MGetopt::Long -E 'say "ok" if Getopt::Long::Parser->new'
Post by Mark Hindley
Either ucf needs to depend on perl or perl-base needs to include
Getopt/Long/Parser.pm. Copying Niko for his opinion, I suppose other packages
may be impacted by this change?
This was an accidental change to the Essential functionality of
perl-base. We do have some checks in place to notice if perl-base becomes
no longer self contained, but the failure mode is subtle enough that we
missed it.

I don't think ucfq can easily depend on things outside the essential set,
as it's commonly used in 'postrm purge' logic, where such dependencies are
not guaranteed to be satisfied. A quick search on codesearch.debian.net
suggests not all postrm scripts catch ucfq failures gracefully (nor are
they currently expected to in my understanding.) And if we still tried
fix this in ucfq, we'd also have to consider partial upgrades where
perl-base might be upgraded before ucf.

So I think this is a bug in perl-base, and we need to fix it there
by reinstating Getopt::Long::Parser. As the policy puts it, we have
an obligation to support the module as part of the Essential set in
perpetuity.

Reassigning.
--
Niko
Loading...