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
015b4a6f
Commit
015b4a6f
authored
Jun 19, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce autoorphans command
parent
c9f075e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
7 deletions
+86
-7
epm
bin/epm
+3
-0
epm-autoorphans
bin/epm-autoorphans
+73
-0
epm-autoremove
bin/epm-autoremove
+10
-7
No files found.
bin/epm
View file @
015b4a6f
...
...
@@ -234,6 +234,9 @@ check_command()
autoremove
)
# HELPCMD: auto remove unneeded package(s)
epm_cmd
=
autoremove
;;
autoorphans|--orphans
)
# HELPCMD: remove all packages not from the repository
epm_cmd
=
autoorphans
;;
upgrade|dist-upgrade
)
# HELPCMD: performs upgrades of package software distributions
epm_cmd
=
upgrade
;;
...
...
bin/epm-autoorphans
0 → 100644
View file @
015b4a6f
#!/bin/sh
#
# Copyright (C) 2015 Etersoft
# Copyright (C) 2015 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
# (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
# GNU Affero General Public License for more details.
#
# 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/>.
#
epm_autoorphans
()
{
case
$PMTYPE
in
#apt-rpm)
# ALT Linux only
#__epm_autoremove_altrpm
# ALT Linux only
#assure_exists remove-old-kernels
#sudocmd remove-old-kernels
# ;;
apt-dpkg|aptitude-dpkg
)
assure_exists deborphan
showcmd deborphan
deborphan | sudocmd epm remove
;;
#aura)
# sudocmd aura -Oj
# ;;
yum-rpm
)
showcmd package-cleanup
--orphans
local
PKGLIST
=
$(
package-cleanup
--orphans
)
sudocmd epm remove
$PKGLIST
;;
urpm-rpm
)
sudocmd urpme
--auto-orphans
;;
#emerge)
# sudocmd emerge --depclean
# assure_exists revdep-rebuild
# sudocmd revdep-rebuild
# ;;
pacman
)
sudocmd pacman
-Qdtq
| sudocmd pacman
-Rs
-
;;
#slackpkg)
# clean-system removes non official packages
#sudocmd slackpkg clean-system
# ;;
#guix)
# sudocmd guix gc
# ;;
#pkgng)
# sudocmd pkg autoremove
# ;;
#zypper-rpm)
# sudocmd zypper clean
# ;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
}
bin/epm-autoremove
View file @
015b4a6f
...
...
@@ -39,10 +39,11 @@ epm_autoremove()
{
case
$PMTYPE
in
apt-rpm
)
assure_exists remove-old-kernels
# ALT Linux only
__epm_autoremove_altrpm
# ALT Linux only
assure_exists remove-old-kernels
sudocmd remove-old-kernels
;;
apt-dpkg|aptitude-dpkg
)
...
...
@@ -61,17 +62,19 @@ case $PMTYPE in
sudocmd yum remove
$PKGLIST
done
;;
urpm-rpm
)
sudocmd urpme
--auto-orphans
;;
# see autoorhans
#urpm-rpm)
# sudocmd urpme --auto-orphans
# ;;
emerge
)
sudocmd emerge
--depclean
assure_exists revdep-rebuild
sudocmd revdep-rebuild
;;
pacman
)
sudocmd pacman
-Qdtq
| sudocmd pacman
-Rs
-
;;
# see autoorhans
#pacman)
# sudocmd pacman -Qdtq | sudocmd pacman -Rs -
# ;;
slackpkg
)
# clean-system removes non official packages
#sudocmd slackpkg clean-system
...
...
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