Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
c517c791
Commit
c517c791
authored
Nov 10, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-autoremove: rewrite help, add python2 and python3 separately
parent
4d1013cf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
epm-autoremove
bin/epm-autoremove
+28
-6
No files found.
bin/epm-autoremove
View file @
c517c791
...
...
@@ -128,6 +128,8 @@ __epm_autoremove_altrpm_lib()
}
epm_autoremove_default_groups
=
"python2 python3 perl libs"
__epm_autoremove_altrpm
()
{
local
i
...
...
@@ -135,9 +137,7 @@ __epm_autoremove_altrpm()
assure_exists /usr/share/apt/scripts/list-nodeps.lua apt-scripts
if
[
-z
"
$pkg_names
"
]
;
then
__epm_autoremove_altrpm_pp
'^(python-module-|python3-module-|python-modules-|python3-modules|perl-)'
__epm_autoremove_altrpm_lib nodevel
return
0
pkg_names
=
"
$epm_autoremove_default_groups
"
fi
for
i
in
$pkg_names
;
do
...
...
@@ -161,7 +161,7 @@ __epm_autoremove_altrpm()
__epm_autoremove_altrpm_lib
;;
*
)
fatal
"autoremove: unsupported '
$i
'. Use
libs, python, python2, python3, perl, libs-devel.
"
fatal
"autoremove: unsupported '
$i
'. Use
epm autoremove --help to list supported ones
"
;;
esac
done
...
...
@@ -169,19 +169,41 @@ __epm_autoremove_altrpm()
return
0
}
epm_autoremove_print_help
()
{
echo
"epm autoremove removes unneeded packages from the system"
echo
"run 'epm autoremove' to use apt-get autoremove"
echo
"or run 'epm autoremove --direct [group1] [group2] ...' to use epm implementation"
echo
"Default groups:
$epm_autoremove_default_groups
"
cat
<<
EOF
Supported package groups:
libs - unused libraries
libs-devel - unused -devel packages
python - all python modules
python2 - python2 modules
python3 - python3 modules
perl - perl- modules
EOF
}
# TODO: keep our eepm package
epm_autoremove
()
{
case
$DISTRNAME
in
ALTLinux
)
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
||
[
"
$1
"
=
"help"
]
;
then
epm_autoremove_print_help
return
0
fi
if
[
-z
"
$direct
"
]
;
then
sudocmd apt-get
$(
subst_option non_interactive
-y
)
autoremove
$dryrun
local
RET
=
$?
info
"Also you can run 'epm autoremove --direct' to use
low level autoremove (epm internal implementation
)"
info
"Also you can run 'epm autoremove --direct' to use
epm implementation of autoremove (see --help
)"
[
"
$RET
"
=
0
]
||
return
else
__epm_autoremove_altrpm
__epm_autoremove_altrpm
"
$@
"
fi
[
-n
"
$dryrun
"
]
&&
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment