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
a35c00b6
Commit
a35c00b6
authored
Sep 16, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite epm_requires and epm_provides
parent
17477ad5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
33 deletions
+46
-33
epm-provides
bin/epm-provides
+24
-15
epm-requires
bin/epm-requires
+22
-18
No files found.
bin/epm-provides
View file @
a35c00b6
...
@@ -19,27 +19,29 @@
...
@@ -19,27 +19,29 @@
load_helper epm-query
load_helper epm-query
epm_provides
()
epm_provides
_files
()
{
{
local
CMD
[
-n
"
$pkg_files
"
]
||
return
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
# by package file
case
$(
get_package_type
$pkg_files
)
in
case
$PMTYPE
in
rpm
)
*
-rpm
)
docmd
"rpm -q --provides -p"
CMD
=
"rpm -q --provides -p"
;;
;;
# apt-dpkg)
# deb)
# showcmd dpkg -s $pkg_files
# a= docmd dpkg -s $pkg_names | grep "^Depends:" | sed "s|^Depends:||g"
# a= dpkg -s $pkg_names | grep "^Depends:" | sed "s|^Depends:||g"
# return
# return
# ;;
# ;;
*
)
*
)
fatal
"Have no suitable command for
$PMTYPE
"
fatal
"Have no suitable command for
$PMTYPE
"
;;
;;
esac
esac
}
[
-n
"
$pkg_files
"
]
&&
docmd
$CMD
$pkg_files
epm_provides_names
()
{
local
CMD
[
-n
"
$pkg_names
"
]
||
return
# by package name
# by package name
case
$PMTYPE
in
case
$PMTYPE
in
...
@@ -83,6 +85,13 @@ case $PMTYPE in
...
@@ -83,6 +85,13 @@ case $PMTYPE in
;;
;;
esac
esac
[
-n
"
$pkg_names
"
]
&&
docmd
$CMD
$pkg_names
docmd
$CMD
$pkg_names
}
epm_provides
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
epm_provides_files
epm_provides_names
}
}
bin/epm-requires
View file @
a35c00b6
...
@@ -19,36 +19,33 @@
...
@@ -19,36 +19,33 @@
load_helper epm-query
load_helper epm-query
epm_requires_files
()
epm_requires
()
{
{
local
CMD
[
-n
"
$pkg_files
"
]
||
return
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
# TODO: Здесь выбирать команду по расширению, а не по системному менеджеру
case
$(
get_package_type
$pkg_files
)
in
# В других таких случаях тоже
rpm
)
# В списке пакетов на установку проверять, что пакеты имеют соответствующее расширение
docmd
"rpm -q --requires -p"
# by package file
case
$PMTYPE
in
apt-rpm|urpm-rpm|zypper-rpm|yum-rpm
)
CMD
=
"rpm -q --requires -p"
;;
;;
apt-dpkg
)
deb
)
if
[
-n
"
$pkg_files
"
]
;
then
if
[
-n
"
$pkg_files
"
]
;
then
# FIXME: need package base
# FIXME: need package base
showcmd dpkg
-s
$pkg_files
# FIXME: need dpkg base. some other method?
a
=
dpkg
-s
$pkg_files
|
grep
"^Depends:"
|
sed
"s|^Depends:||g"
a
=
d
ocmd d
pkg
-s
$pkg_files
|
grep
"^Depends:"
|
sed
"s|^Depends:||g"
# FIXME: we need execute package name section too
# FIXME: we need execute package name section too
# TODO: separate to two section
# TODO: separate to two section
return
fi
fi
;;
;;
*
)
*
)
fatal
"Have no suitable command for
$PMTYPE
"
fatal
"Have no suitable command for
$PMTYPE
"
;;
;;
esac
esac
}
[
-n
"
$pkg_files
"
]
&&
docmd
$CMD
$pkg_files
epm_requires_names
()
{
local
CMD
[
-n
"
$pkg_names
"
]
||
return
# by package name
# by package name
case
$PMTYPE
in
case
$PMTYPE
in
...
@@ -95,6 +92,13 @@ case $PMTYPE in
...
@@ -95,6 +92,13 @@ case $PMTYPE in
esac
esac
[
-n
"
$pkg_names
"
]
&&
docmd
$CMD
$pkg_names
docmd
$CMD
$pkg_names
}
epm_requires
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
epm_requires_files
epm_requires_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