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
a505655f
Commit
a505655f
authored
Oct 14, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial support for epm conflicts
parent
20b74e97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
0 deletions
+102
-0
epm
bin/epm
+3
-0
epm-conflicts
bin/epm-conflicts
+99
-0
No files found.
bin/epm
View file @
a505655f
...
...
@@ -187,6 +187,9 @@ check_command()
whatprovides
)
# HELPCMD: print packages provides that target
epm_cmd
=
whatprovides
;;
conflicts
)
# HELPCMD: print package conflicts
epm_cmd
=
conflicts
;;
-qa
|
list|packages|-l
)
# HELPCMD: list of installed package(s)
epm_cmd
=
packages
;;
...
...
bin/epm-conflicts
0 → 100644
View file @
a505655f
#!/bin/sh
#
# Copyright (C) 2013 Etersoft
# Copyright (C) 2013 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/>.
#
load_helper epm-query
epm_conflicts_files
()
{
[
-n
"
$pkg_files
"
]
||
return
case
$(
get_package_type
$pkg_files
)
in
rpm
)
docmd
"rpm -q --conflicts -p"
;;
#deb)
# a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g"
# ;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
}
epm_conflicts_names
()
{
local
CMD
[
-n
"
$pkg_names
"
]
||
return
# by package name
case
$PMTYPE
in
apt-rpm
)
# FIXME: need fix for a few names case
# FIXME: too low level of requires name (libSOME.so)
if
is_installed
$pkg_names
;
then
CMD
=
"rpm -q --conflicts"
else
EXTRA_SHOWDOCMD
=
' | grep "Conflicts:"'
docmd apt-cache show
$pkg_names
|
grep
"Conflicts:"
return
fi
;;
urpm-rpm|zypper-rpm
)
# FIXME: use hi level commands
CMD
=
"rpm -q --conflicts"
;;
#yum-rpm)
# CMD="yum deplist"
# ;;
#pacman)
# CMD="pactree"
# ;;
apt-dpkg
)
# FIXME: need fix for a few names case
if
is_installed
$pkg_names
;
then
showcmd dpkg
-s
$pkg_names
a
=
dpkg
-s
$pkg_names
|
grep
"^Conflicts:"
|
sed
"s|^Conflicts:||g"
return
else
EXTRA_SHOWDOCMD
=
' | grep "Conflicts:"'
docmd apt-cache show
$pkg_names
|
grep
"Conflicts:"
return
fi
;;
#emerge)
# assure_exists equery
# CMD="equery depgraph"
# ;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
docmd
$CMD
$pkg_names
}
epm_conflicts
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
epm_conflicts_files
epm_conflicts_names
}
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