Commit 332de905 authored by Vitaly Lipatov's avatar Vitaly Lipatov

more strong distro versions

parent 036d5f36
...@@ -37,10 +37,12 @@ get_prev_release() ...@@ -37,10 +37,12 @@ get_prev_release()
echo "c8" ;; echo "c8" ;;
"c8.2") "c8.2")
echo "c8.1" ;; echo "c8.1" ;;
"c9") "c9f1")
echo "c8.2" ;; echo "c8" ;;
"9") "c9f2")
echo "10" ;; echo "c9f1" ;;
"10")
echo "9" ;;
*) *)
echo "$FROM" ;; echo "$FROM" ;;
esac esac
......
...@@ -253,8 +253,10 @@ get_next_release() ...@@ -253,8 +253,10 @@ get_next_release()
echo "c8.1" ;; echo "c8.1" ;;
"c8.1") "c8.1")
echo "c8.2" ;; echo "c8.2" ;;
"c8.2") "c8")
echo "c9" ;; echo "c9f2" ;;
"c9f1")
echo "c9f2" ;;
*) *)
echo "$FROM" ;; echo "$FROM" ;;
esac esac
...@@ -321,7 +323,7 @@ __switch_alt_to_distro() ...@@ -321,7 +323,7 @@ __switch_alt_to_distro()
__check_system "$TO" __check_system "$TO"
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
;; ;;
"p8"|"p8 p9"|"t8 p9"|"c8 c9"|"c8 p9"|"c8.1 p9"|"c8.2 p9"|"p9 p9"|"p9 c9") "p8"|"p8 p9"|"t8 p9"|"c8 c9"|"c8 p9"|"c8.1 p9"|"c8.2 p9"|"p9 p9"|"p9 c9f2")
confirm_info "Upgrade $DISTRNAME from $FROM to $TO ..." confirm_info "Upgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
info "Workaround for https://bugzilla.altlinux.org/show_bug.cgi?id=35492 ..." info "Workaround for https://bugzilla.altlinux.org/show_bug.cgi?id=35492 ..."
...@@ -386,7 +388,7 @@ __switch_alt_to_distro() ...@@ -386,7 +388,7 @@ __switch_alt_to_distro()
__check_system "$TO" __check_system "$TO"
docmd epm upgrade || fatal docmd epm upgrade || fatal
;; ;;
"Sisyphus p8"|"Sisyphus p9"|"Sisyphus p10"|"Sisyphus c8"|"Sisyphus c8.1"|"Sisyphus c9") "Sisyphus p8"|"Sisyphus p9"|"Sisyphus p10"|"Sisyphus c8"|"Sisyphus c8.1"|"Sisyphus c9f2")
confirm_info "Downgrade $DISTRNAME from $FROM to $TO ..." confirm_info "Downgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install "$(get_fix_release_pkg "$FROM")" docmd epm install "$(get_fix_release_pkg "$FROM")"
__switch_repo_to $TO __switch_repo_to $TO
......
...@@ -46,10 +46,10 @@ __repofix_filter_vendor() ...@@ -46,10 +46,10 @@ __repofix_filter_vendor()
local br="$1" local br="$1"
br="$(echo "$br" | sed -e "s|\..*||")" br="$(echo "$br" | sed -e "s|\..*||")"
case $br in case $br in
c8) c8*)
br="cert8" br="cert8"
;; ;;
c9) c9*)
br="cert9" br="cert9"
;; ;;
Sisyphus) Sisyphus)
......
PRETTY_NAME="Astra Linux"
NAME="Astra Linux"
ID=astra
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://astralinux.ru"
SUPPORT_URL="https://astralinux.ru/support"
LOGO=astra
VERSION_ID=1.7_x86-64
VERSION_CODENAME=1.7_x86-64
ALT Workstation K 9.0 BETA (Centaurea Ruthenica)
openSUSE Tumbleweed/20161014
#!/bin/sh
WRITE=''
[ "$1" = "--write" ] && WRITE=1
for ROOTDIR in $(ls -1d etc/*) ; do
export ROOTDIR
e=$(../bin/distr_info -e)
if [ -n "$WRITE" ] ; then
echo "$e" > $ROOTDIR/etalon.txt
continue
fi
le="$(cat $ROOTDIR/etalon.txt 2>/dev/null)"
if [ "$le" = "$e" ] ; then
printf "%23s -> %20s : %s\n" "$(basename $ROOTDIR)" "$e" "OK"
else
printf "%23s -> %20s : %s\n" "$(basename $ROOTDIR)" "$e" "FAIL (expect $le)"
fi
done
#!/bin/sh
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$3' do not match with '$2'" || echo "OK for '$1' with '$2'"
}
# 1.2.3.4.5 -> 1
normalize_version1()
{
echo "$1" | sed -e "s|\..*||"
}
# 1.2.3.4.5 -> 1.2
normalize_version2()
{
echo "$1" | sed -e "s|^\([^.][^.]*\.[^.][^.]*\)\..*|\1|"
}
# 1.2.3.4.5 -> 1.2.3
normalize_version3()
{
echo "$1" | sed -e "s|^\([^.][^.]*\.[^.][^.]*\.[^.][^.]*\)\..*|\1|"
}
test1()
{
check "$1" "$2" "$(normalize_version1 "$1")"
}
test2()
{
check "$1" "$2" "$(normalize_version2 "$1")"
}
test3()
{
check "$1" "$2" "$(normalize_version3 "$1")"
}
echo
echo " 1"
test1 1 1
test1 10 10
test1 10.1 10
test1 10.01 10
test1 1.1 1
test1 1.1.1 1
test1 1.2.3.4 1
test1 1.2.3.4.5 1
test1 123 123
echo
echo " 2"
test2 2.1 2.1
test2 2 2
test2 10 10
test2 10.1 10.1
test2 10.01 10.01
test2 1.1 1.1
test2 1.1.1 1.1
test2 1.2.3.4 1.2
test2 1.2.3.4.5 1.2
test2 123 123
echo
echo " 3"
test3 2.1 2.1
test3 2 2
test3 10 10
test3 10.1 10.1
test3 10.01 10.01
test3 1.1 1.1
test3 1.1.1 1.1.1
test3 1.2.3.4 1.2.3
test3 1.2.3.4.5 1.2.3
test3 1.2.3.4.5.6 1.2.3
test3 123 123
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment