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
d58d6139
Commit
d58d6139
authored
Jul 12, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: rewrite packages list operation via join
parent
09421439
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
17 deletions
+30
-17
epm-play
bin/epm-play
+30
-17
No files found.
bin/epm-play
View file @
d58d6139
...
@@ -96,35 +96,48 @@ __list_app_packages_table()
...
@@ -96,35 +96,48 @@ __list_app_packages_table()
done
done
}
}
__list_installed_app
()
__filter_by_installed_packages
()
{
local
i
local
tapt
=
"
$1
"
local
pkglist
pkglist
=
"
$(
mktemp
)
"
||
fatal
remove_on_exit
$pkglist
# get intersect between full package list and available packages table
epm
--short
packages |
LANG
=
C
sort
-u
>
$pkglist
LANG
=
C
join
-11
-21
$tapt
$pkglist
|
uniq
rm
-f
$pkglist
# rpm on Fedora/CentOS no more print missed packages to stderr
# get supported packages list and print lines with it
#for i in $(epm query --short $(cat $tapt | cut -f1 -d" ") 2>/dev/null) ; do
# grep "^$i " $tapt
#done
}
__get_installed_table
()
{
{
local
i
local
i
local
tapt
local
tapt
tapt
=
"
$(
mktemp
)
"
||
fatal
tapt
=
"
$(
mktemp
)
"
||
fatal
remove_on_exit
$tapt
remove_on_exit
$tapt
__list_app_packages_table
>
$tapt
__list_app_packages_table |
LANG
=
C
sort
-u
>
$tapt
# get all installed packages and convert it to a apps list
__filter_by_installed_packages
$tapt
for
i
in
$(
epm query
--short
$(
cat
$tapt
|
sed
-e
's| .*$||'
)
2>/dev/null
)
;
do
grep
"^
$i
"
$tapt
|
sed
-e
's|^.* ||'
done
rm
-f
$tapt
rm
-f
$tapt
return
}
cat
$epm_vardir
/installed-app 2>/dev/null
__list_installed_app
()
{
# get all installed packages and convert it to a apps list
__get_installed_table |
cut
-f2
-d
" "
}
}
__list_installed_packages
()
__list_installed_packages
()
{
{
local
i
local
tapt
tapt
=
"
$(
mktemp
)
"
||
fatal
remove_on_exit
$tapt
__list_app_packages_table
>
$tapt
# get all installed packages
# get all installed packages
for
i
in
$(
epm query
--short
$(
cat
$tapt
|
sed
-e
's| .*$||'
)
2>/dev/null
)
;
do
__get_installed_table |
cut
-f1
-d
" "
grep
"^
$i
"
$tapt
|
cut
-f1
-d
" "
done
rm
-f
$tapt
}
}
...
...
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