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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
23 deletions
+59
-23
epm-query
bin/epm-query
+59
-23
No files found.
bin/epm-query
View file @
9cb26905
...
@@ -34,30 +34,66 @@ _query_via_packages_list()
...
@@ -34,30 +34,66 @@ _query_via_packages_list()
return
$res
return
$res
}
}
__epm_query_file
()
{
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
}
__epm_query_name
()
{
local
CMD
[
-z
"
$@
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -q"
;;
apt-dpkg
)
CMD
=
"dpkg -l"
# TODO: make rpm-like output
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
#return
;;
npackd
)
CMD
=
"npackdcl path --package=
$pkg_names
"
;;
*
)
_query_via_packages_list
$pkg_names
return
;;
esac
docmd
$CMD
$pkg_names
}
epm_query
()
epm_query
()
{
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run query without names"
case
$PMTYPE
in
__epm_query_file
$pkg_files
||
return
apt-rpm|yum-rpm|urpm-rpm|zypper-rpm
)
CMD
=
"rpm -q"
;;
apt-dpkg
)
CMD
=
"dpkg -l"
# TODO: make rpm-like output
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
#return
;;
npackd
)
CMD
=
"npackdcl path --package=
$pkg_filenames
"
;;
*
)
_query_via_packages_list
$pkg_filenames
return
;;
esac
docmd
$CMD
$pkg_filenames
__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