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
91dc79f7
Commit
91dc79f7
authored
Jan 25, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check: add fix duplicates
parent
de087e1a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
epm-check
bin/epm-check
+31
-5
No files found.
bin/epm-check
View file @
91dc79f7
#!/bin/sh
#
# Copyright (C) 2012-201
3
Etersoft
# Copyright (C) 2012-201
3
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-201
9
Etersoft
# Copyright (C) 2012-201
9
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
...
...
@@ -17,19 +17,45 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# remove duplicates
try_fix_apt_rpm_dupls
()
{
echo
"Check for duplicates ..."
local
TESTPKG
=
"ignoreflock"
local
has_testpkg
=
""
if
epm installed
$TESTPKG
;
then
has_iconv
=
1
sudocmd epm remove
$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|'
)
for
i
in
$PKGLIST
;
do
local
pkg
=
${
i
/.32bit/
}
sudocmd rpm
-e
$(
rpm
-q
$pkg
|
head
-n1
)
done
#[ -n "$has_iconv" ] && epm install $TESTPKG
}
epm_check
()
{
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
apt-rpm
)
#sudocmd apt-get check || exit
#sudocmd apt-get update || exit
sudocmd apt-get
-f
install
||
return
try_fix_apt_rpm_dupls
;;
apt-dpkg
)
#sudocmd apt-get check || exit
#sudocmd apt-get update || exit
sudocmd apt-get
-f
install
sudocmd apt-get
-f
install
||
return
;;
apt-dpkg
)
#sudocmd apt-get update || exit
#sudocmd apt-get check || exit
sudocmd apt-get
-f
install
||
return
sudocmd apt-get autoremove
#
sudocmd apt-get autoremove
;;
aptitude-dpkg
)
sudocmd aptitude
-f
install
||
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