|
|
@ -192,8 +192,8 @@ class InfoBlockInterface(object):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EmergeInformationBlock(InfoBlockInterface):
|
|
|
|
class EmergeInformationBlock(InfoBlockInterface):
|
|
|
|
_color_block = "(?:\033\[[^m]+?m)?"
|
|
|
|
_color_block = r"(?:\033\[[^m]+?m)?"
|
|
|
|
_new_line = "(?:\r*\n)"
|
|
|
|
_new_line = r"(?:\r*\n)"
|
|
|
|
end_token = ["\n"]
|
|
|
|
end_token = ["\n"]
|
|
|
|
re_block = None
|
|
|
|
re_block = None
|
|
|
|
re_match_type = type(re.match("", ""))
|
|
|
|
re_match_type = type(re.match("", ""))
|
|
|
@ -433,7 +433,7 @@ class QuestionGroup(GroupEmergeInformationBlock):
|
|
|
|
end_token = ["]", "\n"]
|
|
|
|
end_token = ["]", "\n"]
|
|
|
|
_color_block = EmergeInformationBlock._color_block
|
|
|
|
_color_block = EmergeInformationBlock._color_block
|
|
|
|
re_block = re.compile(
|
|
|
|
re_block = re.compile(
|
|
|
|
"(Would you.*)\[{c}Yes{c}/{c}No{c}".format(c=_color_block))
|
|
|
|
r"(Would you.*)\[{c}Yes{c}/{c}No{c}".format(c=_color_block))
|
|
|
|
|
|
|
|
|
|
|
|
def get_block(self, child):
|
|
|
|
def get_block(self, child):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -546,8 +546,8 @@ class EmergingPackage(NotifierInformationBlock):
|
|
|
|
_color_block = EmergeInformationBlock._color_block
|
|
|
|
_color_block = EmergeInformationBlock._color_block
|
|
|
|
token = ">>> Emerging "
|
|
|
|
token = ">>> Emerging "
|
|
|
|
re_block = re.compile(
|
|
|
|
re_block = re.compile(
|
|
|
|
"Emerging (binary )?\({c}(\d+){c} "
|
|
|
|
r"Emerging (binary )?\({c}(\d+){c} "
|
|
|
|
"of {c}(\d+){c}\) {c}([^\s\033]+){c}".format(c=_color_block))
|
|
|
|
r"of {c}(\d+){c}\) {c}([^\s\033]+){c}".format(c=_color_block))
|
|
|
|
|
|
|
|
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
observer(EmergePackage(groups[3]), num=groups[1], max_num=groups[2],
|
|
|
|
observer(EmergePackage(groups[3]), num=groups[1], max_num=groups[2],
|
|
|
@ -575,7 +575,7 @@ class FetchingTarball(NotifierInformationBlock):
|
|
|
|
Происходит скачивание архивов
|
|
|
|
Происходит скачивание архивов
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
token = "Saving to:"
|
|
|
|
token = "Saving to:"
|
|
|
|
re_block = re.compile("Saving to:\s*[‘'](\S+)?['’]")
|
|
|
|
re_block = re.compile(r"Saving to:\s*[‘'](\S+)?['’]")
|
|
|
|
|
|
|
|
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
observer(groups[0])
|
|
|
|
observer(groups[0])
|
|
|
@ -592,8 +592,8 @@ class InstallingPackage(NotifierInformationBlock):
|
|
|
|
|
|
|
|
|
|
|
|
token = ">>> Installing "
|
|
|
|
token = ">>> Installing "
|
|
|
|
re_block = re.compile(
|
|
|
|
re_block = re.compile(
|
|
|
|
"Installing \({c}(\d+){c} "
|
|
|
|
r"Installing \({c}(\d+){c} "
|
|
|
|
"of {c}(\d+){c}\) {c}([^\s\033]+){c}".format(c=_color_block))
|
|
|
|
r"of {c}(\d+){c}\) {c}([^\s\033]+){c}".format(c=_color_block))
|
|
|
|
|
|
|
|
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
strpkg = str(EmergePackage(groups[2]))
|
|
|
|
strpkg = str(EmergePackage(groups[2]))
|
|
|
@ -612,8 +612,8 @@ class EmergeingErrorBlock(EmergeInformationBlock):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
token = ["* ERROR: ", " * \033[39;49;00mERROR: "]
|
|
|
|
token = ["* ERROR: ", " * \033[39;49;00mERROR: "]
|
|
|
|
end_token = "Working directory:"
|
|
|
|
end_token = "Working directory:"
|
|
|
|
re_block = re.compile("ERROR: (\S*) failed \([^)]+\).*?"
|
|
|
|
re_block = re.compile(r"ERROR: (\S*) failed \([^)]+\).*?"
|
|
|
|
"The complete build log is located at '([^']+)",
|
|
|
|
r"The complete build log is located at '([^']+)",
|
|
|
|
re.DOTALL)
|
|
|
|
re.DOTALL)
|
|
|
|
package = ""
|
|
|
|
package = ""
|
|
|
|
|
|
|
|
|
|
|
@ -636,7 +636,8 @@ class RevdepPercentBlock(NotifierInformationBlock):
|
|
|
|
token = "Collecting system binaries"
|
|
|
|
token = "Collecting system binaries"
|
|
|
|
end_token = [re.compile("Assigning files to packages|"
|
|
|
|
end_token = [re.compile("Assigning files to packages|"
|
|
|
|
"All prepared. Starting rebuild")]
|
|
|
|
"All prepared. Starting rebuild")]
|
|
|
|
re_block = re.compile("\[\s(\d+)%\s\]")
|
|
|
|
# re_block = re.compile("\[\s(\d+)%\s\]")
|
|
|
|
|
|
|
|
re_block = re.compile(r"\[\s(\d+)%\s\]")
|
|
|
|
action = None
|
|
|
|
action = None
|
|
|
|
|
|
|
|
|
|
|
|
def notify(self, observer, groups):
|
|
|
|
def notify(self, observer, groups):
|
|
|
|