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
76382d2d
Commit
76382d2d
authored
Sep 10, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-upgrade: add support for upgrade installed packages (and package files)
parent
726863b7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
5 deletions
+23
-5
epm
bin/epm
+0
-1
epm-downgrade
bin/epm-downgrade
+1
-0
epm-release_downgrade
bin/epm-release_downgrade
+1
-1
epm-release_upgrade
bin/epm-release_upgrade
+4
-2
epm-upgrade
bin/epm-upgrade
+16
-1
test_all.sh
tests/test_all.sh
+1
-0
No files found.
bin/epm
View file @
76382d2d
...
...
@@ -324,7 +324,6 @@ check_command()
;;
upgrade|dist-upgrade
)
# HELPCMD: performs upgrades of package software distributions
epm_cmd
=
upgrade
direct_args
=
1
;;
Upgrade
)
# HELPCMD: force update package base, then run upgrade
epm_cmd
=
Upgrade
...
...
bin/epm-downgrade
View file @
76382d2d
...
...
@@ -89,6 +89,7 @@ epm_downgrade()
__epm_add_alt_apt_downgrade_preferences
||
return
load_helper epm-upgrade
epm_upgrade
"
$@
"
__epm_remove_apt_downgrade_preferences
fi
;;
apt-dpkg
)
...
...
bin/epm-release_downgrade
View file @
76382d2d
...
...
@@ -84,7 +84,7 @@ epm_release_downgrade()
__alt_repofix
__switch_alt_to_distro
$DISTRVERSION
$TARGET
&&
info
"Done. The system has been successfully downgraded to the previous release '
$T
O
'."
__switch_alt_to_distro
$DISTRVERSION
$TARGET
&&
info
"Done. The system has been successfully downgraded to the previous release '
$T
ARGET
'."
return
0
;;
...
...
bin/epm-release_upgrade
View file @
76382d2d
...
...
@@ -195,7 +195,7 @@ get_fix_release_pkg()
# update if installed (just print package name here to include in the install list)
epm
--quiet
--short
installed alt-gpgkeys 2>/dev/null
if
epm
--quiet
--short
-q
etersoft-gpgkeys 2>/dev/null
>
/dev/null
;
then
# leave etersoft-gpgkeys only we have LINUX@Etersoft repo
# leave etersoft-gpgkeys only
if
we have LINUX@Etersoft repo
epm rl |
grep
-q
"LINUX@Etersoft"
&&
echo
etersoft-gpgkeys
||
echo
alt-gpgkeys
fi
...
...
@@ -232,6 +232,8 @@ __check_system()
fi
if
[
"
$TO
"
!=
"Sisyphus"
]
;
then
# we could miss DISTRVENDOR script during downgrade, reread
set_distro_info
if
[
"
$(
$DISTRVENDOR
-v
)
"
!=
"
$TO
"
]
||
epm installed altlinux-release-sisyphus
>
/dev/null
;
then
warning
"Target distro is
$TO
, but altlinux-release-sisyphus package is installed."
warning
"Trying to replace it with altlinux-release-
$TO
"
...
...
@@ -490,7 +492,7 @@ epm_release_upgrade()
info
"Starting upgrade/switch whole system to other release"
info
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
cd
/
tmp
||
fatal
cd
/
||
fatal
# TODO: it is possible eatmydata does not do his work
export
EPMNOEATMYDATA
=
1
...
...
bin/epm-upgrade
View file @
76382d2d
...
...
@@ -57,9 +57,24 @@ epm_upgrade()
info
"Running command for upgrade packages"
case
$PMTYPE
in
*
-rpm
)
# upgrade only install files from the list
if
[
-n
"
$pkg_files
"
]
;
then
load_helper epm-install
#sudocmd rpm -Fvh $pkg_files
(
pkg_files
=
$pkg_files
force
=
"
$force
-F"
epm_install
)
return
elif
[
-n
"
$pkg_names
"
]
;
then
load_helper epm-install
(
pkg_names
=
$(
get_only_installed_packages
$pkg_names
)
epm_install
)
return
fi
;;
esac
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
local
APTOPTIONS
=
"
$(
subst_option non_interactive
-y
)
$(
subst_option verbose
"-o Debug::pkgMarkInstall=1 -o Debug::pkgProblemResolver=1"
)
"
# Функцию добавления параметра при условии
CMD
=
"apt-get
$APTOPTIONS
$noremove
$force_yes
dist-upgrade"
;;
aptitude-dpkg
)
...
...
tests/test_all.sh
View file @
76382d2d
...
...
@@ -37,6 +37,7 @@ epm --auto --force --force-yes downgrade-release p10
# p10 -> p9
epm
--auto
--force
--force-yes
downgrade-release
restore_epm
# p9 -> p10
epm
--auto
--force
--force-yes
upgrade-release
...
...
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