NBash

Форк
0
81 строка · 2.2 Кб
1
#!/bin/sh
2
#
3
# Copyright (C) 2012-2020  Etersoft
4
# Copyright (C) 2012-2020  Vitaly Lipatov <lav@etersoft.ru>
5
#
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.
10
#
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.
15
#
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/>.
18
#
19

20
epm_install_files_rpm()
21
{
22
    local files="$*"
23
    [ -z "$files" ] && return
24

25
    if __epm_repack_if_needed $files ; then
26
        [ -n "$repacked_pkgs" ] || fatal "Can't convert $files"
27
        files="$repacked_pkgs"
28
    fi
29

30
    if [ -n "$save_only" ] ; then
31
        echo
32
        cp -v $files "$EPMCURDIR"
33
        return
34
    fi
35

36
    if [ -n "$put_to_repo" ] ; then
37
        load_helper epm-repopkg
38
        epm_put_to_repo $files
39
        return
40
    fi
41

42

43
    __epm_check_if_src_rpm $files
44

45
    # --replacepkgs: Install the Package Even If Already Installed
46
    local replacepkgs="$(__epm_get_replacepkgs $files)"
47
    sudocmd rpm -Uvh $replacepkgs $(subst_option dryrun --test) $force $noscripts $nodeps $files && return
48
    local RES=$?
49

50
    __epm_check_if_rpm_already_installed $force $replacepkgs $noscripts $nodeps $files && return
51

52
    # if run with --nodeps, do not fallback on hi level
53
    [ -n "$nodeps" ] && return $RES
54

55
    # fallback to install names
56

57
    # separate second output
58
    info
59

60
    case $PMTYPE in
61
        yum-rpm|dnf-rpm)
62
            YUMOPTIONS=--nogpgcheck
63
            # use install_names
64
            ;;
65
        zypper-rpm)
66
            ZYPPEROPTIONS=$(__use_zypper_no_gpg_checks)
67
            # use install_names
68
            ;;
69
        urpm-rpm)
70
            URPMOPTIONS=--no-verify-rpm
71
            # use install_names
72
            ;;
73
        *)
74
            # use install_names
75
            ;;
76
    esac
77

78
    epm_install_names $files
79
    return
80

81
}
82

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.