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
21c1f78f
Commit
21c1f78f
authored
Jul 11, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-query: print out in name-version format, fix epm-packages for dpkg to print name-version only
parent
fe1ee305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
epm-packages
bin/epm-packages
+2
-1
epm-query
bin/epm-query
+12
-13
No files found.
bin/epm-packages
View file @
21c1f78f
...
@@ -27,7 +27,8 @@ case $PMTYPE in
...
@@ -27,7 +27,8 @@ case $PMTYPE in
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
$pkg_filenames
"
;;
;;
apt-dpkg
)
apt-dpkg
)
CMD
=
"dpkg -l
$pkg_filenames
"
#CMD="dpkg -l $pkg_filenames"
CMD
=
"dpkg-query -W --showformat=
\$
{Package}-
\$
{Version}
\n
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"dpkg-query -W --showformat=
\$
{Package}
\n
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"dpkg-query -W --showformat=
\$
{Package}
\n
$pkg_filenames
"
;;
;;
yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
...
...
bin/epm-query
View file @
21c1f78f
...
@@ -26,11 +26,14 @@ _query_via_packages_list()
...
@@ -26,11 +26,14 @@ _query_via_packages_list()
local
res
=
0
local
res
=
0
local
firstpkg
=
$1
local
firstpkg
=
$1
shift
shift
# separate first line for print out command
# separate first line for print out command
short
=
1
pkg_filenames
=
$firstpkg
epm_packages |
grep
--
"^
$firstpkg
$"
||
res
=
1
pkg_filenames
=
$firstpkg
epm_packages |
grep
--
"^
$firstpkg
$"
||
res
=
1
for
pkg
in
"
$@
"
;
do
for
pkg
in
"
$@
"
;
do
short
=
1
pkg_filenames
=
$pkg
epm_packages 2>/dev/null |
grep
--
"^
$pkg
$"
||
res
=
1
pkg_filenames
=
$pkg
epm_packages 2>/dev/null |
grep
--
"^
$pkg
$"
||
res
=
1
done
done
return
$res
return
$res
}
}
...
@@ -43,13 +46,11 @@ __epm_query_file()
...
@@ -43,13 +46,11 @@ __epm_query_file()
case
$PMTYPE
in
case
$PMTYPE
in
*
-rpm
)
*
-rpm
)
CMD
=
"rpm -qp"
CMD
=
"rpm -qp"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qp --queryformat %{name}
\n
"
;;
;;
apt-dpkg
)
apt-dpkg
)
CMD
=
"dpkg-deb --show"
CMD
=
"dpkg-deb --show --showformat=
\$
{Package}-
\$
{Version}
\n
"
# TODO: make rpm-like output
[
-n
"
$short
"
]
&&
CMD
=
"dpkg-query --show --showformat=
\$
{Package}
\n
"
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
#return
;;
;;
*
)
*
)
fatal
"Do not know command for query file package"
fatal
"Do not know command for query file package"
...
@@ -68,14 +69,12 @@ __epm_query_name()
...
@@ -68,14 +69,12 @@ __epm_query_name()
case
$PMTYPE
in
case
$PMTYPE
in
*
-rpm
)
*
-rpm
)
CMD
=
"rpm -q"
CMD
=
"rpm -q"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -q --queryformat %{name}
\n
"
;;
;;
apt-dpkg
)
apt-dpkg
)
#docmd dpkg -l $@
#docmd dpkg -l $@ | grep "^ii"
docmd dpkg
-l
$@
|
grep
"^ii"
CMD
=
"dpkg-query -W --showformat=
\$
{Package}-
\$
{Version}
\n
"
# TODO: make rpm-like output
[
-n
"
$short
"
]
&&
CMD
=
"dpkg-query -W --showformat=
\$
{Package}
\n
"
#showcmd dpkg -l $pkg_filenames
#dpkg -l $pkg_filenames | grep "^ii"
return
;;
;;
npackd
)
npackd
)
CMD
=
"npackdcl path --package=
$@
"
CMD
=
"npackdcl path --package=
$@
"
...
...
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