|
|
|
@ -73,6 +73,7 @@ from os import path
|
|
|
|
|
from .datavars import BuilderError
|
|
|
|
|
from .emerge_fetch import EmergeFetcher, EmergeFetcherError
|
|
|
|
|
from calculate.lib.utils.grub import GrubCommand
|
|
|
|
|
from functools import reduce
|
|
|
|
|
|
|
|
|
|
_ = lambda x: x
|
|
|
|
|
from calculate.lib.cl_lang import (setLocalTranslate, getLazyLocalTranslate)
|
|
|
|
@ -231,7 +232,7 @@ class Builder(Update):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
data = []
|
|
|
|
|
re_subbuild = re.compile("\/[^-]+-[^-]+-(\d+)-[^-]+$", re.I)
|
|
|
|
|
re_subbuild = re.compile(r"\/[^-]+-[^-]+-(\d+)-[^-]+$", re.I)
|
|
|
|
|
for container_dn in listDirectory(dn, fullPath=True):
|
|
|
|
|
with ContainerDistributive(container_dn) as distro:
|
|
|
|
|
info = distro.get_information()
|
|
|
|
@ -269,7 +270,7 @@ class Builder(Update):
|
|
|
|
|
x['release'],
|
|
|
|
|
x['arch'],
|
|
|
|
|
x['variant'])):
|
|
|
|
|
info = grps.next()
|
|
|
|
|
info = next(grps)
|
|
|
|
|
dist_key = "{dist}:{release}:{arch}:{variant}".format(**info)
|
|
|
|
|
try:
|
|
|
|
|
indexsystem.write("{dist};{release};{arch};"
|
|
|
|
@ -856,7 +857,7 @@ class Builder(Update):
|
|
|
|
|
eclassdata = readFile(nvidia_eclass)
|
|
|
|
|
reBlock = re.compile(
|
|
|
|
|
r"if has \$\{nvidia_gpu\}\s+\\([^;]+);\s*then(.*?)fi", re.S)
|
|
|
|
|
reMask = re.compile('>=x11-drivers/nvidia-drivers[^"]+')
|
|
|
|
|
reMask = re.compile(r'>=x11-drivers/nvidia-drivers[^"]+')
|
|
|
|
|
for block in reBlock.findall(eclassdata):
|
|
|
|
|
nvidia_ids, mask_data = block
|
|
|
|
|
m = reMask.search(mask_data)
|
|
|
|
@ -1289,7 +1290,7 @@ class Builder(Update):
|
|
|
|
|
self._update_binhost_packages()
|
|
|
|
|
if path.exists(pathPackages):
|
|
|
|
|
re_keywords = re.compile(
|
|
|
|
|
'^(KEYWORDS|SYNC):.*$\n', re.M)
|
|
|
|
|
r'^(KEYWORDS|SYNC):.*$\n', re.M)
|
|
|
|
|
data = readFile(pathPackages)
|
|
|
|
|
data_blocks = data.split('\n\n')
|
|
|
|
|
modified_blocks = [
|
|
|
|
@ -1563,10 +1564,10 @@ class Builder(Update):
|
|
|
|
|
map(lambda x: os.unlink(x) if path.islink(x) else os.rmdir(x),
|
|
|
|
|
map(lambda x: path.join(pathname, x), dirs))
|
|
|
|
|
for node, mode, dmode, major, minor in [
|
|
|
|
|
("console", 0600, stat.S_IFCHR, 5, 1),
|
|
|
|
|
("tty1", 0600, stat.S_IFCHR, 4, 1),
|
|
|
|
|
("null", 0666, stat.S_IFCHR, 1, 3),
|
|
|
|
|
("zero", 0666, stat.S_IFCHR, 1, 5)]:
|
|
|
|
|
("console", 0o600, stat.S_IFCHR, 5, 1),
|
|
|
|
|
("tty1", 0o600, stat.S_IFCHR, 4, 1),
|
|
|
|
|
("null", 0o666, stat.S_IFCHR, 1, 3),
|
|
|
|
|
("zero", 0o666, stat.S_IFCHR, 1, 5)]:
|
|
|
|
|
nodePath = path.join(devPath, node)
|
|
|
|
|
os.mknod(nodePath, mode | dmode, os.makedev(major, minor))
|
|
|
|
|
os.chmod(nodePath, mode)
|
|
|
|
@ -1961,10 +1962,10 @@ class Builder(Update):
|
|
|
|
|
if all(y not in pretend for y in x)]
|
|
|
|
|
required_pkgs = list(set(chain(*required_pkgs)))
|
|
|
|
|
|
|
|
|
|
clear_req_pkgs = filter(
|
|
|
|
|
clear_req_pkgs = list(filter(
|
|
|
|
|
None, [x.strip() for x in system_ini.getVar(
|
|
|
|
|
"automagic-clear",
|
|
|
|
|
package["CATEGORY/PN"]).split(",")])
|
|
|
|
|
package["CATEGORY/PN"]).split(",")]))
|
|
|
|
|
waste_pkgs = [x for x in clear_req_pkgs if
|
|
|
|
|
all(y["CATEGORY/PN"] != x
|
|
|
|
|
for y in required_pkgs)]
|
|
|
|
|