[Contribute Advice] Deepin某些软件包的描述存在这个问题:字符之间的空格多于1个
Tofloor
poster avatar
182******91
deepin
2023-03-06 03:57
Author

观察如下的软件包的描述。

ii  deepin-album                                  5.10.9-1                              amd64        Album for UOS  Album is a fashion photo manager for viewing and organizing pictures.
ii  deepin-camera                                 1.4.9-1                               amd64        this package software for  UOS deepin-camera is a tool to view camera, and also a smart take photo and video in life.
rc  deepin-mail                                   5.4.14-1                                   amd64        Mail is an easy-to-use desktop mail client that can manage multiple email accounts,supporting IMAP and POP3 protocols.    Mail, developed by UnionTech Software, provides users with safe, convenient, free and value-added email services.

在这些软件包的描述部分,字符之间的空格有超过1个的。

在对 dpkg -l的运行结果进行自动化处理时,上述情况会使得程序不能得出正确的5种数据:状态、名称、版本、体系结构、描述。由于描述中的字符串会被分割,结果会超出5项。

目前来看,我的系统中安装过的非Deepin的软件包都没有这种情况。

希望Deepin团队修复上述这个问题。

Reply Favorite View the author
All Replies
avatar
W2J
deepin
2023-03-06 06:09
#1

这种叫美化输出格式,命令行输出很常见,比如top。

三剑客就能处理,用cut也能。

Reply View the author
avatar
忘记、过去
deepin
2023-03-06 06:32
#2

正常软件包的 Description 会没有空格?都连在一起?

不好拆分就换方法,dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version} ${Architecture}',每个字段中间自定义分隔符即可

Reply View the author