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
d2dabb99
Commit
d2dabb99
authored
Apr 18, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite release-upgrade
parent
bceecb57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
epm-release_upgrade
bin/epm-release_upgrade
+26
-17
No files found.
bin/epm-release_upgrade
View file @
d2dabb99
...
@@ -19,6 +19,15 @@
...
@@ -19,6 +19,15 @@
load_helper epm-query
load_helper epm-query
__replace_text_in_alt_repo
()
{
local
i
for
i
in
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
;
do
[
-s
"
$i
"
]
||
continue
regexp_subst
"
$1
"
"
$i
"
done
}
__replace_alt_version_in_repo
()
__replace_alt_version_in_repo
()
{
{
local
i
local
i
...
@@ -26,15 +35,7 @@ __replace_alt_version_in_repo()
...
@@ -26,15 +35,7 @@ __replace_alt_version_in_repo()
echo
"Upgrading
$DISTRNAME
from
$1
to
$2
..."
echo
"Upgrading
$DISTRNAME
from
$1
to
$2
..."
docmd apt-repo list |
sed
-e
"s|
\(
$1
/branch
\)
|{
\1
}->{
$2
/branch}|g"
| egrep
--color
--
"
$1
/branch"
docmd apt-repo list |
sed
-e
"s|
\(
$1
/branch
\)
|{
\1
}->{
$2
/branch}|g"
| egrep
--color
--
"
$1
/branch"
confirm
"Are these correct changes?"
||
fatal
"Exiting"
confirm
"Are these correct changes?"
||
fatal
"Exiting"
for
i
in
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
;
do
__replace_text_in_alt_repo
"/^ *#/! s!
$1
/branch!
$2
/branch!g"
[
-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!
\[
$1
\]
![
\$
2]!g"
$i
done
docmd apt-repo list
docmd apt-repo list
}
}
...
@@ -43,27 +44,37 @@ __update_alt_repo_to_next_distro()
...
@@ -43,27 +44,37 @@ __update_alt_repo_to_next_distro()
case
"
$DISTRVERSION
"
in
case
"
$DISTRVERSION
"
in
p6
)
p6
)
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
||
fatal
load_helper epm-repofix
pkg_filenames
=
epm_repofix
__replace_alt_version_in_repo p6 p7
__replace_alt_version_in_repo p6 p7
docmd epm update
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p6
\]
![updates]!g"
docmd epm
install
apt rpm
||
fatal
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-branch
||
fatal
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![p7]!g"
docmd epm update
||
fatal
docmd epm upgrade
docmd epm upgrade
docmd epm update-kernel
docmd epm update-kernel
info
"Run epm release-upgrade again for update to p8"
info
"Run epm release-upgrade again for update to p8"
;;
;;
p7
)
p7
)
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
||
fatal
load_helper epm-repofix
pkg_filenames
=
epm_repofix
__replace_alt_version_in_repo p7 p8
__replace_alt_version_in_repo p7 p8
docmd epm update
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p7
\]
![updates]!g"
docmd epm
install
apt rpm
||
fatal
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-branch
||
fatal
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![p7]!g"
docmd epm update
||
fatal
if
is_installed systemd
;
then
if
is_installed systemd
;
then
docmd epm
install
systemd
||
fatal
docmd epm
install
systemd
||
fatal
fi
fi
docmd epm upgrade
||
fatal
docmd epm upgrade
||
fatal
#info " # epmi branding-simply-linux-release branding-simply-linux-graphics"
#info " # epmi branding-simply-linux-release branding-simply-linux-graphics"
docmd epm update-kernel
docmd epm update-kernel
||
fatal
;;
;;
*
)
*
)
info
"Have no idea how to update from
$DISTRNAME
$DISTRVERSION
"
info
"Have no idea how to update from
$DISTRNAME
$DISTRVERSION
. Try install branding-simply-linux-release package before.
"
return
1
return
1
esac
esac
}
}
...
@@ -78,8 +89,6 @@ epm_release_upgrade()
...
@@ -78,8 +89,6 @@ epm_release_upgrade()
ALTLinux
)
ALTLinux
)
docmd epm update
docmd epm update
docmd epm
install
apt rpm
docmd epm
install
apt rpm
load_helper epm-repofix
pkg_filenames
=
epm_repofix
__update_alt_repo_to_next_distro
__update_alt_repo_to_next_distro
return
return
;;
;;
...
...
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