fix gui hostname warn info

(cherry picked from commit 8dd03d80b73861a2fb7489dc2009883448f6007c)
This commit is contained in:
sun_hai_10 2023-06-03 16:01:42 +08:00 committed by openeuler-sync-bot
parent 17c0b64861
commit 97301cc5cb
2 changed files with 18 additions and 10 deletions

View File

@ -1,7 +1,7 @@
%define _empty_manifest_terminate_build 0 %define _empty_manifest_terminate_build 0
Name: anaconda Name: anaconda
Version: 36.16.5 Version: 36.16.5
Release: 14 Release: 15
Summary: Graphical system installer Summary: Graphical system installer
License: GPLv2+ and MIT License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda URL: http://fedoraproject.org/wiki/Anaconda
@ -278,6 +278,12 @@ update-desktop-database &> /dev/null || :
%{_prefix}/libexec/anaconda/dd_* %{_prefix}/libexec/anaconda/dd_*
%changelog %changelog
* Sat Jun 03 2023 sunhai <sunhai10@huawei.com> - 36.16.5-15
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix gui hostname warn info
* Fri Feb 24 2023 sunhai <sunhai10@huawei.com> - 36.16.5-14 * Fri Feb 24 2023 sunhai <sunhai10@huawei.com> - 36.16.5-14
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA

View File

@ -4,19 +4,20 @@ Date: Thu, 18 Jun 2020 17:13:47 +0800
Subject: [PATCH] fix hostname info Subject: [PATCH] fix hostname info
--- ---
po/zh_CN.po | 5 +++-- po/zh_CN.po | 6 +++---
pyanaconda/core/regexes.py | 2 +- pyanaconda/core/regexes.py | 2 +-
pyanaconda/network.py | 3 ++- pyanaconda/network.py | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-) 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/po/zh_CN.po b/po/zh_CN.po diff --git a/po/zh_CN.po b/po/zh_CN.po
index e31f0b2..c02ce1e 100644 index 18b0925..c2216e6 100644
--- a/po/zh_CN.po --- a/po/zh_CN.po
+++ b/po/zh_CN.po +++ b/po/zh_CN.po
@@ -4090,10 +4090,11 @@ msgstr "本地主机名不能以英文句号“.”结尾。" @@ -4089,11 +4089,11 @@ msgstr "本地主机名不能以英文句号“.”结尾。"
#: pyanaconda/network.py:119
msgid "" msgid ""
"Host names can only contain the characters 'a-z', 'A-Z', '0-9', '-', or '.', " "Host names can only contain the characters 'a-z', 'A-Z', '0-9', '-', or '.', "
"parts between periods must contain something and cannot start or end with " -"parts between periods must contain something and cannot start or end with "
-"'-'." -"'-'."
+"parts between periods must contain something being 63 or fewer " +"parts between periods must contain something being 63 or fewer "
+"characters and cannot start or end with '.' and '-'." +"characters and cannot start or end with '.' and '-'."
@ -41,13 +42,14 @@ index cc00702..388d1ff 100644
# URL Hostname # URL Hostname
# This matches any hostname, IPv4 literal or properly encased IPv6 literal # This matches any hostname, IPv4 literal or properly encased IPv6 literal
diff --git a/pyanaconda/network.py b/pyanaconda/network.py diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 38fe957..c52cf1d 100644 index 38fe957..8f04d63 100644
--- a/pyanaconda/network.py --- a/pyanaconda/network.py
+++ b/pyanaconda/network.py +++ b/pyanaconda/network.py
@@ -115,7 +115,8 @@ def is_valid_hostname(hostname, local=False): @@ -114,8 +114,8 @@ def is_valid_hostname(hostname, local=False):
if not re.match('^' + HOSTNAME_PATTERN_WITHOUT_ANCHORS + '$', hostname):
return (False, _("Host names can only contain the characters 'a-z', " return (False, _("Host names can only contain the characters 'a-z', "
"'A-Z', '0-9', '-', or '.', parts between periods " "'A-Z', '0-9', '-', or '.', parts between periods "
"must contain something and cannot start or end with " - "must contain something and cannot start or end with "
- "'-'.")) - "'-'."))
+ "must contain something being 63 or fewer " + "must contain something being 63 or fewer "
+ "characters and cannot start or end with '.' and '-'.")) + "characters and cannot start or end with '.' and '-'."))