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
9cb26905
Commit
9cb26905
authored
Nov 03, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-query: add support for query file package
parent
59dc3319
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
7 deletions
+43
-7
epm-query
bin/epm-query
+43
-7
No files found.
bin/epm-query
View file @
9cb26905
...
@@ -34,11 +34,38 @@ _query_via_packages_list()
...
@@ -34,11 +34,38 @@ _query_via_packages_list()
return
$res
return
$res
}
}
epm_query
()
__epm_query_file
()
{
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
local
CMD
[
-z
"
$@
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -qp"
;;
apt-dpkg
)
CMD
=
"dpkg-deb --show"
# TODO: make rpm-like output
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
#return
;;
*
)
fatal
"Do not know command for query file package"
;;
esac
docmd
$CMD
$pkg_files
}
case
$PMTYPE
in
__epm_query_name
()
{
local
CMD
[
-z
"
$@
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -q"
CMD
=
"rpm -q"
;;
;;
...
@@ -50,14 +77,23 @@ case $PMTYPE in
...
@@ -50,14 +77,23 @@ case $PMTYPE in
#return
#return
;;
;;
npackd
)
npackd
)
CMD
=
"npackdcl path --package=
$pkg_file
names
"
CMD
=
"npackdcl path --package=
$pkg_
names
"
;;
;;
*
)
*
)
_query_via_packages_list
$pkg_file
names
_query_via_packages_list
$pkg_
names
return
return
;;
;;
esac
esac
docmd
$CMD
$pkg_names
}
epm_query
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
docmd
$CMD
$pkg_filenames
__epm_query_file
$pkg_files
||
return
__epm_query_name
$pkg_names
||
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