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
124f5362
Commit
124f5362
authored
7 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve release_upgrade, automate altlinux-release-p8 install
parent
88144126
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
epm-release_upgrade
bin/epm-release_upgrade
+30
-6
No files found.
bin/epm-release_upgrade
View file @
124f5362
...
...
@@ -80,12 +80,23 @@ __alt_repofix()
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tp][6-9]
\]
![updates]!g"
}
__get_conflict_release_pkg
()
{
epmqf
--quiet
--short
/etc/fedora-release |
head
-n1
}
get_fix_release_pkg
()
{
# TODO: check for version incompatibilities
if
epmqf /etc/altlinux-release |
grep
-q
sisyphus
;
then
echo
altlinux-release-
$1
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
)
-
fi
}
__update_to_the_distro
()
...
...
@@ -105,7 +116,7 @@ __update_to_the_distro()
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 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
__alt_repofix
...
...
@@ -118,21 +129,24 @@ __update_to_the_distro()
;;
Sisyphus
)
docmd epm update
||
fatal
docmd epm
install
apt rpm librpm7 librpm apt-conf-sisyphus altlinux-release-sisyphus
||
fatal
"Check an error and run again"
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 upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
*
)
esac
}
__update_alt_to_next_distro
()
{
local
TO
=
""
local
TO
=
"
$2
"
local
FROM
=
"
$1
"
[
-n
"
$TO
"
]
||
TO
=
"
$FROM
"
info
case
"
$*
"
in
"p6"
|
"p6 p7"
|
"t6 p7"
)
"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
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/branch/"
...
...
@@ -141,8 +155,9 @@ __update_alt_to_next_distro()
info
"Done."
info
"Run epm release-upgrade again for update to p8"
;;
"p7"
|
"p7 p8"
|
"t7 p8"
)
"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
__replace_alt_version_in_repo
$FROM
/branch/
$TO
/branch/
...
...
@@ -152,6 +167,7 @@ __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
__replace_alt_version_in_repo
"
$FROM
/"
"
$FROM
/branch/"
...
...
@@ -162,6 +178,7 @@ __update_alt_to_next_distro()
;;
"p8 Sisyphus"
)
TO
=
"Sisyphus"
docmd epm
install
apt rpm
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm upgrade
||
fatal
...
...
@@ -173,7 +190,11 @@ __update_alt_to_next_distro()
info
"Done."
;;
*
)
if
[
"
$FROM
"
=
"
$TO
"
]
;
then
info
"It seems your system is already updated to newest
$DISTRNAME
$TO
"
else
warning
"Have no idea how to update from
$DISTRNAME
$FROM
to
$DISTRNAME
$TO
."
fi
info
"Try run f.i. # epm release-upgrade p8 or # epm release-upgrade Sisyphus"
info
"Also possible you need install altlinux-release-p? package for correct distro version detecting"
return
1
...
...
@@ -186,10 +207,12 @@ epm_release_upgrade()
info
"Starting upgrade whole system to the next release"
info
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
# TODO: it is possible eatmydata does not do his work
export
EPMNOEATMYDATA
=
1
case
$DISTRNAME
in
ALTLinux
)
docmd epm update
docmd epm
install
apt rpm
# try to detect current release by repo
if
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
||
[
-z
"
$DISTRVERSION
"
]
;
then
...
...
@@ -208,6 +231,7 @@ epm_release_upgrade()
[
"
$(
__wcount
$pkg_filenames
)
"
=
"1"
]
||
fatal
"Too many args:
$pkg_filenames
"
fi
# TODO: ask before upgrade
__update_alt_to_next_distro
$DISTRVERSION
$pkg_filenames
return
;;
...
...
This diff is collapsed.
Click to expand it.
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