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
60fa1d8c
Commit
60fa1d8c
authored
Aug 08, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-install: check if install by command
parent
dc8f7abd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
epm-install
bin/epm-install
+22
-16
epm-repack
bin/epm-repack
+2
-2
No files found.
bin/epm-install
View file @
60fa1d8c
...
...
@@ -290,6 +290,7 @@ __epm_check_if_src_rpm()
done
}
# FIXME: move this hack to epm-repack
__epm_check_if_needed_repack
()
{
local
pkgname
=
"
$(
epm print name from
"
$1
"
)
"
...
...
@@ -298,6 +299,11 @@ __epm_check_if_needed_repack()
warning
"There is repack rule for
$pkgname
package. It is better install this package via 'epm --repack install' or 'epm play'."
}
__epm_if_command_path
()
{
is_dirpath
"
$1
"
&&
rhas
"
$1
"
"bin/"
}
epm_install_files
()
{
local
files
=
"
$@
"
...
...
@@ -309,32 +315,32 @@ epm_install_files()
case
"
$DISTRNAME
"
in
ALTLinux|ALTServer
)
# do not use low-level for install by file path (f.i. epm install /usr/bin/git)
if
__epm_if_command_path
$files
;
then
epm_install_names
$files
return
fi
# on ALT install target can be a real path
if
__epm_repack_if_needed
$files
;
then
[
-n
"
$repacked_pkgs
"
]
||
fatal
"Can't convert
$files
"
files
=
"
$repacked_pkgs
"
# TODO
#__epm_remove_tmp_files
fi
__epm_check_if_src_rpm
$files
# do not use low-level for install by file path (FIXME: reasons?)
if
!
is_dirpath
"
$files
"
||
[
"
$(
get_package_type
"
$files
"
)
"
=
"rpm"
]
;
then
if
[
-z
"
$repacked_pkgs
"
]
;
then
__epm_check_vendor
$files
__epm_check_if_needed_repack
$files
fi
sudocmd rpm
-Uvh
$force
$noscripts
$nodeps
$files
&&
save_installed_packages
$files
&&
return
local
RES
=
$?
# TODO: check rpm result code and convert it to compatible format if possible
__epm_check_if_rpm_already_installed
$files
&&
return
if
[
-z
"
$repacked_pkgs
"
]
;
then
__epm_check_vendor
$files
__epm_check_if_needed_repack
$files
fi
sudocmd rpm
-Uvh
$force
$noscripts
$nodeps
$files
&&
save_installed_packages
$files
&&
return
local
RES
=
$?
# TODO: check rpm result code and convert it to compatible format if possible
__epm_check_if_rpm_already_installed
$files
&&
return
# if run with --nodeps, do not fallback on hi level
[
-n
"
$nodeps
"
]
&&
return
$RES
fi
epm_install_names
$files
return
;;
esac
...
...
bin/epm-repack
View file @
60fa1d8c
...
...
@@ -42,7 +42,7 @@ __epm_split_by_pkg_type()
__epm_repack_to_deb
()
{
local
pkg
local
rpmpkgs
=
"
$1
"
local
pkgs
=
"
$@
"
assure_exists alien
assure_exists fakeroot
...
...
@@ -52,7 +52,7 @@ __epm_repack_to_deb()
local
TDIR
=
$(
mktemp
-d
)
for
pkg
in
$
rpm
pkgs
;
do
for
pkg
in
$pkgs
;
do
abspkg
=
"
$(
realpath
"
$pkg
"
)
"
info
"Repacking
$abspkg
to local deb format ..."
...
...
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