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
etersoft
eepm
Commits
02783c13
Commit
02783c13
authored
Dec 07, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autoremove: do separate removing cycles for python/perl and libs
parent
0f4ebea5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
14 deletions
+45
-14
epm-autoremove
bin/epm-autoremove
+45
-14
No files found.
bin/epm-autoremove
View file @
02783c13
...
...
@@ -17,11 +17,36 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__epm_autoremove_altrpm
()
__epm_autoremove_altrpm
_pp
()
{
local
pkg
load_helper epm-packages
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
local
pkgs
info
"Removing unused python/perl modules..."
#[ -n "$force" ] || info "You can run with --force for more deep removing"
local
force
=
force
local
flag
=
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
libexclude
=
'^(python-module-|python3-module-|python-modules-|python3-modules|perl-)'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
showcmd
"apt-cache list-nodeps | grep -E --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
-E
--
"
$libexclude
"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
if
[
-n
"
$flag
"
]
;
then
info
""
info
"call again for next cycle until all modules will be removed"
__epm_autoremove_altrpm_pp
fi
return
0
}
__epm_autoremove_altrpm_lib
()
{
local
pkgs
info
info
"Removing all non -devel/-debuginfo libs packages not need by anything..."
#[ -n "$force" ] || info "You can run with --force for more deep removing"
...
...
@@ -34,28 +59,34 @@ __epm_autoremove_altrpm()
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd
"apt-cache list-nodeps | grep --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
--
"
$libexclude
"
\
|
grep
-E
-v
--
"-(devel|debuginfo)$"
\
|
grep
-E
-v
--
"-(devel|de
vel-static|de
buginfo)$"
\
|
grep
-E
-v
--
"-(util|utils|tool|tools|plugin|daemon|help)$"
\
|
sed
-e
"s/
\.
32bit
$/
/g"
\
|
grep
-E
-v
--
"^(libsystemd|libreoffice|libnss|libvirt-client|libvirt-daemon|eepm)"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
info
"Removing unused python/perl modules..."
libexclude
=
'^(python-module-|python3-module-|python-modules-|python3-modules|perl-)'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
showcmd
"apt-cache list-nodeps | grep -E --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
-E
--
"
$libexclude
"
)
|
grep
-E
-v
--
"^(libsystemd|libreoffice|libnss|libvirt-client|libvirt-daemon|libsasl2-plugin|eepm)"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
if
[
-n
"
$flag
"
]
;
then
info
""
info
"call again for next cycle until all libs will be removed"
__epm_autoremove_altrpm
__epm_autoremove_altrpm
_lib
fi
return
0
}
__epm_autoremove_altrpm
()
{
local
pkg
load_helper epm-packages
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
__epm_autoremove_altrpm_pp
__epm_autoremove_altrpm_lib
return
0
}
# TODO: keep our eepm package
epm_autoremove
()
{
...
...
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