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
67fa6d37
Commit
67fa6d37
authored
Apr 15, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm release-upgrade: initial support upgrade from p7 to p8 and p6 to p7
parent
0dc3d0de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
6 deletions
+41
-6
epm-release_upgrade
bin/epm-release_upgrade
+41
-6
No files found.
bin/epm-release_upgrade
View file @
67fa6d37
...
@@ -17,29 +17,65 @@
...
@@ -17,29 +17,65 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
__replace_alt_version_in_repo
()
{
local
i
assure_exists apt-repo
echo
"Upgrading
$DISTRNAME
from
$1
to
$2
..."
docmd apt-repo list |
sed
-e
"s|
\(
$1
/branch
\)
|{
\1
}->
$2
/branch<|g"
| egrep
--color
--
"
$1
/branch"
confirm
"Are these correct changes?"
||
fatal
"Exiting"
for
i
in
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
;
do
[
-s
"
$i
"
]
||
continue
# TODO: only for uncommended strings
#sed -i -r -e "s!$1/branch!$2/branch!g" $i
regexp_subst
"/^ *#/! s!
$1
/branch!
$2
/branch!g"
$i
# TODO: start with improve to [p8] - install some package firstly?
regexp_subst
"/^ *#/! s s!
\[
$1
\]
![alt]/branch!g"
$i
done
docmd apt-repo list
}
__update_alt_repo_to_next_distro
()
__update_alt_repo_to_next_distro
()
{
{
case
"
$DISTRVERSION
"
in
case
"
$DISTRVERSION
"
in
# p7)
p6
)
# ;;
__replace_alt_version_in_repo p6 p7
info
"Run epm release-upgrade again for update to p8"
;;
p7
)
__replace_alt_version_in_repo p7 p8
;;
*
)
*
)
info
"Have no idea how to update from
$DISTRVERSION
"
info
"Have no idea how to update from
$DISTR
NAME
$DISTR
VERSION
"
return
1
return
1
esac
esac
}
}
epm_release_upgrade
()
epm_release_upgrade
()
{
{
assure_root
info
"Starting upgrade whole system to the next release"
info
"Starting upgrade whole system to the next release"
info
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
info
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
case
$
PMTYP
E
in
case
$
DISTRNAM
E
in
apt-rpm
)
ALTLinux
)
docmd epm update
docmd epm update
docmd epm
install
apt rpm
docmd epm
install
apt rpm
pkg_filenames
=
epm_repofix
__update_alt_repo_to_next_distro
||
exit
__update_alt_repo_to_next_distro
||
exit
docmd epm Upgrade
docmd epm Upgrade
docmd epm update-kernel
docmd epm update-kernel
return
;;
*
)
;;
esac
case
$PMTYPE
in
apt-rpm
)
docmd epm update
info
"Have no idea how to upgrade
$DISTRNAME
"
;;
;;
*
-dpkg
)
*
-dpkg
)
sudocmd
do
-release-upgrade
-d
sudocmd
do
-release-upgrade
-d
...
@@ -85,5 +121,4 @@ epm_release_upgrade()
...
@@ -85,5 +121,4 @@ epm_release_upgrade()
;;
;;
esac
esac
sudocmd
$CMD
$pkg_filenames
}
}
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