mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-25 06:31:26 +00:00
Stop replacing module streams in synopsis/desc
This commit is contained in:
parent
3f336ee169
commit
0c2e29785a
@ -26,8 +26,9 @@ def parse_red_hat_date(rhdate: str) -> datetime.datetime:
|
|||||||
async def get_last_indexed_date() -> Optional[str]:
|
async def get_last_indexed_date() -> Optional[str]:
|
||||||
state = await RedHatIndexState.get_or_none()
|
state = await RedHatIndexState.get_or_none()
|
||||||
return re.sub(
|
return re.sub(
|
||||||
r"\+\d\d:\d\d", "",
|
r"\+\d\d:\d\d",
|
||||||
state.last_indexed_at.isoformat("T") + "Z"
|
"",
|
||||||
|
state.last_indexed_at.isoformat("T") + "Z",
|
||||||
) if state else None
|
) if state else None
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
import re
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree as ET
|
||||||
|
|
||||||
@ -11,6 +12,8 @@ from apollo.rpmworker import repomd
|
|||||||
|
|
||||||
from common.logger import Logger
|
from common.logger import Logger
|
||||||
|
|
||||||
|
RHEL_CONTAINER_RE = re.compile(r"rhel(?:\d|)\/")
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class NewPackage:
|
class NewPackage:
|
||||||
@ -157,6 +160,7 @@ async def clone_advisory(
|
|||||||
"Red Hat Enterprise Linux", product.name
|
"Red Hat Enterprise Linux", product.name
|
||||||
)
|
)
|
||||||
synopsis = synopsis.replace("RHEL", product.name)
|
synopsis = synopsis.replace("RHEL", product.name)
|
||||||
|
synopsis = RHEL_CONTAINER_RE.sub("", synopsis)
|
||||||
synopsis = synopsis.replace("rhel", product.name)
|
synopsis = synopsis.replace("rhel", product.name)
|
||||||
synopsis = synopsis.replace("Red Hat", product.vendor)
|
synopsis = synopsis.replace("Red Hat", product.vendor)
|
||||||
synopsis = synopsis.replace(advisory.name, name)
|
synopsis = synopsis.replace(advisory.name, name)
|
||||||
@ -164,7 +168,7 @@ async def clone_advisory(
|
|||||||
"Red Hat Enterprise Linux", product.name
|
"Red Hat Enterprise Linux", product.name
|
||||||
)
|
)
|
||||||
description = description.replace("RHEL", product.name)
|
description = description.replace("RHEL", product.name)
|
||||||
description = description.replace("rhel", product.name)
|
description = RHEL_CONTAINER_RE.sub("", description)
|
||||||
description = description.replace("Red Hat", product.vendor)
|
description = description.replace("Red Hat", product.vendor)
|
||||||
description = description.replace(advisory.name, name)
|
description = description.replace(advisory.name, name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user