Package: debhelper
Version: 13.31
Severity: normal
X-Debbugs-Cc: [email protected]
Control: block 1072698 by -1

Hey,

I write here as author of dh_qmldeps a tool to detect QML depdendecies
in files. The tool only returns a list of dependencies that are placed
into qml6:Depends - as the tool cannot know if the qml file is needed or
not.

Before wrting this bug report I read the referrenced documation:
https://lists.debian.org/debian-devel/2024/03/msg00030.html
and https://lists.debian.org/debian-devel/2024/02/msg00230.html.
Still I'm not sure how to fix dh_qmldeps or how to do demotion for
specific packages.

I have several examples where a qml dependecy needs to be demoted in the
Qt/KDE maintainer umbrella.

(full demotion):
kquickimageeditor-dev: only the examples have qml files. That's why
recommending all the qml depdendecy seems resonable. The normal usecase
of an dev package is to be used to build other packages. Installing the
dependencies for examples is too much.

(partial demotion):
libkf6purpose-bin: A tool to provide functionality allover the
plasma desktop to share files and other things. As it support a bunch of
different targets. You may want to not install every dependency as you
do not want to install kdeconnect so do not depend on
qml6-module-org-kde-kdeconnect. And at that time where the recommend was
added, qml6-module-org-kde-kdeconnect does not existed yet in unstable.
qml6-module-org-kde-purpose is needed to be demoted as otherwise we
would face a circular dependency.

I know, partion demotion doesn't work within Dh 13 too.
So I created a workaround to implement it:

After generation the dependency list, go through the
Depends/Recommends/... fields in d/control and removes all the explicit
mentioned dpendendencies of those fields.

https://salsa.debian.org/qt-kde-team/pkg-kde-tools/-/blob/master/pythonlib/qmldeps.py?ref_type=heads#L396

That works and would work in Dh 14 too - but as far as I understand it
is against the idea behind the automatic use of the substvars fields,
that does not support demotion.

At least from the documentation it sounds like the tool (dh_qmldeps)
needs to support manipulating the vars.

I think it would be great, if there is a way to demote in Dh 14 without
the tools to support manipulating. Because if no tool exists than a
sed/awk needs to be used and this is error-prune.

eg. to demote foo to suggests and "bar" to recommends.

# qml6:Depends=foo,bar,zig
dh_manipulate --field "qml6" --demote-from Depends --suggests "foo" 
--recommends "bar"
# qml6:Depends=zig
# qml6:Suggests=foo
# qml6:Recommends=bar


The other way would be to specify/recommend the tool API e.g. for dh_qmldeps,
dh_python3,...:

* support -d parameter for full demotion
* support --pre-depends, --recommends, --suggests to promote/demote specific 
automatic
  detected depenedencies as pre-depends, recommends, suggests instead of depends

Regards,

hefee

-- System Information:
Debian Release: forky/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (100, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.19.10+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debhelper depends on:
ii  autotools-dev            20240727.1
ii  dh-autoreconf            22
ii  dh-strip-nondeterminism  1.15.0-1
ii  dpkg                     1.23.7
ii  dpkg-dev                 1.23.7
ii  dwz                      0.16-4
ii  file                     1:5.46-5+b1
ii  libdebhelper-perl        13.31
ii  libdpkg-perl             1.23.7
ii  man-db                   2.13.1-1
ii  perl                     5.40.1-7+b1
ii  po-debconf               1.0.22

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.202503

-- no debconf information

Reply via email to