内置 .deb 的手册页安装在 Debian 上,但不能安装在 Ubuntu 上

内置 .deb 的手册页安装在 Debian 上,但不能安装在 Ubuntu 上

.deb我正在使用 test-kitchen 在不同的发行版上测试包的构建。构建的文件在 Debian 和 Ubuntu 上都.deb可以正常安装该命令。/usr/bin我的问题是 Ubuntu 上没有安装手册页。.debUbuntu 上构建文件的内容是:

kitchen@ceddd8d3564c:/opt/workspace$ dpkg -c $(find . -name \*.deb)
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/bin/
-rwxr-xr-x 0/0           33742 2018-06-08 14:24 ./usr/bin/git-secret
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man7/
-rw-r--r-- 0/0            5298 2018-06-08 14:24 ./usr/share/man/man7/git-secret.7
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man1/
-rw-r--r-- 0/0            1355 2018-06-08 14:24 ./usr/share/man/man1/git-secret-add.1
-rw-r--r-- 0/0             819 2018-06-08 14:24 ./usr/share/man/man1/git-secret-init.1
-rw-r--r-- 0/0            1440 2018-06-08 14:24 ./usr/share/man/man1/git-secret-hide.1
-rw-r--r-- 0/0            1734 2018-06-08 14:24 ./usr/share/man/man1/git-secret-tell.1
-rw-r--r-- 0/0             931 2018-06-08 14:24 ./usr/share/man/man1/git-secret-clean.1
-rw-r--r-- 0/0             936 2018-06-08 14:24 ./usr/share/man/man1/git-secret-remove.1
-rw-r--r-- 0/0             959 2018-06-08 14:24 ./usr/share/man/man1/git-secret-list.1
-rw-r--r-- 0/0            1246 2018-06-08 14:24 ./usr/share/man/man1/git-secret-cat.1
-rw-r--r-- 0/0             843 2018-06-08 14:24 ./usr/share/man/man1/git-secret-usage.1
-rw-r--r-- 0/0            1337 2018-06-08 14:24 ./usr/share/man/man1/git-secret-reveal.1
-rw-r--r-- 0/0            1445 2018-06-08 14:24 ./usr/share/man/man1/git-secret-changes.1
-rw-r--r-- 0/0             998 2018-06-08 14:24 ./usr/share/man/man1/git-secret-killperson.1
-rw-r--r-- 0/0             940 2018-06-08 14:24 ./usr/share/man/man1/git-secret-whoknows.1
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/git-secret/
-rw-r--r-- 0/0             149 2018-06-08 14:24 ./usr/share/doc/git-secret/changelog.gz
kitchen@ceddd8d3564c:/opt/workspace$

安装命令sudo dpkg --force-all --install $(find . -name \*.deb)输出:

(Reading database ... 41209 files and directories currently installed.)
Preparing to unpack .../git-secret_0.2.4_all.deb ...
Unpacking git-secret (0.2.4) over (0.2.4) ...
Setting up git-secret (0.2.4) ...
Processing triggers for man-db (2.8.3-2) ...

之后,man git-secretman git-secret-init报告“没有 git-secret-init 的手动输入”。

最新的 Debian 上使用相同的软件包,一切正常:

kitchen@c71479c4f76c:/opt/workspace$ dpkg -c $(find . -name \*.deb)
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/bin/
-rwxr-xr-x 0/0           33742 2018-06-08 14:24 ./usr/bin/git-secret
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man7/
-rw-r--r-- 0/0            5298 2018-06-08 14:24 ./usr/share/man/man7/git-secret.7
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man1/
-rw-r--r-- 0/0            1355 2018-06-08 14:24 ./usr/share/man/man1/git-secret-add.1
-rw-r--r-- 0/0             819 2018-06-08 14:24 ./usr/share/man/man1/git-secret-init.1
-rw-r--r-- 0/0            1440 2018-06-08 14:24 ./usr/share/man/man1/git-secret-hide.1
-rw-r--r-- 0/0            1734 2018-06-08 14:24 ./usr/share/man/man1/git-secret-tell.1
-rw-r--r-- 0/0             931 2018-06-08 14:24 ./usr/share/man/man1/git-secret-clean.1
-rw-r--r-- 0/0             936 2018-06-08 14:24 ./usr/share/man/man1/git-secret-remove.1
-rw-r--r-- 0/0             959 2018-06-08 14:24 ./usr/share/man/man1/git-secret-list.1
-rw-r--r-- 0/0            1246 2018-06-08 14:24 ./usr/share/man/man1/git-secret-cat.1
-rw-r--r-- 0/0             843 2018-06-08 14:24 ./usr/share/man/man1/git-secret-usage.1
-rw-r--r-- 0/0            1337 2018-06-08 14:24 ./usr/share/man/man1/git-secret-reveal.1
-rw-r--r-- 0/0            1445 2018-06-08 14:24 ./usr/share/man/man1/git-secret-changes.1
-rw-r--r-- 0/0             998 2018-06-08 14:24 ./usr/share/man/man1/git-secret-killperson.1
-rw-r--r-- 0/0             940 2018-06-08 14:24 ./usr/share/man/man1/git-secret-whoknows.1
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/git-secret/
-rw-r--r-- 0/0             149 2018-06-08 14:24 ./usr/share/doc/git-secret/changelog.gz
kitchen@c71479c4f76c:/opt/workspace$

同样的方法安装:

kitchen@c71479c4f76c:/opt/workspace$ sudo dpkg --force-all --install $(find . -name \*.deb)
Selecting previously unselected package git-secret.
(Reading database ... 29069 files and directories currently installed.)
Preparing to unpack .../git-secret_0.2.4_all.deb ...
Unpacking git-secret (0.2.4) ...
Setting up git-secret (0.2.4) ...
Processing triggers for man-db (2.7.6.1-2) ...
kitchen@c71479c4f76c:/opt/workspace$

作品:

kitchen@c71479c4f76c:/opt/workspace$ man -w git-secret-init
/usr/share/man/man1/git-secret-init.1
kitchen@c71479c4f76c:/opt/workspace$ man -w git-secret
/usr/share/man/man7/git-secret.7
kitchen@c71479c4f76c:/opt/workspace$

可以运行的 Debian 版本是:

kitchen@c71479c4f76c:/opt/workspace$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch
kitchen@c71479c4f76c:/opt/workspace$

没有的 Ubuntu 版本是:

kitchen@ceddd8d3564c:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:        18.04
Codename:       bionic
kitchen@ceddd8d3564c:~$

为什么 Ubuntu 上没有安装手册页?

答案1

dpkg在 Ubuntu 系统上的配置,即path-exclude=/usr/share/man/*中的指令/etc/dpkg/dpkg.cfg.d/excludesdpkg指示不是安装手册页。

如果您确实想要安装联机帮助页,请删除相应的行并再次安装该软件包。

相关内容