epm 16.1 KB
Newer Older
1
#!/bin/sh
Vitaly Lipatov's avatar
Vitaly Lipatov committed
2
#
Vitaly Lipatov's avatar
Vitaly Lipatov committed
3 4
# Copyright (C) 2012-2020  Etersoft
# Copyright (C) 2012-2020  Vitaly Lipatov <lav@etersoft.ru>
Vitaly Lipatov's avatar
Vitaly Lipatov committed
5
#
6 7 8
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Vitaly Lipatov's avatar
Vitaly Lipatov committed
9 10 11 12 13
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
Vitaly Lipatov's avatar
Vitaly Lipatov committed
15
#
16 17
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
Vitaly Lipatov's avatar
Vitaly Lipatov committed
18 19
#

20 21
PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0")
22
[ "$PROGDIR" = "." ] && PROGDIR=$(pwd)
23 24
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
    PROGDIR=""
25
    PROGNAME=""
26
fi
27

28
# will replaced to /usr/share/eepm during install
29
SHAREDIR=$PROGDIR
Vitaly Lipatov's avatar
Vitaly Lipatov committed
30
CONFIGDIR=$PROGDIR/..
31 32 33

load_helper()
{
34
    local CMD="$SHAREDIR/$1"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
35 36
    # do not use fatal() here, it can be initial state
    [ -r "$CMD" ] || { echo "FATAL: Have no $CMD helper file" ; exit 1; }
Vitaly Lipatov's avatar
Vitaly Lipatov committed
37
    # shellcheck disable=SC1090
38
    . $CMD
39 40
}

41

42 43
load_helper epm-sh-functions

Vitaly Lipatov's avatar
Vitaly Lipatov committed
44 45
#PATH=$PATH:/sbin:/usr/sbin

46 47
set_pm_type

48
set_sudo
49

50
check_tty
Vitaly Lipatov's avatar
Vitaly Lipatov committed
51 52 53 54 55 56 57 58

#############################

phelp()
{
	echo "$Descr
$Usage

Vitaly Lipatov's avatar
Vitaly Lipatov committed
59
Options:
60
$(get_help HELPOPT)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
61 62 63 64 65 66 67 68 69 70

Short commands:
$(get_help HELPSHORT)

$(get_help HELPCMD)

Examples:
    $ epmi etckeeper      install etckeeper package
    $ epmqp lib           print out all installed packages with 'lib' in a name
    $ epmqf ip            print out a package the command 'ip' from is
Vitaly Lipatov's avatar
Vitaly Lipatov committed
71 72 73
"
}

Vitaly Lipatov's avatar
Vitaly Lipatov committed
74 75
print_version()
{
Vitaly Lipatov's avatar
Vitaly Lipatov committed
76
        echo "EPM package manager version @VERSION@  https://wiki.etersoft.ru/Epm"
77
        echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
78
        echo "Copyright (c) Etersoft 2012-2020"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
79
        echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
Vitaly Lipatov's avatar
Vitaly Lipatov committed
80 81
}

82

Danil Mikhailov's avatar
Danil Mikhailov committed
83 84
Usage="Usage: epm [options] <command> [package name(s), package files]..."
Descr="epm - EPM package manager"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
85

86
EPMVERSION=@VERSION@
87
verbose=
88
quiet=
89
nodeps=
90
noremove=
91
dryrun=
92
force=
93
repack=
94
inscript=
95
scripts=
96
short=
97
direct=
Vitaly Lipatov's avatar
Vitaly Lipatov committed
98
sort=
99
non_interactive=
100
skip_installed=
101
skip_missed=
102
show_command_only=
Vitaly Lipatov's avatar
Vitaly Lipatov committed
103 104
epm_cmd=
pkg_files=
105
pkg_dirs=
Vitaly Lipatov's avatar
Vitaly Lipatov committed
106
pkg_names=
107
pkg_urls=
108
quoted_args=
109

110 111 112 113
# load system wide config
[ -f /etc/eepm/eepm.conf ] && . /etc/eepm/eepm.conf


114
case $PROGNAME in
Vitaly Lipatov's avatar
Vitaly Lipatov committed
115
    epmi)                      # HELPSHORT: alias for epm install
116 117
        epm_cmd=install
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
118
    epmI)                      # HELPSHORT: alias for epm Install
Vitaly Lipatov's avatar
Vitaly Lipatov committed
119 120
        epm_cmd=Install
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
121
    epme)                      # HELPSHORT: alias for epm remove
Danil Mikhailov's avatar
Danil Mikhailov committed
122 123
        epm_cmd=remove
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
124
    epmcl)                     # HELPSHORT: alias for epm changelog
125 126
        epm_cmd=changelog
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
127
    epms)                      # HELPSHORT: alias for epm search
Danil Mikhailov's avatar
Danil Mikhailov committed
128 129
        epm_cmd=search
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
130
    epmsf)                     # HELPSHORT: alias for epm search file
131 132
        epm_cmd=search_file
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
133
    epmq)                      # HELPSHORT: alias for epm query
134 135
        epm_cmd=query
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
136
    epmqi)                     # HELPSHORT: alias for epm info
137 138
        epm_cmd=info
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
139
    epmqf)                     # HELPSHORT: alias for epm belongs
Danil Mikhailov's avatar
Danil Mikhailov committed
140 141
        epm_cmd=query_file
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
142
    epmqa)                     # HELPSHORT: alias for epm packages
143 144
        epm_cmd=packages
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
145
    epmqp)                     # HELPSHORT: alias for epm qp (epm query package)
146 147
        epm_cmd=query_package
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
148
    epmql)                     # HELPSHORT: alias for epm filelist
149 150
        epm_cmd=filelist
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
151
    epmrl)                     # HELPSHORT: alias for epm repo list
152 153
        epm_cmd=repolist
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
154
    epmu)                      # HELPSHORT: alias for epm update
155 156
        epm_cmd=update
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
157
    epm|upm|eepm)              # HELPSHORT: other aliases for epm command
Danil Mikhailov's avatar
Danil Mikhailov committed
158
        ;;
159 160
    epm.sh)
        ;;
161
    *)
162 163
        # epm by default
        # fatal "Unknown command: $progname"
164 165 166
        ;;
esac

167 168 169
# was called with alias name
[ -n "$epm_cmd" ] && PROGNAME="epm"

170 171 172 173 174
check_command()
{
    # do not override command
    [ -z "$epm_cmd" ] || return

Vitaly Lipatov's avatar
Vitaly Lipatov committed
175
# HELPCMD: PART: Base commands:
176
    case $1 in
Vitaly Lipatov's avatar
Vitaly Lipatov committed
177
    -i|install|add|i)         # HELPCMD: install package(s) from remote repositories or from local file
Vitaly Lipatov's avatar
Vitaly Lipatov committed
178 179
        epm_cmd=install
        ;;
180
    -e|-P|rm|del|remove|delete|uninstall|erase|e)  # HELPCMD: remove (delete) package(s) from the database and the system
Danil Mikhailov's avatar
Danil Mikhailov committed
181 182
        epm_cmd=remove
        ;;
183
    -s|search|s)                # HELPCMD: search in remote package repositories
184
        epm_cmd=search
185
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
186
    -qp|qp|query_package)     # HELPCMD: search in the list of installed packages
187 188
        epm_cmd=query_package
        ;;
189
    -qf|qf|-S|wp|which|belongs)     # HELPCMD: query package(s) owning file
190
        epm_cmd=query_file
191
        ;;
192

Vitaly Lipatov's avatar
Vitaly Lipatov committed
193
# HELPCMD: PART: Useful commands:
Vitaly Lipatov's avatar
Vitaly Lipatov committed
194
    reinstall)                # HELPCMD: reinstall package(s) from remote repositories or from local file
195
        epm_cmd=reinstall
Danil Mikhailov's avatar
Danil Mikhailov committed
196
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
197
    Install)                  # HELPCMD: perform update package repo info and install package(s) via install command
198 199
        epm_cmd=Install
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
200
    -q|q|installed|query)     # HELPCMD: check presence of package(s) and print this name (also --short is supported)
Danil Mikhailov's avatar
Danil Mikhailov committed
201
        epm_cmd=query
Danil Mikhailov's avatar
Danil Mikhailov committed
202
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
203
    -sf|sf|filesearch)        # HELPCMD: search in which package a file is included
204 205
        epm_cmd=search_file
        ;;
206
    -ql|ql|filelist|get-files)          # HELPCMD: print package file list
207
        epm_cmd=filelist
Danil Mikhailov's avatar
Danil Mikhailov committed
208
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
209
    check|fix|verify)         # HELPCMD: check local package base integrity and fix it
210 211
        epm_cmd=check
        ;;
212 213 214
    dedup)                    # HELPCMD: remove unallowed duplicated pkgs (after upgrade crash)
        epm_cmd=dedup
        ;;
215
    -cl|cl|changelog)         # HELPCMD: show changelog for package
216 217
        epm_cmd=changelog
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
218
    -qi|qi|info|show)         # HELPCMD: print package detail info
219 220
        epm_cmd=info
        ;;
221
    requires|deplist|depends|req|depends-on)     # HELPCMD: print package requires
222 223
        epm_cmd=requires
        ;;
224
    provides|prov)            # HELPCMD: print package provides
225 226
        epm_cmd=provides
        ;;
227
    whatdepends|rdepends|whatrequires|wd|required-by)   # HELPCMD: print packages dependences on that
228 229
        epm_cmd=whatdepends
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
230
    whatprovides)             # HELPCMD: print packages provides that target
231 232
        epm_cmd=whatprovides
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
233
    conflicts)                # HELPCMD: print package conflicts
234 235
        epm_cmd=conflicts
        ;;
236
    -qa|qa|-l|list|packages)  # HELPCMD: print list of installed package(s)
237 238
        epm_cmd=packages
        ;;
239
    programs)                 # HELPCMD: print list of installed GUI program(s) (they have .desktop files)
240 241
        epm_cmd=programs
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
242
    assure)                   # HELPCMD: <command> [package] [version]: install package if command does not exist
243 244
        epm_cmd=assure
        ;;
245
    policy|resolve)           # HELPCMD: print detailed information about the priority selection of package
246 247
        epm_cmd=policy
        ;;
248

Vitaly Lipatov's avatar
Vitaly Lipatov committed
249
# HELPCMD: PART: Repository control:
Vitaly Lipatov's avatar
Vitaly Lipatov committed
250
    update)                   # HELPCMD: update remote package repository databases
251
        epm_cmd=update
252
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
253
    addrepo|ar)               # HELPCMD: add package repo (etersoft, autoimports, archive 2017/12/31); run with param to get list
254 255
        epm_cmd=addrepo
        ;;
256
    repolist|sl|rl|listrepo|repo-list)  # HELPCMD: print repo list
Vitaly Lipatov's avatar
Vitaly Lipatov committed
257 258
        epm_cmd=repolist
        ;;
259
    repofix)                  # HELPCMD: <mirror>: fix paths in sources lists (ALT Linux only). use repofix etersoft/yandex/basealt for rewrite URL to the specified server
260 261
        epm_cmd=repofix
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
262
    removerepo|rr)            # HELPCMD: remove package repo (shortcut for epm repo remove)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
263 264
        epm_cmd=removerepo
        ;;
265 266 267
    repo)                     # HELPCMD: manipulate with repository list (run epm repo --help to help)
        epm_cmd=repo
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
268 269 270
    full-upgrade)              # HELPCMD: update all system packages and kernel
        epm_cmd=full_upgrade
        ;;
271
    release-upgrade|upgrade-release|upgrade-system|release-switch)  # HELPCMD: upgrade/switch whole system to the release in arg (default: next (latest) release)
272 273
        epm_cmd=release_upgrade
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
274
    kernel-update|kernel-upgrade|update-kernel|upgrade-kernel)      # HELPCMD: update system kernel to the last repo version
275
        epm_cmd=kernel_update
Vitaly Lipatov's avatar
Vitaly Lipatov committed
276
        ;;
277 278
    remove-old-kernels|remove-old-kernel)      # HELPCMD: remove old system kernels (exclude current or last two kernels)
        epm_cmd=remove_old_kernels
279
        ;;
280

Vitaly Lipatov's avatar
Vitaly Lipatov committed
281
# HELPCMD: PART: Other commands:
Vitaly Lipatov's avatar
Vitaly Lipatov committed
282
    clean)                    # HELPCMD: clean local package cache
283 284
        epm_cmd=clean
        ;;
285 286 287
    restore)                  # HELPCMD: install (restore) packages need for the project (f.i. by requirements.txt)
        epm_cmd=restore
        ;;
288
    autoremove|package-cleanup)   # HELPCMD: auto remove unneeded package(s) Supports args for ALT: [--direct [libs|python|perl|libs-devel]]
289 290
        epm_cmd=autoremove
        ;;
291 292 293
    mark)                     # HELPCMD: mark package as manually or automatically installed (see epm mark --help)
        epm_cmd=mark
        ;;
294 295 296
    autoorphans|--orphans)    # HELPCMD: remove all packages not from the repository
        epm_cmd=autoorphans
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
297
    upgrade|dist-upgrade)     # HELPCMD: performs upgrades of package software distributions
298 299
        epm_cmd=upgrade
        ;;
300
    Upgrade)                  # HELPCMD: force update package base, then run upgrade
301 302
        epm_cmd=Upgrade
        ;;
303 304 305
    downgrade)                # HELPCMD: downgrade [all] packages to the repo state
        epm_cmd=downgrade
        ;;
306
    download)                 # HELPCMD: download package(s) file to the current dir
307 308
        epm_cmd=download
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
309
# TODO: replace with install --simulate
310
    simulate)                 # HELPCMD: simulate install with check requires
311 312
        epm_cmd=simulate
        ;;
313 314 315
    audit)                    # HELPCMD: audits installed packages against known vulnerabilities
        epm_cmd=audit
        ;;
316 317 318
    #checksystem)              # HELPCMD: check system for known errors (package management related)
    #    epm_cmd=checksystem
    #    ;;
319 320 321
    site|url)                 # HELPCMD: open package's site in a browser (use -p for open packages.altlinux.org site)
        epm_cmd=site
        ;;
322
    ei|ik|epminstall|epm-install|selfinstall) # HELPCMD: install package(s) from Korinf (eepm by default)
323 324
        epm_cmd=epm_install
        ;;
325 326 327
    print)                    # HELPCMD: print various info, run epm print help for details
        epm_cmd=print
        ;;
328 329 330
    repack)                   # HELPCMD: repack rpm to local compatibility
        epm_cmd=repack
        ;;
331 332 333
    prescription|recipe)      # HELPCMD: run prescription (a script to achieving the goal), run without args to get list
        epm_cmd=prescription
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
334
    -V|checkpkg|integrity)    # HELPCMD: check package file integrity (checksum)
335 336
        epm_cmd=checkpkg
        ;;
337 338 339 340 341
    -h|--help|help)           # HELPOPT: print this help
        help=1
        phelp
        exit 0
        ;;
342 343
    *)
        return 1
344
        ;;
345 346 347 348
    esac
    return 0
}

349 350 351
check_option()
{
    case $1 in
352
    -v|--version)         # HELPOPT: print version
Vitaly Lipatov's avatar
Vitaly Lipatov committed
353 354
        print_version
        exit 0
355 356 357 358
        ;;
    --verbose)            # HELPOPT: verbose mode
        verbose=1
        ;;
359
    --skip-installed)     # HELPOPT: skip already installed packages during install
360 361
        skip_installed=1
        ;;
362 363 364
    --skip-missed)        # HELPOPT: skip not installed packages during remove
        skip_missed=1
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
365
    --show-command-only)  # HELPOPT: show command only, do not any action (supports install and remove ONLY)
366 367
        show_command_only=1
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
368
    --quiet|--silent)     # HELPOPT: quiet mode (do not print commands before exec)
369 370
        quiet=1
        ;;
371 372 373
    --nodeps)             # HELPOPT: skip dependency check (during install/simulate and so on)
        nodeps="--nodeps"
        ;;
374 375 376
    --force)              # HELPOPT: force install/remove package (f.i., override)
        force="--force"
        ;;
377 378 379
    --noremove|--no-remove)  # HELPOPT: exit if any packages are to be removed during upgrade
        noremove="--no-remove"
        ;;
380
    --no-stdin|--inscript)  # HELPOPT: don't read from stdin for epm args
381 382
        inscript=1
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
383
    --dry-run|--simulate|--just-print|--no-act) # HELPOPT: print only (autoremove/autoorphans/remove only)
384 385
        dryrun="--dry-run"
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
386
    --short)              # HELPOPT: short output (just 'package' instead 'package-version-release')
387 388
        short="--short"
        ;;
389 390 391
    --direct)              # HELPOPT: direct install package file from ftp (not via hilevel repository manager)
        direct="--direct"
        ;;
392 393 394
    --repack)              # HELPOPT: repack rpm package(s) before install
        repack="--repack"
        ;;
395
    --scripts)              # HELPOPT: include scripts in repacked rpm package(s) (see --repack or repacking when foreign package is installed)
396 397
        scripts="--scripts"
        ;;
398
    --sort)               # HELPOPT: sort output, f.i. --sort=size (supported only for packages command)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
399
        # TODO: how to read arg?
400 401
        sort="$1"
        ;;
402
    --auto|--non-interactive)  # HELPOPT: non interactive mode
403 404
        non_interactive=1
        ;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
405
    *)
406
        return 1
Vitaly Lipatov's avatar
Vitaly Lipatov committed
407 408
        ;;
    esac
409 410 411
    return 0
}

412 413 414 415 416
has_space()
{
    [ -n "$2" ]
}

417 418
check_filenames()
{
419
    local opt
420
    for opt in "$@" ; do
421 422
        # files can be with full path or have extension via .
        if [ -f "$opt" ] && echo "$opt" | grep -q "[/\.]" ; then
423
            has_space $opt && warning "There are space(s) in filename '$opt', it is not supported. Skipped" && continue
424
            pkg_files="$pkg_files $opt"
425
        elif [ -d "$opt" ] ; then
426
            has_space $opt && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue
427
            pkg_dirs="$pkg_dirs $opt"
428
        elif echo "$opt" | grep -q "://" ; then
429
            has_space $opt && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue
430
            pkg_urls="$pkg_urls $opt"
431
        else
432
            has_space $opt && warning "There are space(s) in package name '$opt', it is not supported. Skipped" && continue
433 434 435 436
            pkg_names="$pkg_names $opt"
        fi
        quoted_args="$quoted_args \"$opt\""
    done
437 438
}

439
FLAGENDOPTS=
440
for opt in "$@" ; do
441 442
    [ "$opt" = "--" ] && FLAGENDOPTS=1 && continue
    if [ -z "$FLAGENDOPTS" ] ; then
443 444
        check_command "$opt" && continue
        check_option "$opt" && continue
445
    fi
446
    # Note: will parse all params separately (no package names with spaces!)
447
    check_filenames "$opt"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
448 449
done

450
# if input is not console and run script from file, get pkgs from stdin too
451
if [ ! -n "$inscript" ] && ! inputisatty && [ -n "$PROGDIR" ] ; then
452
    for opt in $(withtimeout 10 cat) ; do
453 454 455 456
        # FIXME: do not work
        # workaround against # yes | epme
        [ "$opt" = "y" ] && break;
        [ "$opt" = "yes" ] && break;
457 458 459 460
        check_filenames $opt
    done
fi

Vitaly Lipatov's avatar
Vitaly Lipatov committed
461
pkg_files=$(strip_spaces "$pkg_files")
462
pkg_dirs=$(strip_spaces "$pkg_dirs")
463 464
# in common case dirs equals to names only suddenly
pkg_names=$(strip_spaces "$pkg_names $pkg_dirs")
465
pkg_urls=$(strip_spaces "$pkg_urls")
Vitaly Lipatov's avatar
Vitaly Lipatov committed
466

467
pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
468

469 470 471 472
# Just debug
#echover "command: $epm_cmd"
#echover "pkg_files=$pkg_files"
#echover "pkg_names=$pkg_names"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
473

Vitaly Lipatov's avatar
Vitaly Lipatov committed
474
# Just printout help if run without args
Vitaly Lipatov's avatar
Vitaly Lipatov committed
475 476 477
if [ -z "$epm_cmd" ] ; then
    print_version
    echo
478
    fatstr="Unknown command in $* arg(s)"
479 480
    [ -n "$*" ] || fatstr="That program needs be running with some command"
    fatal "$fatstr. Run $ $PROGNAME --help to get help."
Vitaly Lipatov's avatar
Vitaly Lipatov committed
481 482
fi

483 484
# Use eatmydata for write specific operations
case $epm_cmd in
485
    update|upgrade|Upgrade|install|reinstall|Install|remove|autoremove|kernel_update|release_upgrade|check)
486
        set_eatmydata
487
        ;;
488 489
esac

490
# Run helper for command with natural args
491
load_helper epm-$epm_cmd
492
eval epm_$epm_cmd $quoted_args
Vitaly Lipatov's avatar
Vitaly Lipatov committed
493
# return last error code (from subroutine)