[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt show_надо что-то где-то подправить



Здравствуйте.
Посмотрите пожалуйста маленькие заметки по использованию apt show.

По выводу, выдаваемому программой APT есть несколько вопросов-заметок:

1) Можно в программе выдать подсказку -куда вставлять параметр "-a" при
вызове программы "apt show ПАКЕТ"

Сейчас программа выдаёт 
N: Есть 1 дополнительная запись. Используйте «-a» для просмотра

Как вводить? разные вводы параметра "-a" для того, чтобы увидеть
предлагаемую длинную запись -  в начале строки, в середине и в конце?
С большой долей вероятности могу предположить, что надо вводить так - 
apt -a show sview

Но это я исхожу из того, что уже прочитала достаточно много
документации и просто знаю, что два взаимосвязанных слова нельзя
разрывать "show sview", но простой пользователь этого не знает.
Именно поэтому желательно здесь не просто сухо констатировать факт 
"N: Есть 1 дополнительная запись. Используйте «-a» для просмотра"
а подсказать пользователю, что надо сделать, чтоб он увидел ещё одну
запись.

Ведь всего то надо - чуть добавить в код программы, вот в это место,
чтоб выводила так -
N: Есть 1 дополнительная запись. Используйте «apt -a show ПАКЕТ» для
просмотра

И запись не сильно намного удлинится, однако это сильно облегчит
простую жизнь простых пользователей (домашних и школьников тоже).

И поскольку слово "дополнительная" длинное - то можно его заменить и
написать на вывод вот так - 
(в случае добавления предлагаемого - справа увеличится длина строки и
чтобы её каким-то образом укоротить - поищем слево в строке - что можно
уменьшить, ближайший кандидат слово "дополнительная")

N: Есть ещё 1 запись. Используйте «apt -a show ПАКЕТ» для просмотра

И тогда, мне уже попадались такие случаи в случае других цифр. а не "1"
будет-

N: Есть ещё 2 записи. Используйте «apt -a show ПАКЕТ» для просмотра и
тд

Ага, ну вот заглянула здесь да - так склоняется это выражение
(ближайшее что "лежало под рукой" - Debian Stable)

$ cat /etc/debian_version 
9.5

$ dpkg-query -L apt

/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/apt.mo

$ msgunfmt /usr/share/locale/ru/LC_MESSAGES/apt.mo -o
apt_stable_20181105_1014



msgid "There is %i additional record. Please use the '-a' switch to see
it"
msgid_plural ""
"There are %i additional records. Please use the '-a' switch to see
them."
msgstr[0] "Есть %i дополнительная запись. Используйте «-a» для
просмотра"
msgstr[1] "Есть %i дополнительные записи. Используйте «-a» для их
просмотра"
msgstr[2] "Есть %i дополнительных записей. Используйте «-a» для их
просмотра"

msgid "There is %i additional version. Please use the '-a' switch to
see it"
msgid_plural ""
"There are %i additional versions. Please use the '-a' switch to see
them."
msgstr[0] "Есть %i дополнительная версия. Используйте «-a» для
просмотра"
msgstr[1] "Есть %i дополнительные версии. Используйте «-a» для их
просмотра"
msgstr[2] "Есть %i дополнительных версий. Используйте «-a» для их
просмотра"





2) При просмотре обнаружено, что ничего нового не добавлено, тогда
зачем предлагать параметр "-a" ?

apt show sview
Package: sview
Version: 16.05.9-1+deb9u2
Priority: extra
Section: admin
Source: slurm-llnl
Maintainer: Gennaro Oliva <oliva.g@na.icar.cnr.it>
Installed-Size: 2 345 kB
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.7), libcairo2 (>= 1.2.4),
libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0
(>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk2.0-0 (>= 2.14.0),
libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0),
libpangoft2-1.0-0 (>= 1.14.0), slurm-client (= 16.05.9-1+deb9u2)
Breaks: slurm-llnl-sview (<< 14.03)
Replaces: slurm-llnl-sview (<< 14.03)
Homepage: http://slurm.schedmd.com
Download-Size: 729 kB
APT-Sources: http://security.debian.org/debian-security
stretch/updates/main i386 Packages
Description: GUI to view and modify SLURM state
 SLURM, the Simple Linux Utility for Resource Management,
 is an open-source cluster resource management and job scheduling.
 This package contains sview a GUI that can be used to view SLURM
 configuration, job, step, node and partitions state information.
 Authorized users can also modify select information.

N: Есть 1 дополнительная запись. Используйте «-a» для просмотра
--------

$ apt -a show sview
Package: sview
Version: 16.05.9-1+deb9u2
Priority: extra
Section: admin
Source: slurm-llnl
Maintainer: Gennaro Oliva <oliva.g@na.icar.cnr.it>
Installed-Size: 2 345 kB
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.7), libcairo2 (>= 1.2.4),
libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0
(>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk2.0-0 (>= 2.14.0),
libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0),
libpangoft2-1.0-0 (>= 1.14.0), slurm-client (= 16.05.9-1+deb9u2)
Breaks: slurm-llnl-sview (<< 14.03)
Replaces: slurm-llnl-sview (<< 14.03)
Homepage: http://slurm.schedmd.com
Download-Size: 729 kB
APT-Sources: http://security.debian.org/debian-security
stretch/updates/main i386 Packages
Description: GUI to view and modify SLURM state
 SLURM, the Simple Linux Utility for Resource Management,
 is an open-source cluster resource management and job scheduling.
 This package contains sview a GUI that can be used to view SLURM
 configuration, job, step, node and partitions state information.
 Authorized users can also modify select information.

Package: sview
Version: 16.05.9-1+deb9u1
Priority: extra
Section: admin
Source: slurm-llnl
Maintainer: Gennaro Oliva <oliva.g@na.icar.cnr.it>
Installed-Size: 2 345 kB
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.7), libcairo2 (>= 1.2.4),
libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0
(>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk2.0-0 (>= 2.14.0),
libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0),
libpangoft2-1.0-0 (>= 1.14.0), slurm-client (= 16.05.9-1+deb9u1)
Breaks: slurm-llnl-sview (<< 14.03)
Replaces: slurm-llnl-sview (<< 14.03)
Homepage: http://slurm.schedmd.com
Tag: uitoolkit::gtk
Download-Size: 728 kB
APT-Sources: http://mirror.mephi.ru/debian stretch/main i386 Packages
Description: GUI to view and modify SLURM state
 SLURM, the Simple Linux Utility for Resource Management,
 is an open-source cluster resource management and job scheduling.
 This package contains sview a GUI that can be used to view SLURM
 configuration, job, step, node and partitions state information.
 Authorized users can also modify select information.

$ 
------------------
Смотрите ничего не изменилось
А.... сообразила - надо в описании пакета на DDTP удалить символ перевода на другую строку (в конце описания - там очевидно добавлен лишний перенос строки) и тогда, вот конкретно здесь всё будет нормально. Но мне и ранее пару раз попадались такие случаи... (к сожаленью сейчас не вспомню названия пакетов, так как это было пару месяцев назад - я просто удивилась и подумала, что потом сами разработчики где-то что-то подправят :-))))
--------------------
-------------------


3) Где-то что-то некорректно работает в программе - смотрите с
параметром "-a" - смотрите -иногда - редко действительно выдаёт ещё
одну строку описания, НО вот здесь например без всякого предложения
ввести этот "-a" было выдано длинное описание.
Тогда что получается, что в программе где-то имеет место быть
нестыковка?
Почему для вывода более "коротких" описаний программа предлагает ввести
параметр "-a", а для вывода других (более длинных) она, ничего не
спрашивая, сама выводит длинющие сообщения?
Надо где-то что-то исправить.

Вот смотрите пример - 

Пример вывода длинного описания, без предложения ввести "-a":

apt show stealth
Package: stealth
Version: 4.01.05-1
Priority: optional
Section: admin
Maintainer: Frank B. Brokken <f.b.brokken@rug.nl>
Installed-Size: 285 kB
Depends: libbobcat4 (>= 4.02.00), libc6 (>= 2.4), libgcc1 (>= 1:4.2),
libstdc++6 (>= 5.2)
Suggests: stealth-doc
Homepage: https://fbb-git.github.io/stealth
Tag: admin::logging, admin::monitoring, implemented-in::c++,
 interface::commandline, interface::daemon, role::program,
 security::integrity, use::checking, use::monitor
Download-Size: 102 kB
APT-Sources: http://mirror.mephi.ru/debian stretch/main i386 Packages
Description: stealthy File Integrity Checker
 The STEALTH program performs File Integrity Checks on (remote)
clients. It
 differs from other File Integrity Checkers by not requiring baseline
 integrity data to be kept on either write-only media or in the
client's file
 system. In fact, clients will hardly contain any indication suggesting
that
 they are being monitored, thus improving the stealthiness of the
integrity
 scans.
 .
 STEALTH uses standard available software to perform file integrity
checks
 (like find(1) and sha1sum(1)). Using individualized policy files, it
is
 highly adaptable to the specific characteristics of its clients.
 .
 In production environments STEALTH should be run from an isolated
computer
 (called the `STEALTH monitor').  In optimal configurations the STEALTH
 monitor should be a computer not accepting incoming connections. The
account
 used to connect to its clients does not have to be `root'; usually
 read-access to the client's file system is enough to perform a full
integrity
 check. Instead of using `root' a more restrictive administrative or
 ordinary account might offer all necessary requirements for the
desired
 integrity check.
 .
 STEALTH itself must communicate with the computers it should monitor.
It is
 essential that this communication is secure. STEALTH configurations
 therefore normally specify SSH as the command-shell to use for
connecting to
 clients. STEALTH may be configured so as to use but one SSH connection
per
 client, even if integrity scans are to be performed repeatedly. Apart
from
 this, the STEALTH monitor is commonly allowed to send e-mail to remote
 client systems' maintainers.
 .
 STEALTH-runs itself may start randomly within specified intervals. The
 resulting unpredicability of STEALTH-runs further increases STEALTH's
 stealthiness.
 .
 STEALTH's acronym is expanded to `Ssh-based Trust Enforcement Acquired
 through a Locally Trusted Host': the client's trust is enforced, the
locally
 trusted host is the STEALTH monitor.


Reply to: