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
9a3a7d0b
Commit
9a3a7d0b
authored
Aug 15, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release_upgrade: rewrite to p9 upgrade support
parent
3ca5d6e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
15 deletions
+43
-15
epm-release_upgrade
bin/epm-release_upgrade
+43
-15
No files found.
bin/epm-release_upgrade
View file @
9a3a7d0b
...
...
@@ -82,10 +82,17 @@ __replace_alt_version_in_repo()
__alt_repofix
()
{
local
TO
=
"
$1
"
load_helper epm-repofix
showcmd epm repofix
quiet
=
1
pkg_filenames
=
''
epm_repofix
>
/dev/null
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tpc][6-9]
\]
![updates]!g"
# replace sign name
if
[
-n
"
$TO
"
]
;
then
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
$TO
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
sisyphus
\]
![
$TO
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
$TO
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tpc][6-9]
\]
![
$TO
]!g"
fi
}
__get_conflict_release_pkg
()
...
...
@@ -140,21 +147,20 @@ get_fix_release_pkg()
__update_to_the_distro
()
{
local
TO
=
"
$1
"
__alt_repofix
case
"
$TO
"
in
p7
)
__alt_repofix
docmd epm update
||
fatal
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
$TO
]!g"
__alt_repofix
$TO
docmd epm update
||
fatal
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
p8|p9
)
p8
)
__alt_repofix
docmd epm update
||
fatal
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
$TO
]!g"
__alt_repofix
$TO
docmd epm update
||
fatal
# sure we have systemd if systemd is running
if
is_installed systemd
&&
is_active_systemd systemd
;
then
...
...
@@ -162,12 +168,23 @@ __update_to_the_distro()
fi
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
p9
)
#docmd epm update || fatal
#docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__alt_repofix
$TO
docmd epm update
||
fatal
# sure we have systemd if systemd is running
#if is_installed systemd && is_active_systemd systemd ; then
# docmd epm install systemd || fatal
#fi
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
Sisyphus
)
__alt_repofix
docmd epm update
||
fatal
local
ADDPKG
ADDPKG
=
$(
epm
-q
--short
make-initrd sssd-ad 2>/dev/null
)
docmd epm
install
librpm7 librpm rpm apt
$ADDPKG
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
ConsoleKit2-
||
fatal
"Check an error and run again"
#docmd apt-get upgrade || fatal "Check an error and run epm release-upgrade or just epm upgrade again"
#local ADDPKG
#ADDPKG=$(epm -q --short make-initrd sssd-ad 2>/dev/null)
#docmd epm install librpm7 librpm rpm apt $ADDPKG "$(get_fix_release_pkg --force "$TO")" ConsoleKit2- || fatal "Check an error and run again"
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade or just epm upgrade again"
;;
*
)
...
...
@@ -186,6 +203,7 @@ __update_alt_to_next_distro()
TO
=
"p7"
confirm_info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"Sisyphus/"
"
$TO
/branch/"
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/branch/"
__update_to_the_distro
"
$TO
"
docmd epm update-kernel
...
...
@@ -196,6 +214,17 @@ __update_alt_to_next_distro()
TO
=
"p8"
confirm_info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"Sisyphus/"
"
$TO
/branch/"
__replace_alt_version_in_repo
$FROM
/branch/
$TO
/branch/
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
info
"Done."
;;
"p8"
|
"p8 p9"
|
"t8 p9"
|
"c8 c9"
|
"p9 p9"
)
TO
=
"p9"
confirm_info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"Sisyphus/"
"
$TO
/branch/"
__replace_alt_version_in_repo
$FROM
/branch/
$TO
/branch/
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
...
...
@@ -206,7 +235,7 @@ __update_alt_to_next_distro()
confirm_info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"
$FROM
/"
"
$TO
/branch/"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
$TO
]!g"
#
__replace_text_in_alt_repo "/^ *#/! s!\[alt\]![$TO]!g"
__update_to_the_distro
$TO
docmd epm downgrade
||
fatal
info
"Done."
...
...
@@ -216,7 +245,7 @@ __update_alt_to_next_distro()
confirm_info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"
$FROM
/"
"
$TO
/branch/"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
$TO
]!g"
#
__replace_text_in_alt_repo "/^ *#/! s!\[alt\]![$TO]!g"
__update_to_the_distro
$TO
docmd epm downgrade
||
fatal
info
"Done."
...
...
@@ -227,8 +256,7 @@ __update_alt_to_next_distro()
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
docmd epm upgrade
||
fatal
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/"
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![alt]!g"
__alt_repofix
"sisyphus"
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
info
"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