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
c0efdeec
Commit
c0efdeec
authored
Feb 28, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add BASEDISTRNAME and use it for alt based systems
parent
8c038f47
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
58 additions
and
54 deletions
+58
-54
epm-addrepo
bin/epm-addrepo
+4
-4
epm-autoremove
bin/epm-autoremove
+2
-2
epm-checksystem
bin/epm-checksystem
+2
-2
epm-commentrepo
bin/epm-commentrepo
+2
-2
epm-dedup
bin/epm-dedup
+2
-2
epm-download
bin/epm-download
+2
-2
epm-install
bin/epm-install
+5
-5
epm-kernel_update
bin/epm-kernel_update
+2
-2
epm-mark
bin/epm-mark
+14
-14
epm-release_downgrade
bin/epm-release_downgrade
+2
-2
epm-release_upgrade
bin/epm-release_upgrade
+2
-2
epm-remove
bin/epm-remove
+1
-1
epm-remove_old_kernels
bin/epm-remove_old_kernels
+5
-2
epm-removerepo
bin/epm-removerepo
+2
-2
epm-repofix
bin/epm-repofix
+2
-2
epm-sh-functions
bin/epm-sh-functions
+1
-0
epm-sh-install
bin/epm-sh-install
+1
-1
epm-upgrade
bin/epm-upgrade
+1
-1
serv-cat
bin/serv-cat
+2
-2
serv-exists
bin/serv-exists
+2
-2
serv-log
bin/serv-log
+2
-2
No files found.
bin/epm-addrepo
View file @
c0efdeec
...
@@ -195,8 +195,8 @@ __epm_addkey_deb()
...
@@ -195,8 +195,8 @@ __epm_addkey_deb()
epm_addkey
()
epm_addkey
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__epm_addkey_altlinux
"
$@
"
__epm_addkey_altlinux
"
$@
"
return
return
;;
;;
...
@@ -265,8 +265,8 @@ epm_addrepo()
...
@@ -265,8 +265,8 @@ epm_addrepo()
{
{
local
repo
=
"
$*
"
local
repo
=
"
$*
"
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
# Note! Don't use quotes here
# Note! Don't use quotes here
__epm_addrepo_altlinux
$repo
__epm_addrepo_altlinux
$repo
return
return
...
...
bin/epm-autoremove
View file @
c0efdeec
...
@@ -232,8 +232,8 @@ EOF
...
@@ -232,8 +232,8 @@ EOF
epm_autoremove
()
epm_autoremove
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
||
[
"
$1
"
=
"help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
||
[
"
$1
"
=
"help"
]
;
then
epm_autoremove_print_help
epm_autoremove_print_help
return
0
return
0
...
...
bin/epm-checksystem
View file @
c0efdeec
...
@@ -53,8 +53,8 @@ case $PMTYPE in
...
@@ -53,8 +53,8 @@ case $PMTYPE in
;;
;;
esac
esac
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
epm_checksystem_
$DISTRNAME
epm_checksystem_
$DISTRNAME
;;
;;
*
)
*
)
...
...
bin/epm-commentrepo
View file @
c0efdeec
...
@@ -90,8 +90,8 @@ __epm_commentrepo_alt()
...
@@ -90,8 +90,8 @@ __epm_commentrepo_alt()
epm_commentrepo
()
epm_commentrepo
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__epm_commentrepo_alt
"
$@
"
__epm_commentrepo_alt
"
$@
"
return
return
;;
;;
...
...
bin/epm-dedup
View file @
c0efdeec
...
@@ -49,8 +49,8 @@ try_fix_apt_rpm_dupls()
...
@@ -49,8 +49,8 @@ try_fix_apt_rpm_dupls()
epm_dedup
()
epm_dedup
()
{
{
case
"
$DISTRNAME
"
in
case
"
$
BASE
DISTRNAME
"
in
ALTLinux|ALTServer
)
"alt"
)
assure_exists /usr/share/apt/scripts/dedup.lua apt-scripts
assure_exists /usr/share/apt/scripts/dedup.lua apt-scripts
if
[
-z
"
$direct
"
]
&&
[
-f
/usr/share/apt/scripts/dedup.lua
]
;
then
if
[
-z
"
$direct
"
]
&&
[
-f
/usr/share/apt/scripts/dedup.lua
]
;
then
info
"Check for duplicates via apt-get dedup from apt-scripts (also you can use internal EPM dedup implementation with --direct option)"
info
"Check for duplicates via apt-get dedup from apt-scripts (also you can use internal EPM dedup implementation with --direct option)"
...
...
bin/epm-download
View file @
c0efdeec
...
@@ -190,8 +190,8 @@ epm_download()
...
@@ -190,8 +190,8 @@ epm_download()
{
{
local
CMD
local
CMD
case
$DISTRNAME
-
$PMTYPE
in
case
"
$BASEDISTRNAME
"
in
ALTLinux-apt-rpm|ALTServer-apt-rpm
)
"alt"
)
__epm_download_alt
$*
__epm_download_alt
$*
return
return
;;
;;
...
...
bin/epm-install
View file @
c0efdeec
...
@@ -273,8 +273,8 @@ __epm_check_if_rpm_already_installed()
...
@@ -273,8 +273,8 @@ __epm_check_if_rpm_already_installed()
__handle_direct_install
()
__handle_direct_install
()
{
{
case
"
$DISTRNAME
"
in
case
"
$
BASE
DISTRNAME
"
in
ALTLinux|ALTServer
)
"alt"
)
load_helper epm-download
load_helper epm-download
local
pkg url
local
pkg url
for
pkg
in
$pkg_names
;
do
for
pkg
in
$pkg_names
;
do
...
@@ -311,8 +311,8 @@ epm_install_files()
...
@@ -311,8 +311,8 @@ epm_install_files()
# TODO: check read permissions
# TODO: check read permissions
# sudo test -r FILE
# sudo test -r FILE
# do not fallback to install_names if we have no permissions
# do not fallback to install_names if we have no permissions
case
"
$DISTRNAME
"
in
case
"
$
BASE
DISTRNAME
"
in
ALTLinux|ALTServer
)
"alt"
)
# do not use low-level for install by file path (f.i. epm install /usr/bin/git)
# do not use low-level for install by file path (f.i. epm install /usr/bin/git)
if
__epm_if_command_path
$files
;
then
if
__epm_if_command_path
$files
;
then
...
@@ -611,7 +611,7 @@ epm_print_install_names_command()
...
@@ -611,7 +611,7 @@ epm_print_install_names_command()
epm_install
()
epm_install
()
{
{
if
[
"
$
DISTRNAME
"
=
"ALTLinux"
]
||
[
"
$DISTRNAME
"
=
"ALTServer
"
]
;
then
if
[
"
$
BASEDISTRNAME
"
=
"alt
"
]
;
then
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
assure_exists apt-repo
assure_exists apt-repo
# TODO: add --auto support
# TODO: add --auto support
...
...
bin/epm-kernel_update
View file @
c0efdeec
...
@@ -26,8 +26,8 @@ epm_kernel_update()
...
@@ -26,8 +26,8 @@ epm_kernel_update()
info
"Updating system kernel to the latest version..."
info
"Updating system kernel to the latest version..."
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
load_helper epm-query_package
load_helper epm-query_package
if
!
__epm_query_package kernel-image
>
/dev/null
;
then
if
!
__epm_query_package kernel-image
>
/dev/null
;
then
info
"No installed kernel packages, skipping update"
info
"No installed kernel packages, skipping update"
...
...
bin/epm-mark
View file @
c0efdeec
...
@@ -81,8 +81,8 @@ __dnf_assure_versionlock()
...
@@ -81,8 +81,8 @@ __dnf_assure_versionlock()
epm_mark_hold
()
epm_mark_hold
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__alt_mark_hold
"
$@
"
__alt_mark_hold
"
$@
"
exit
exit
;;
;;
...
@@ -116,8 +116,8 @@ esac
...
@@ -116,8 +116,8 @@ esac
epm_mark_unhold
()
epm_mark_unhold
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__alt_mark_unhold
"
$@
"
__alt_mark_unhold
"
$@
"
exit
exit
;;
;;
...
@@ -151,8 +151,8 @@ esac
...
@@ -151,8 +151,8 @@ esac
epm_mark_showhold
()
epm_mark_showhold
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__alt_mark_showhold
"
$@
"
__alt_mark_showhold
"
$@
"
exit
exit
;;
;;
...
@@ -186,8 +186,8 @@ esac
...
@@ -186,8 +186,8 @@ esac
epm_mark_auto
()
epm_mark_auto
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
sudocmd apt-mark auto
"
$@
"
sudocmd apt-mark auto
"
$@
"
exit
exit
;;
;;
...
@@ -217,8 +217,8 @@ esac
...
@@ -217,8 +217,8 @@ esac
epm_mark_manual
()
epm_mark_manual
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
sudocmd apt-mark manual
"
$@
"
sudocmd apt-mark manual
"
$@
"
exit
exit
;;
;;
...
@@ -248,8 +248,8 @@ esac
...
@@ -248,8 +248,8 @@ esac
epm_mark_showauto
()
epm_mark_showauto
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
sudocmd apt-mark showauto
"
$@
"
sudocmd apt-mark showauto
"
$@
"
exit
exit
;;
;;
...
@@ -272,8 +272,8 @@ esac
...
@@ -272,8 +272,8 @@ esac
epm_mark_showmanual
()
epm_mark_showmanual
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
sudocmd apt-mark showmanual
"
$@
"
sudocmd apt-mark showmanual
"
$@
"
exit
exit
;;
;;
...
...
bin/epm-release_downgrade
View file @
c0efdeec
...
@@ -60,8 +60,8 @@ epm_release_downgrade()
...
@@ -60,8 +60,8 @@ epm_release_downgrade()
# TODO: it is possible eatmydata does not do his work
# TODO: it is possible eatmydata does not do his work
export
EPMNOEATMYDATA
=
1
export
EPMNOEATMYDATA
=
1
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__epm_ru_update
||
fatal
__epm_ru_update
||
fatal
# try to detect current release by repo
# try to detect current release by repo
...
...
bin/epm-release_upgrade
View file @
c0efdeec
...
@@ -447,8 +447,8 @@ epm_release_upgrade()
...
@@ -447,8 +447,8 @@ epm_release_upgrade()
# TODO: it is possible eatmydata does not do his work
# TODO: it is possible eatmydata does not do his work
export
EPMNOEATMYDATA
=
1
export
EPMNOEATMYDATA
=
1
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__epm_ru_update
||
fatal
__epm_ru_update
||
fatal
# TODO: remove this hack (or move it to distro_info)
# TODO: remove this hack (or move it to distro_info)
...
...
bin/epm-remove
View file @
c0efdeec
...
@@ -294,7 +294,7 @@ epm_remove()
...
@@ -294,7 +294,7 @@ epm_remove()
return
return
fi
fi
if
[
"
$
DISTRNAME
"
=
"ALTLinux"
]
||
[
"
$DISTRNAME
"
=
"ALTServer
"
]
;
then
if
[
"
$
BASEDISTRNAME
"
=
"alt
"
]
;
then
load_helper epm-sh-altlinux
load_helper epm-sh-altlinux
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
assure_exists apt-repo
assure_exists apt-repo
...
...
bin/epm-remove_old_kernels
View file @
c0efdeec
...
@@ -24,8 +24,8 @@ epm_remove_old_kernels()
...
@@ -24,8 +24,8 @@ epm_remove_old_kernels()
warmup_bases
warmup_bases
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
load_helper epm-query_package
load_helper epm-query_package
if
!
__epm_query_package kernel-image
>
/dev/null
;
then
if
!
__epm_query_package kernel-image
>
/dev/null
;
then
info
"No installed kernel packages, skipping cleaning"
info
"No installed kernel packages, skipping cleaning"
...
@@ -44,6 +44,9 @@ epm_remove_old_kernels()
...
@@ -44,6 +44,9 @@ epm_remove_old_kernels()
fi
fi
return
;;
return
;;
esac
case
$DISTRNAME
in
Ubuntu
)
Ubuntu
)
load_helper epm-query_package
load_helper epm-query_package
if
!
__epm_query_package linux-image
>
/dev/null
;
then
if
!
__epm_query_package linux-image
>
/dev/null
;
then
...
...
bin/epm-removerepo
View file @
c0efdeec
...
@@ -93,8 +93,8 @@ __epm_removerepo_alt()
...
@@ -93,8 +93,8 @@ __epm_removerepo_alt()
epm_removerepo
()
epm_removerepo
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
__epm_removerepo_alt
"
$@
"
__epm_removerepo_alt
"
$@
"
return
return
;;
;;
...
...
bin/epm-repofix
View file @
c0efdeec
...
@@ -234,8 +234,8 @@ __fix_repo_to_basealt()
...
@@ -234,8 +234,8 @@ __fix_repo_to_basealt()
epm_repofix
()
epm_repofix
()
{
{
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
assure_exists apt-repo
assure_exists apt-repo
[
-n
"
$quiet
"
]
||
docmd apt-repo list
[
-n
"
$quiet
"
]
||
docmd apt-repo list
assure_root
assure_root
...
...
bin/epm-sh-functions
View file @
c0efdeec
...
@@ -619,6 +619,7 @@ set_distro_info()
...
@@ -619,6 +619,7 @@ set_distro_info()
DISTRARCH
=
$(
$DISTRVENDOR
--distro-arch
)
DISTRARCH
=
$(
$DISTRVENDOR
--distro-arch
)
fi
fi
DISTRCONTROL
=
"
$(
$DISTRVENDOR
-y
)
"
DISTRCONTROL
=
"
$(
$DISTRVENDOR
-y
)
"
[
-n
"
$BASEDISTRNAME
"
]
||
BASEDISTRNAME
=
$(
$DISTRVENDOR
-s
)
# TODO: improve BIGTMPDIR conception
# TODO: improve BIGTMPDIR conception
# https://bugzilla.mozilla.org/show_bug.cgi?id=69938
# https://bugzilla.mozilla.org/show_bug.cgi?id=69938
...
...
bin/epm-sh-install
View file @
c0efdeec
...
@@ -112,7 +112,7 @@ __epm_check_vendor()
...
@@ -112,7 +112,7 @@ __epm_check_vendor()
[
-n
"
$scripts$noscripts
"
]
&&
return
[
-n
"
$scripts$noscripts
"
]
&&
return
# only ALT
# only ALT
[
"
$
DISTRNAME
"
=
"ALTLinux"
]
||
[
"
$DISTRNAME
"
=
"ALTServer
"
]
||
return
[
"
$
BASEDISTRNAME
"
=
"alt
"
]
||
return
local
i
local
i
for
i
in
$*
;
do
for
i
in
$*
;
do
...
...
bin/epm-upgrade
View file @
c0efdeec
...
@@ -29,7 +29,7 @@ epm_upgrade()
...
@@ -29,7 +29,7 @@ epm_upgrade()
warmup_bases
warmup_bases
if
[
"
$
DISTRNAME
"
=
"ALTLinux"
]
||
[
"
$DISTRNAME
"
=
"ALTServer
"
]
;
then
if
[
"
$
BASEDISTRNAME
"
=
"alt
"
]
;
then
load_helper epm-sh-altlinux
load_helper epm-sh-altlinux
if
tasknumber
"
$@
"
>
/dev/null
;
then
if
tasknumber
"
$@
"
>
/dev/null
;
then
load_helper epm-addrepo
load_helper epm-addrepo
...
...
bin/serv-cat
View file @
c0efdeec
...
@@ -27,8 +27,8 @@ serv_cat()
...
@@ -27,8 +27,8 @@ serv_cat()
docmd systemctl
cat
"
$SERVICE
"
"
$@
"
docmd systemctl
cat
"
$SERVICE
"
"
$@
"
;;
;;
*
)
*
)
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
local
INITFILE
=
/etc/init.d/
$SERVICE
local
INITFILE
=
/etc/init.d/
$SERVICE
[
-r
"
$INITFILE
"
]
||
fatal
"Can't find init file
$INITFILE
"
[
-r
"
$INITFILE
"
]
||
fatal
"Can't find init file
$INITFILE
"
docmd
cat
$INITFILE
docmd
cat
$INITFILE
...
...
bin/serv-exists
View file @
c0efdeec
...
@@ -28,8 +28,8 @@ serv_exists()
...
@@ -28,8 +28,8 @@ serv_exists()
docmd systemctl
cat
"
$SERVICE
"
"
$@
"
>
/dev/null 2>/dev/null
docmd systemctl
cat
"
$SERVICE
"
"
$@
"
>
/dev/null 2>/dev/null
;;
;;
*
)
*
)
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
local
INITFILE
=
/etc/init.d/
$SERVICE
local
INITFILE
=
/etc/init.d/
$SERVICE
[
-r
"
$INITFILE
"
]
||
return
[
-r
"
$INITFILE
"
]
||
return
return
;;
return
;;
...
...
bin/serv-log
View file @
c0efdeec
...
@@ -52,8 +52,8 @@ serv_log()
...
@@ -52,8 +52,8 @@ serv_log()
sudocmd journalctl
-b
-u
"
$SERVICE
"
"
$@
"
sudocmd journalctl
-b
-u
"
$SERVICE
"
"
$@
"
;;
;;
*
)
*
)
case
$DISTRNAME
in
case
$
BASE
DISTRNAME
in
ALTLinux|ALTServer
)
"alt"
)
FF
=
""
;
[
"
$1
"
=
"-f"
]
&&
FF
=
"-f"
FF
=
""
;
[
"
$1
"
=
"-f"
]
&&
FF
=
"-f"
__serv_log_altlinux
"
$SERVICE
"
$FF
__serv_log_altlinux
"
$SERVICE
"
$FF
return
;;
return
;;
...
...
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