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
b3b03826
Commit
b3b03826
authored
Apr 06, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce try_assure_exists() and use it
parent
301a18ca
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
18 deletions
+24
-18
epm-filelist
bin/epm-filelist
+3
-3
epm-optimize
bin/epm-optimize
+2
-2
epm-repack-rpm
bin/epm-repack-rpm
+4
-4
epm-restore
bin/epm-restore
+2
-2
epm-sh-altlinux-contents-index
bin/epm-sh-altlinux-contents-index
+1
-1
epm-sh-functions
bin/epm-sh-functions
+11
-5
epm-update
bin/epm-update
+1
-1
No files found.
bin/epm-filelist
View file @
b3b03826
...
...
@@ -66,7 +66,7 @@ __epm_filelist_remote()
case
$PMTYPE
in
apt-dpkg
)
assure_exists apt-file
||
return
try_
assure_exists apt-file
||
return
if
sudo_allowed
;
then
sudocmd apt-file update
else
...
...
@@ -78,11 +78,11 @@ __epm_filelist_remote()
docmd pkcon get-files
"
$@
"
;;
yum-rpm
)
assure_exists yum-utils
||
return
assure_exists yum-utils
docmd repoquery
-q
-l
"
$@
"
;;
dnf-rpm
)
assure_exists dnf-plugins-core
||
return
assure_exists dnf-plugins-core
docmd dnf repoquery
-l
"
$@
"
;;
*
)
...
...
bin/epm-optimize
View file @
b3b03826
...
...
@@ -20,8 +20,8 @@
# TODO: is it different from rpm --rebuilddb?
__repack_rpm_base
()
{
assure_exists db_dump
||
fatal
assure_exists db_load
||
fatal
assure_exists db_dump
assure_exists db_load
cd
/var/lib/rpm
||
fatal
mv
Packages Packages.BACKUP
||
fatal
# mask dependencies with a=
...
...
bin/epm-repack-rpm
View file @
b3b03826
...
...
@@ -130,7 +130,7 @@ __epm_repack_to_rpm()
local
pkg
=
"
$1
"
# Note: install epm-repack for static (package based) dependencies
assure_exists alien
||
fatal
assure_exists alien
assure_exists fakeroot
# will set RPMBUILD
...
...
@@ -141,10 +141,10 @@ __epm_repack_to_rpm()
# TODO: check for all systems
case
$PKGFORMAT
in
rpm
)
assure_exists
$RPMBUILD
rpm-build
||
fatal
assure_exists
$RPMBUILD
rpm-build
;;
deb
)
assure_exists
$RPMBUILD
rpm
||
fatal
assure_exists
$RPMBUILD
rpm
;;
esac
fi
...
...
@@ -153,7 +153,7 @@ __epm_repack_to_rpm()
# TODO: improve
if
echo
"
$pkg
"
|
grep
-q
"
\.
deb"
;
then
assure_exists dpkg
||
fatal
assure_exists dpkg
# TODO: Для установки требует: /usr/share/debconf/confmodule но пакет не может быть установлен
# assure_exists debconf
fi
...
...
bin/epm-restore
View file @
b3b03826
...
...
@@ -480,7 +480,7 @@ __epm_restore_npm()
{
local
req_file
=
"
$1
"
assure_exists jq
||
fatal
assure_exists jq
if
[
-n
"
$dryrun
"
]
;
then
local
lt
...
...
@@ -544,7 +544,7 @@ __epm_restore_perl_shyaml()
{
local
req_file
=
"
$1
"
assure_exists shyaml
||
fatal
assure_exists shyaml
if
[
-n
"
$dryrun
"
]
;
then
local
lt
...
...
bin/epm-sh-altlinux-contents-index
View file @
b3b03826
...
...
@@ -54,7 +54,7 @@ rsync_alt_contents_index()
local
URL
=
"
$1
"
local
TD
=
"
$2
"
local
res
assure_exists rsync
||
return
try_
assure_exists rsync
||
return
if
!
__rsync_check
"
$URL
"
;
then
warning
"
$URL
is not accessible via rsync, skipping contents index update..."
...
...
bin/epm-sh-functions
View file @
b3b03826
...
...
@@ -654,8 +654,8 @@ regexp_subst()
sed
-i
-r
-e
"
$expression
"
"
$@
"
}
# TODO: w
e
we can't use epm directly?
assure_exists
()
# TODO: w
hy
we can't use epm directly?
try_
assure_exists
()
{
load_helper epm-assure
local
package
=
"
$2
"
...
...
@@ -665,9 +665,15 @@ assure_exists()
local
ask
=
''
[
-n
"
$non_interactive
"
]
||
ask
=
1
(
verbose
=
''
direct
=
''
interactive
=
$ask
epm_assure
"
$1
"
$package
$3
)
||
fatal
(
verbose
=
''
direct
=
''
interactive
=
$ask
epm_assure
"
$1
"
$package
$3
)
}
assure_exists
()
{
try_assure_exists
"
$@
"
||
fatal
}
assure_exists_erc
()
{
load_helper epm-assure
...
...
@@ -762,8 +768,8 @@ onefile_eget()
{
# check for both
# we really need that cross here,
is_command curl
||
assure_exists wget
is_command wget
||
assure_exists curl
is_command curl
||
try_
assure_exists wget
is_command wget
||
try_
assure_exists curl
internal_tools_eget
"
$@
"
}
...
...
bin/epm-update
View file @
b3b03826
...
...
@@ -72,7 +72,7 @@ esac
case
$PMTYPE
in
apt-dpkg
)
is_command apt-file
||
return
0
assure_exists apt-file
||
return
0
try_
assure_exists apt-file
||
return
0
sudocmd apt-file update
;;
esac
...
...
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