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
cd1e685c
Commit
cd1e685c
authored
Apr 15, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: fix query-package, query (fix epm_package param using)
parent
88648d72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
epm-packages
bin/epm-packages
+1
-1
epm-query
bin/epm-query
+4
-4
epm-query_package
bin/epm-query_package
+1
-1
No files found.
bin/epm-packages
View file @
cd1e685c
...
...
@@ -72,7 +72,7 @@ case $PMTYPE in
# FIXME: strong equal
CMD
=
"rpm -qa"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
"
docmd
$CMD
"
$@
"
docmd
$CMD
"
$@
"
| __fo_pfn
"
$@
"
return
;;
packagekit
)
docmd pkcon get-packages
--filter
installed
...
...
bin/epm-query
View file @
cd1e685c
...
...
@@ -90,12 +90,12 @@ _shortquery_via_packages_list()
# Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$
# separate first line for print out command
(
short
=
1
pkg_filenames
=
$firstpkg
epm_packages
|
grep
--
"
$grepexp
"
)
&&
res
=
0
||
res
=
1
(
short
=
1
epm_packages
$firstpkg
|
grep
--
"
$grepexp
"
)
&&
res
=
0
||
res
=
1
local
pkg
for
pkg
in
"
$@
"
;
do
grepexp
=
$(
_get_grep_exp
$pkg
)
(
short
=
1
pkg_filenames
=
$pkg
epm_packages
2>/dev/null
)
|
grep
--
"
$grepexp
"
||
res
=
1
(
short
=
1
epm_packages
$pkg
2>/dev/null
)
|
grep
--
"
$grepexp
"
||
res
=
1
done
# TODO: print in query (for user): 'warning: package $pkg is not installed'
...
...
@@ -118,12 +118,12 @@ _query_via_packages_list()
# Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$
# separate first line for print out command
(
short
=
1
pkg_filenames
=
$firstpkg
epm_packages
)
|
grep
-q
--
"
$grepexp
"
&&
(
quiet
=
1
pkg_filenames
=
$firstpkg
epm_packages
)
&&
res
=
0
||
res
=
1
(
short
=
1
epm_packages
$firstpkg
)
|
grep
-q
--
"
$grepexp
"
&&
(
quiet
=
1 epm_packages
$firstpkg
)
&&
res
=
0
||
res
=
1
local
pkg
for
pkg
in
"
$@
"
;
do
grepexp
=
$(
_get_grep_exp
$pkg
)
(
short
=
1
pkg_filenames
=
$pkg
epm_packages 2>/dev/null
)
|
grep
-q
--
"
$grepexp
"
&&
(
quiet
=
1
pkg_filenames
=
$pkg
epm_packages
)
||
res
=
1
(
short
=
1
epm_packages
$pkg
2>/dev/null
)
|
grep
-q
--
"
$grepexp
"
&&
(
quiet
=
1 epm_packages
$pkg
)
||
res
=
1
done
return
$res
...
...
bin/epm-query_package
View file @
cd1e685c
...
...
@@ -33,5 +33,5 @@ epm_query_package()
MGS
=
$(
eval
__epm_search_make_grep
$quoted_args
)
EXTRA_SHOWDOCMD
=
$MGS
# Note: get all packages list and do grep
(
eval
"pkg_filenames='' epm_packages
\"
$(
eval
get_firstarg
$quoted_args
)
\"
$MGS
"
)
eval
"epm_packages
$MGS
"
}
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