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
Nurlan
eepm
Commits
89086cd1
Commit
89086cd1
authored
Apr 23, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release-upgrade: small logic improvements
parent
7c0b368b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
epm-release_upgrade
bin/epm-release_upgrade
+9
-8
epm-repofix
bin/epm-repofix
+2
-2
No files found.
bin/epm-release_upgrade
View file @
89086cd1
...
...
@@ -58,7 +58,7 @@ __replace_alt_version_in_repo()
assure_exists apt-repo
#echo "Upgrading $DISTRNAME from $1 to $2 ..."
docmd apt-repo list |
sed
-e
"s|
\(
$1
\)
|{
\1
}->{
$2
}|g"
| egrep
--color
--
"
$1
"
confirm
"Are these correct changes?"
||
fatal
"Exiting"
confirm
"Are these correct changes?
[y/N]
"
||
fatal
"Exiting"
__replace_text_in_alt_repo
"/^ *#/! s!
$1
!
$2
!g"
docmd apt-repo list
}
...
...
@@ -66,7 +66,8 @@ __replace_alt_version_in_repo()
__alt_repofix
()
{
load_helper epm-repofix
pkg_filenames
=
epm_repofix
showcmd epm repofix
quiet
=
1
pkg_filenames
=
epm_repofix
>
/dev/null
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p[6-9]
\]
![updates]!g"
}
...
...
@@ -106,9 +107,6 @@ __update_to_the_distro()
Sisyphus
)
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-sisyphus altlinux-release-sisyphus
||
fatal
"Check an error and run again"
#__replace_text_in_alt_repo "/^ *#/! s!\[updates\]![alt]!g"
__alt_repofix
docmd epm update
||
fatal
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm update-kernel
||
fatal
info
"Done."
...
...
@@ -138,19 +136,21 @@ __update_alt_to_next_distro()
info
"Downgrade
$DISTRNAME
from Sisyphus to p8 ..."
docmd epm
install
apt-conf-branch
||
fatal
__replace_alt_version_in_repo Sisyphus/ p8/branch/
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![p8]!g"
__update_to_the_distro p8
;;
"p8 Sisyphus"
)
info
"Upgrade
$DISTRNAME
from p8 to Sisyphus ..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm upgrade
||
fatal
__alt_repofix
__replace_alt_version_in_repo p8/branch/ Sisyphus/
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![alt]!g"
__update_to_the_distro Sisyphus
;;
*
)
warning
"Have no idea how to update from
$DISTRNAME
$DISTRVERSION
."
info
"Try run f.i. # epm release-upgrade p8"
info
"Try run f.i. # epm release-upgrade p8
or # epm release-upgrade Sisyphus
"
return
1
esac
}
...
...
@@ -163,7 +163,6 @@ epm_release_upgrade()
case
$DISTRNAME
in
ALTLinux
)
__alt_repofix
docmd epm update
docmd epm
install
apt rpm
...
...
@@ -173,6 +172,8 @@ epm_release_upgrade()
[
"
$DISTRVERSION
"
!=
"Sisyphus"
]
&&
info
"Detected running
$DISTRNAME
$DISTRVERSION
(according to using repos)"
fi
__alt_repofix
# check forced target
if
[
-n
"
$pkg_filenames
"
]
;
then
[
"
$(
__wcount
$pkg_filenames
)
"
=
"1"
]
||
fatal
"Too many args:
$pkg_filenames
"
...
...
bin/epm-repofix
View file @
89086cd1
...
...
@@ -33,10 +33,10 @@ __fix_apt_sources_list()
# add signs
local
br
for
br
in
$DISTRVERSION
;
do
# sed -r -e "/ALTLinux\/p8\/branch/s/rpm *([fhr])/rpm [p8] \1/"
regexp_subst
"/ALTLinux
\/
$br
\/
branch/s/^rpm *([fhr])/rpm [
$br
]
\1
/"
$i
regexp_subst
"/Etersoft
\/
$br
\/
branch/s/^rpm *([fhr])/rpm [etersoft]
\1
/"
$i
done
regexp_subst
"/ALTLinux
\/
Sisyphus/s/^rpm *([fhr])/rpm [alt]
\1
/"
$i
done
}
...
...
@@ -48,7 +48,7 @@ epm_repofix()
case
$PMTYPE
in
apt-rpm
)
assure_exists apt-repo
docmd apt-repo list
[
-n
"
$quiet
"
]
||
docmd apt-repo list
__fix_apt_sources_list /etc/apt/sources.list
__fix_apt_sources_list /etc/apt/sources.list.d/
*
.list
docmd apt-repo list
...
...
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