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
103eef1b
Commit
103eef1b
authored
Dec 09, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve --skip-installed on x86_64 Fedora based: check for noarch too
parent
2855d1c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
epm-install
bin/epm-install
+21
-4
epm-query
bin/epm-query
+13
-5
No files found.
bin/epm-install
View file @
103eef1b
...
...
@@ -23,15 +23,32 @@ load_helper epm-assure
load_helper epm-check_updated_repo
load_helper epm-sh-warmup
__fast_hack_for_filter_out_installed_rpm
()
{
LANG
=
C
LC_ALL
=
C xargs
-n1
rpm
-q
2>&1 |
grep
'is not installed'
|
sed
-e
's|^.*package \(.*\) is not installed.*|\1|g'
}
# TODO: use when run install with epm --skip-installed install
filter_out_installed_packages
()
{
[
-z
"
$skip_installed
"
]
&&
cat
&&
return
case
$PKGFORMAT
in
"rpm"
)
LANG
=
C
LC_ALL
=
C xargs
-n1
rpm
-q
2>&1 |
grep
'is not installed'
|
sed
-e
's|^.*package \(.*\) is not installed.*|\1|g'
case
$PMTYPE
in
yum-rpm|dnf-rpm
)
if
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
;
then
# shellcheck disable=SC2013
for
i
in
$(
cat
)
;
do
is_installed
"
$(
__print_with_arch_suffix
$i
.x86_64
)
"
&&
continue
is_installed
"
$(
__print_with_arch_suffix
$i
.noarch
)
"
&&
continue
is_installed
$i
||
echo
$i
done
else
__fast_hack_for_filter_out_installed_rpm
fi
;;
*
-rpm
)
__fast_hack_for_filter_out_installed_rpm
;;
# dpkg -l lists some non ii status (un, etc)
#"deb")
...
...
bin/epm-query
View file @
103eef1b
...
...
@@ -20,6 +20,18 @@
load_helper epm-packages
load_helper epm-print
# pkg suffix
__print_with_arch_suffix
()
{
local
pkg
=
"
$1
"
local
suffix
=
"
$2
"
# do not change if some suffix already exists
echo
"
$pkg
"
|
grep
-q
"(x86-32)$"
&&
echo
"
$pkg
"
|
sed
-e
"s|(x86-32)
$|
.i686|"
&&
return
echo
"
$pkg
"
|
grep
"
\.
x86_64$"
&&
return
echo
"
$pkg
"
|
grep
"
\.
noarch$"
&&
return
echo
"
$pkg
"
|
grep
"
\.
i[56]86$"
&&
return
echo
"
$pkg$suffix
"
}
# add suffix .x86_64 if we have 64 arch
exp_with_arch_suffix
()
...
...
@@ -42,11 +54,7 @@ exp_with_arch_suffix()
# TODO: use estrlist or some function to do it
local
pkg
for
pkg
in
$(
cat
)
;
do
# do not change if some suffix already exists
echo
"
$pkg
"
|
grep
-q
"(x86-32)$"
&&
echo
"
$pkg
"
|
sed
-e
"s|(x86-32)
$|
.i686|"
&&
continue
echo
"
$pkg
"
|
grep
"
\.
x86_64$"
&&
continue
echo
"
$pkg
"
|
grep
"
\.
i[56]86$"
&&
continue
echo
"
$pkg$suffix
"
__print_with_arch_suffix
$pkg
$suffix
done
}
...
...
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