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
475badb7
Commit
475badb7
authored
Feb 05, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm check: improve remove dupls: remove identical packages, add common removing
parent
c7bca4e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
epm-check
bin/epm-check
+14
-6
No files found.
bin/epm-check
View file @
475badb7
...
...
@@ -20,21 +20,29 @@
# remove duplicates
try_fix_apt_rpm_dupls
()
{
ech
o
"Check for duplicates ..."
inf
o
"Check for duplicates ..."
local
TESTPKG
=
"ignoreflock"
local
has_testpkg
=
""
if
epm installed
$TESTPKG
;
then
has_
iconv
=
1
sudocmd epm remove
$TESTPKG
||
return
if
epm
--quiet
installed
$TESTPKG
;
then
has_
testpkg
=
1
sudocmd epm remove
--auto
$TESTPKG
||
return
fi
local
PKGLIST
PKGLIST
=
$(
LANG
=
C
$SUDO
apt-get
install
$TESTPKG
2>&1 |
grep
"W: There are multiple versions of"
|
\
sed
-e
's|W: There are multiple versions of "\(.*\)" in your system.|\1|'
)
local
TODEL
for
i
in
$PKGLIST
;
do
local
pkg
=
${
i
/.32bit/
}
sudocmd rpm
-e
$(
rpm
-q
$pkg
|
head
-n1
)
local
todel
=
"
$(
rpm
-q
$pkg
|
head
-n1
)
"
local
todel2
=
"
$(
rpm
-q
$pkg
|
head
-n2
|
tail
-n1
)
"
if
[
"
$todel
"
=
"
$todel2
"
]
;
then
echo
"Fix the same name duplicates for
$pkg
..."
sudocmd rpm
-e
"
$todel
"
--allmatches
--nodeps
&&
epm
install
$pkg
&&
continue
fi
sudocmd rpm
-e
"
$todel
"
||
TODEL
=
"
$TODEL
$todel
"
done
#[ -n "$has_iconv" ] && epm install $TESTPKG
[
-n
"
$TODEL
"
]
&&
sudocmd rpm
-e
"
$TODEL
"
[
-n
"
$has_testpkg
"
]
&&
epm
install
$TESTPKG
}
epm_check
()
...
...
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