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
b136ac31
Commit
b136ac31
authored
May 20, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-autoremove: realize with apt-cache list-nodeps from apt-scripts
parent
6bdc64e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
epm-autoremove
bin/epm-autoremove
+26
-9
No files found.
bin/epm-autoremove
View file @
b136ac31
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012
, 2016
Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012
, 2016
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# 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
# it under the terms of the GNU Affero General Public License as published by
...
@@ -20,16 +20,33 @@
...
@@ -20,16 +20,33 @@
__epm_autoremove_altrpm
()
__epm_autoremove_altrpm
()
{
{
local
pkg
local
pkg
local
flag
=
load_helper epm-packages
load_helper epm-packages
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
info
info
info
"Just removing all non -devel libs packages not need by anything"
info
"Just removing all non -devel libs packages not need by anything..."
for
pkg
in
$(
short
=
1
pkg_filenames
=
epm_packages |
grep
--
"^lib"
|
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
;
do
sudocmd rpm
-v
-e
$pkg
&&
flag
=
1
local
flag
=
done
local
libexclude
=
'^lib'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
# call again for next cycle until all libs will removed
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
[
-n
"
$flag
"
]
&&
__epm_autoremove_altrpm
showcmd
"apt-cache list-nodeps | grep --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
--
"
$libexclude
"
|
\
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
\
grep
-v
--
"-util"
|
grep
-v
--
"-tool"
|
grep
-v
--
"-plugin"
|
\
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
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
"call again for next cycle until all libs will removed"
__epm_autoremove_altrpm
fi
return
0
return
0
}
}
...
...
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