Unlike `OS.makedirs', this doesn't fail if DIR already exists.
"""
- d = ""
+ if dir.startswith("/"): d = "/"; dir = dir[1:]
+ else: d = ""
for p in dir.split("/"):
d = OS.path.join(d, p)
if d == "": continue
CREATE = Tag("CREATE")
FORCE = Tag("FORCE")
+DEBCONF_TWEAKS = """
+ DEBIAN_FRONTEND=noninteractive; export DEBIAN_FRONTEND
+ DEBIAN_PRIORITY=critical export DEBIAN_PRIORITY
+ DEBCONF_NONINTERACTIVE_SEEN=true; export DEBCONF_NONINTERACTIVE_SEEN
+"""
+
def check_fresh(fresh, update):
"""
Compare a refresh mode FRESH against an UPDATE time.
continue
ff.append(f)
path = OS.path.join(dir, f)
- if not OS.path.isdir(path): examine(path)
+ if OS.path.islink(path) or not OS.path.isdir(path): examine(path)
files[:] = ff
OS.path.walk(crossdir, visit, None)
OS.path.walk(OS.path.join(crossdir, "TOOLCHAIN", gnuarch),
## Install the base system.
progress("install base system")
- run_root(["eatmydata", "debootstrap"] +
+ run_root(["eatmydata", "debootstrap", "--no-merged-usr"] +
(arch in C.FOREIGN_ARCHS and ["--foreign"] or []) +
["--arch=" + arch, "--variant=minbase",
"--include=" + ",".join(C.BASE_PACKAGES),
## Finishing touches.
progress("finishing touches")
- run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c", """
+ run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c",
+ DEBCONF_TWEAKS + """
apt-get update
apt-get -y upgrade
apt-get -y install "$@"
with Cleanup() as clean:
dist, arch = me._dist, me._arch
clean.enter(lockfile(chroot_src_lockfile(dist, arch)))
- run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c", """
+ run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c",
+ DEBCONF_TWEAKS + """
apt-get update
apt-get -y dist-upgrade
apt-get -y autoremove
## Make sure the donor tree is up-to-date, and install the extra
## packages we need.
progress("install tools packages")
- run_schroot_session(session, ["eatmydata", "sh", "-e", "-c", """
+ run_schroot_session(session, ["eatmydata", "sh", "-e", "-c",
+ DEBCONF_TWEAKS + """
apt-get update
apt-get -y upgrade
apt-get -y install "$@"
try: dest = dest[:dest.rindex("/")]
except ValueError: dest = ""
if path == "": path = link
- else: path = "%s/%s" % (path, link)
+ else: path = "%s/%s" % (link, path)
## Work through the shopping list, copying the things it names into the
## cross-tools tree.