3
# Copyright (C) 2009, 2012, 2013, 2014, 2016, 2018, 2022 Etersoft
4
# Copyright (C) 2009, 2012, 2013, 2014, 2016, 2018, 2022 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
# changed since rpm 4.0.4
21
__rpm_allows_nosignature()
23
a= rpm --help | grep -q -- "--nosignature"
32
case $(get_package_type $PKG) in
35
__rpm_allows_nosignature && NOSIGNATURE="--nosignature" || NOSIGNATURE="--nogpg"
36
docmd rpm --checksig $NOSIGNATURE $PKG
40
# FIXME: debsums -ca package ?
41
docmd dpkg --contents $PKG >/dev/null && echo "Package $PKG is correct."
44
docmd apkg verify $PKG
47
file $PKG | grep -q "executable for MS Windows"
50
# TODO: add to patool via cabextract
51
assure_exists cabextract
52
#file $PKG | grep -q "Microsoft Office Document"
53
docmd cabextract -t $PKG
59
docmd erc test "$PKG" && return
74
#local play_installed="$(epm play --list-installed-packages)"
75
epm qa --short | xargs -n20 | while read cl ; do
76
#cl="$(estrlist exclude "$play_installed" "$i")"
77
__epm_check_installed_pkg $cl && continue
80
__epm_check_installed_pkg $j && continue
81
# TODO: check play installed too
82
epm --auto reinstall $j </dev/null || exit
87
__epm_check_installed_pkg()
102
sudocmd eopkg check $@
105
fatal "Have no suitable command for $PMTYPE"
114
if [ "$1" = "--all" ] ; then
119
if [ -n "$pkg_names" ] ; then
120
# TODO: если есть / или расширение, это отсутствующий файл
121
info "Suggest $pkg_names are name(s) of installed package(s)"
122
__epm_check_installed_pkg $pkg_names
126
# if possible, it will put pkg_urls into pkg_files or pkg_names
127
if [ -n "$pkg_urls" ] ; then
128
load_helper epm-download
129
__handle_pkg_urls_to_checking
132
[ -n "$pkg_files" ] || fatal "Checkpkg: filename(s) is missed"
137
for pkg in $pkg_files ; do
138
check_pkg_integrity $pkg || RETVAL=1
141
#fatal "Broken package $pkg"