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
53c77965
Commit
53c77965
authored
Apr 23, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release-upgrade: add detect current system by apt repo
parent
9f17f8c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
5 deletions
+43
-5
epm
bin/epm
+1
-1
epm-release_upgrade
bin/epm-release_upgrade
+42
-4
No files found.
bin/epm
View file @
53c77965
...
...
@@ -227,7 +227,7 @@ check_command()
removerepo|rr
)
# HELPCMD: remove package repo
epm_cmd
=
removerepo
;;
release-upgrade
)
# HELPCMD: update whole system to the next release
release-upgrade
|upgrade-release
)
# HELPCMD: update whole system to the next release
epm_cmd
=
release_upgrade
;;
kernel-update|kernel-upgrade|update-kernel|upgrade-kernel
)
# HELPCMD: update system kernel to the last repo version
...
...
bin/epm-release_upgrade
View file @
53c77965
...
...
@@ -28,6 +28,25 @@ __replace_text_in_alt_repo()
done
}
__detect_alt_release_by_repo
()
{
local
BRD
=
$(
cat
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list |
\
grep
-v
"^#"
|
grep
"p[5-9]/branch"
|
sed
-e
"s|.*
\(
p[5-9]
\)
/branch.*|
\1
|g"
|
sort
-u
)
if
[
$(
estrlist count
$BRD
)
=
"1"
]
;
then
echo
"
$BRD
"
return
fi
local
BRD
=
$(
cat
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list |
\
grep
-v
"^#"
|
grep
"Sisyphus"
|
sed
-e
"s|.*
\(
Sisyphus
\)
.*|
\1
|g"
|
sort
-u
)
if
[
$(
estrlist count
$BRD
)
=
"1"
]
;
then
echo
"
$BRD
"
return
fi
return
1
}
__replace_alt_version_in_repo
()
{
local
i
...
...
@@ -43,7 +62,7 @@ __update_alt_repo_to_next_distro()
{
case
"
$DISTRVERSION
"
in
p6
)
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
altlinux-release-p6
||
fatal
load_helper epm-repofix
pkg_filenames
=
epm_repofix
__replace_alt_version_in_repo p6 p7
...
...
@@ -58,7 +77,7 @@ __update_alt_repo_to_next_distro()
info
"Run epm release-upgrade again for update to p8"
;;
p7
)
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
altlinux-release-p7
||
fatal
load_helper epm-repofix
pkg_filenames
=
epm_repofix
__replace_alt_version_in_repo p7 p8
...
...
@@ -80,7 +99,8 @@ __update_alt_repo_to_next_distro()
info
"Done."
;;
*
)
info
"Have no idea how to update from
$DISTRNAME
$DISTRVERSION
. Try install branding-simply-linux-release package before."
info
"Have no idea how to update from
$DISTRNAME
$DISTRVERSION
."
info
"Try run f.i. # epm release-upgrade p8"
return
1
esac
}
...
...
@@ -95,7 +115,25 @@ epm_release_upgrade()
ALTLinux
)
docmd epm update
docmd epm
install
apt rpm
__update_alt_repo_to_next_distro
case
"
$pkg_filenames
"
in
"p7"
)
DISTRVERSION
=
p6 __update_alt_repo_to_next_distro
;;
"p8"
)
DISTRVERSION
=
p7 __update_alt_repo_to_next_distro
;;
"Sisyphus"
)
fatal
"Does not realized yet"
;;
*
)
if
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
||
[
-z
"
$DISTRVERSION
"
]
;
then
# try to detect current release by repo
DISTRVERSION
=
$(
__detect_alt_release_by_repo
)
__update_alt_repo_to_next_distro
else
__update_alt_repo_to_next_distro
fi
;;
esac
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