Subject: man-db: "man open" gives the manpage of "xdg-open"

From: "Dr. Nikolaus Klepp" <[email-masked]>
Date: Wed, 16 Feb 2022 09:42:40 +0100

Package: man-db
Version: 2.9.4-4
Severity: normal
X-Debbugs-Cc: [email-masked]

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
$ man open

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
$ man open

   * What was the outcome of this action?
The manpage of xdg-open, /usr/share/man/man1/xdg-open.1.gz, from package "xdg-op

   * What outcome did you expect instead?
The manpage of "open", /usr/share/man/man2/open.2.gz, from package "manpages-dev

-- System Information:
Distributor ID: Devuan
Description:	Devuan GNU/Linux 5 (daedalus/ceres)
Release:    5
Codename:   daedalus ceres
Architecture: x86_64

Kernel: Linux 5.15.0-3-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_M
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), LANGUAGE=de_AT:d
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages man-db depends on:
ii  bsdextrautils          2.37.3-1+devuan1
ii  debconf [debconf-2.0]  1.5.79
ii  groff-base             1.22.4-8
ii  libc6                  2.33-5
ii  libgdbm6               1.22-1
ii  libpipeline1           1.5.5-1
ii  libseccomp2            2.5.3-2
ii  zlib1g                 1:1.2.11.dfsg-2

man-db recommends no packages.

Versions of packages man-db suggests:
pn  apparmor                            <none>
ii  firefox-esr [www-browser]		91.5.0esr-1
ii  google-chrome-stable [www-browser]  98.0.4758.80-1
ii  groff                               1.22.4-8
ii  konqueror-trinity [www-browser]	4:14.1.0~s911-0debian12.0.0+17~a
ii  less                                590-1
ii  lynx [www-browser]			2.9.0dev.10-1

-- debconf information:
  man-db/install-setuid: false
  man-db/auto-update: true

-- 
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...

---

From: Mark Hindley <[email-masked]>
Date: Wed, 16 Feb 2022 15:20:19 +0000

Control: tags -1 debian

Nikolaus,

> Version: 2.9.4-4

Thanks for this. However neither man-db, xdg-utils not manpages-dev are forked
packages in Devuan and we use Debian's packages directly without recompilation.

Please report this issue to Debian's BTS.

Thanks.

Mark

---

From: "Dr. Nikolaus Klepp" <[email-masked]>
Date: Thu, 17 Feb 2022 08:49:10 +0100

Got a "wontfix" and "bug closed" from Debian:

"Yes, that's because /usr/share/man/man1/open.1.gz exists as an
alternative which is symlinked to xdg-open.1.gz on your system (via
alternatives), and section 1 is first in the priority list, so man is
working as designed.  Use "man 2 open" to get the page for the system
call."

What nutball does such things?

Nik

Anno domini 2022 Wed, 16 Feb 15:20:19 +0000

---

From: Mark Hindley <[email-masked]>
Date: Thu, 17 Feb 2022 09:48:46 +0000

forwarded 663 https://bugs.debian.org/1005888

---

From: "David (Plasma) Paul" <[email-masked]>
Date: Fri, 18 Feb 2022 01:05:32 -0600

Control: tags -1 wontfix

On Wed, 16 Feb 2022 09:42:40 +0100
> The manpage of "open", /usr/share/man/man2/open.2.gz, from package

The command is working as intended.

When manpages in multiple sections of the manual share the same name,
the page from the earliest section of the manual is fetched and
displayed in response to running 'man <manpage>'.

The xdg-utils package includes an alias for /usr/bin/xdg-open in the
form of /usr/bin/open. A manpage alias is included in the same fashion,
thus both sections 1 and 2 of the manual have a manpage for 'open'.

To specify from which section of the manual to display a manpage,
proceed the name of the manpage with the section number,
i.e.'man 2 open'. To display matching manpages from all sections, use
the -a option, i.e. 'man -a open'.

-- 
Plasma

---

From: Nikolaus Klepp <[email-masked]>
Date: Fri, 18 Feb 2022 08:13:10 +0100

So what would you suggest? File a bugrport for "xdg-utils"?

Nik

Anno domini 2022 Fri, 18 Feb 01:05:32 -0600

---

From: Mark Hindley <[email-masked]>
Date: Fri, 18 Feb 2022 09:41:34 +0000

Control: merge -1 664

> So what would you suggest? File a bugrport for "xdg-utils"?

You could try.

Looking at the xdg-utils changelog[1], this was introduced recently:

xdg-utils (1.1.3-3) unstable; urgency=medium

[...]

  [ Nicholas Guriev ]
  * t-xdg-open.sh: Fix quoting issues. Closes: #975228, Upstream: !32.
  * xdg-open: Open terminal window in generic mode if .desktop file requires so
    Closes: #964877, Upstream: #84.
  * desktop_file_to_binary: fix "unexpected operator" bug. Closes: #809877,
    Upstream: #182.
  * Remove Per Olofsson from Uploaders list. Thank you for your previous work!
    Closes: #847164.
  * Link to /usr/bin/open through alternatives mechanism. LP: #342584.
  * New autopkgtests with Bash and Dash.
  * Bump Standards-Version to 4.5.1, no required changes.

 -- Nicholas Guriev <[email-masked]>  Sun, 10 Jan 2021 12:32:26 +0300

The Ubuntu bug is also worth reading[2], but might not give you much
encouragement.

Whilst it is only a workaround, you might be able to fix the behaviour with (untested)

  update-alternatives --remove open /usr/bin/open

Mark

[1]  https://tracker.debian.org/media/packages/x/xdg-utils/changelog-1.1.3-4.1

[2]  https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/342584

---

From: Mark Hindley <[email-masked]>
Date: Fri, 18 Feb 2022 15:53:55 +0000

reopen 663
forcemerge 663 664