Skip to content

Commit 6c2294d

Browse files
committed
Do not overwrite var/install.log
1 parent 5dca443 commit 6c2294d

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

bin/gbuild

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def info(str)
3636
end
3737

3838
def build_one_configuration(suite, arch, build_desc)
39+
FileUtils.rm_f("var/install.log")
3940
FileUtils.rm_f("var/build.log")
4041

4142
bits = @bitness[arch] or raise "unknown architecture ${arch}"
@@ -97,26 +98,26 @@ EOF" if build_desc["sudo"] and @options[:allow_sudo]
9798
if build_desc["multiarch"]
9899
info "Adding multiarch support (log in var/install.log)"
99100
for a in build_desc["multiarch"]
100-
system! "on-target -u root dpkg --add-architecture #{a} > var/install.log 2>&1"
101+
system! "on-target -u root dpkg --add-architecture #{a} >> var/install.log 2>&1"
101102
end
102103
end
103104

104105
info "Updating apt-get repository (log in var/install.log)"
105-
system! "on-target -u root apt-get update > var/install.log 2>&1"
106+
system! "on-target -u root apt-get update >> var/install.log 2>&1"
106107

107108
info "Installing additional packages (log in var/install.log)"
108-
system! "on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install #{build_desc["packages"].join(" ")} > var/install.log 2>&1"
109+
system! "on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install #{build_desc["packages"].join(" ")} >> var/install.log 2>&1"
109110

110111
if build_desc["alternatives"]
111112
info "Set alternatives (log in var/install.log)"
112113
for a in build_desc["alternatives"]
113-
system! "on-target -u root update-alternatives --set #{a["package"]} #{a["path"]} > var/install.log 2>&1"
114+
system! "on-target -u root update-alternatives --set #{a["package"]} #{a["path"]} >> var/install.log 2>&1"
114115
end
115116
end
116117

117118
if @options[:upgrade] || system("on-target -u root '[ ! -e /var/cache/gitian/initial-upgrade ]'")
118-
info "Upgrading system, may take a while"
119-
system! "on-target -u root bash < target-bin/upgrade-system.sh > var/install.log 2>&1"
119+
info "Upgrading system, may take a while (log in var/install.log)"
120+
system! "on-target -u root bash < target-bin/upgrade-system.sh >> var/install.log 2>&1"
120121
end
121122
info "Creating package manifest"
122123
system! "on-target -u root bash < target-bin/grab-packages.sh > var/base-#{suitearch}.manifest"

0 commit comments

Comments
 (0)