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
Vladislav
eepm
Commits
579018e3
Commit
579018e3
authored
Nov 12, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: rewrite release_upgrade for ALT
parent
124f5362
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
25 deletions
+50
-25
epm-release_upgrade
bin/epm-release_upgrade
+50
-25
No files found.
bin/epm-release_upgrade
View file @
579018e3
...
...
@@ -77,7 +77,7 @@ __alt_repofix()
load_helper epm-repofix
showcmd epm repofix
quiet
=
1
pkg_filenames
=
''
epm_repofix
>
/dev/null
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tp][6-9]
\]
![updates]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tp
c
][6-9]
\]
![updates]!g"
}
__get_conflict_release_pkg
()
...
...
@@ -87,15 +87,47 @@ __get_conflict_release_pkg()
get_fix_release_pkg
()
{
# TODO: check for version incompatibilities
if
epmqf /etc/altlinux-release |
grep
-q
sisyphus
;
then
echo
altlinux-release-
$1
local
TOINSTALL
=
''
local
FORCE
=
''
if
[
"
$1
"
==
"--force"
]
;
then
FORCE
=
"
$1
"
shift
fi
local
TO
=
"
$1
"
echo
"rpm apt"
if
[
"
$TO
"
=
"Sisyphus"
]
;
then
TO
=
"sisyphus"
echo
"apt-conf-
$TO
"
else
echo
"apt-conf-branch"
fi
if
[
"
$FORCE
"
==
"--force"
]
;
then
# assure we have set needed release
TOINSTALL
=
"altlinux-release-
$TO
"
else
# just assure we have /etc/altlinux-release and switched from sisyphus
if
[
!
-s
/etc/altlinux-release
]
||
epmqf /etc/altlinux-release |
grep
-q
sisyphus
;
then
TOINSTALL
=
"altlinux-release-
$TO
"
fi
fi
# workaround against
# file /etc/fedora-release from install of altlinux-release-p8-20160414-alt1 conflicts with file from package branding-simply-linux-release-8.2.0-alt1
# problem
if
__get_conflict_release_pkg |
grep
-q
-v
"^altlinux-release"
;
then
echo
altlinux-release-
$1
$(
__get_conflict_release_pkg
)
-
# workaround against obsoleted altlinux-release-sisyphus package from 2008 year
[
"
$TOINSTALL
"
=
"altlinux-release-sisyphus"
]
&&
TOINSTALL
=
"branding-alt-sisyphus-release"
if
[
-n
"
$TOINSTALL
"
]
;
then
echo
"
$TOINSTALL
"
# workaround against
# file /etc/fedora-release from install of altlinux-release-p8-20160414-alt1 conflicts with file from package branding-simply-linux-release-8.2.0-alt1
# problem
if
__get_conflict_release_pkg |
grep
-q
-v
"^altlinux-release"
&&
[
"
$TOINSTALL
"
!=
"
$(
__get_conflict_release_pkg
)
"
]
;
then
echo
$(
__get_conflict_release_pkg
)
-
fi
fi
}
...
...
@@ -106,7 +138,7 @@ __update_to_the_distro()
case
"
$TO
"
in
p7
)
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-branch
"
$(
get_fix_release_pkg
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
"
$(
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"
docmd epm update
||
fatal
...
...
@@ -114,14 +146,11 @@ __update_to_the_distro()
;;
p8
)
docmd epm update
||
fatal
if
!
docmd epm
install
apt rpm apt-conf-branch
"
$(
get_fix_release_pkg
"
$TO
"
)
"
;
then
# Hack for error: execution of %post scriptlet from glibc-core-2.23-alt1.eter1
#docmd rpm -ev glibc-core-2.17 || fatal "Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
"
$(
get_fix_release_pkg
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
fi
docmd epm
install
"
$(
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"
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
...
...
@@ -129,7 +158,7 @@ __update_to_the_distro()
;;
Sisyphus
)
docmd epm update
||
fatal
docmd epm
install
apt rpm librpm7 librpm apt-conf-sisyphus altlinux-release-sisyphus
$(
__get_conflict_release_pkg
)
||
fatal
"Check an error and run again"
docmd epm
install
librpm7 librpm
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run again"
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
*
)
...
...
@@ -146,9 +175,8 @@ __update_alt_to_next_distro()
case
"
$*
"
in
"p6"
|
"p6 p7"
|
"t6 p7"
|
"c6 c7"
)
TO
=
"p7"
docmd epm
install
apt rpm
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/branch/"
__update_to_the_distro
"
$TO
"
docmd epm update-kernel
...
...
@@ -157,9 +185,8 @@ __update_alt_to_next_distro()
;;
"p7"
|
"p7 p8"
|
"t7 p8"
|
"c7 c8"
|
"p8 p8"
)
TO
=
"p8"
docmd epm
install
apt rpm
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
$FROM
/branch/
$TO
/branch/
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
...
...
@@ -167,20 +194,18 @@ __update_alt_to_next_distro()
;;
"Sisyphus p8"
)
TO
=
"p8"
docmd epm
install
apt rpm
info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__replace_alt_version_in_repo
"
$FROM
/"
"
$FROM
/branch/"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
$TO
]!g"
__update_to_the_distro
$TO
docmd epm downgrade
||
fatal
info
"Done."
;;
"p8 Sisyphus"
)
"p8 Sisyphus"
|
"Sisyphus Sisyphus"
)
TO
=
"Sisyphus"
docmd epm
install
apt rpm
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
docmd epm upgrade
||
fatal
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/"
__alt_repofix
...
...
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