2018-10-27 20:04:00 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
environ = os.environ
|
|
|
|
|
|
|
|
command = [
|
|
|
|
"systemd-nspawn",
|
|
|
|
"--quiet",
|
|
|
|
f"--directory={environ['CHROOT']}",
|
|
|
|
f"--machine={environ['container']}",
|
|
|
|
f"--bind={environ['PORTAGE_DIR']}:/usr/portage",
|
|
|
|
f"--bind={environ['VA_PKGDIR']}:/usr/portage/packages",
|
|
|
|
f"--bind={environ['DISTDIR']}:/usr/portage/distfiles",
|
|
|
|
] + sys.argv[1:]
|
|
|
|
|
|
|
|
if os.environ.get("VA_ARCH") == "linux32":
|
|
|
|
command = ["linux32"] + command
|
|
|
|
|
2018-12-02 09:04:26 +01:00
|
|
|
sys.exit(subprocess.call(command))
|
2018-10-27 20:04:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|