From 209403e32bdd6164404240af2959de86a3c46165 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 22 Dec 2020 16:13:45 -0500 Subject: [PATCH] 16306: Comment why rm instead of exclude. Delete go tools, too. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- cmd/arvados-dev/buildpackage.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/arvados-dev/buildpackage.go b/cmd/arvados-dev/buildpackage.go index 93482e1c7a..76228324ee 100644 --- a/cmd/arvados-dev/buildpackage.go +++ b/cmd/arvados-dev/buildpackage.go @@ -69,8 +69,11 @@ func (bldr *builder) run(ctx context.Context, prog string, args []string, stdin if err != nil { return fmt.Errorf("gem install fpm: %w", err) } - // Shrink our package, remove unneeded stuff - cmd = exec.Command("bash", "-c", "rm -rf /var/www/.gem/ruby/*/cache/ /var/www/.gem/ruby/*/bundler/gems/arvados-*/.git /var/www/.gem/ruby/*/bundler/gems/nulldb-*/.git /var/www/.gem/ruby/*/bundler/gems/themes_for_rails-*/.git") + + // Remove unneeded files. This is much faster than "fpm + // --exclude X" because fpm copies everything into a staging + // area before looking at the --exclude args. + cmd = exec.Command("bash", "-c", "cd /var/www/.gem/ruby && rm -rf */cache */bundler/gems/*/.git /var/lib/arvados/go") cmd.Stdout = stdout cmd.Stderr = stderr err = cmd.Run() @@ -93,12 +96,9 @@ func (bldr *builder) run(ctx context.Context, prog string, args []string, stdin cmd.Args = append(cmd.Args, "--depends", pkg) } cmd.Args = append(cmd.Args, + "--verbose", "--deb-use-file-permissions", "--rpm-use-file-permissions", - "--exclude", "var/lib/arvados/go", - "--exclude", "tmp", - "--exclude", "log", - "--exclude", "coverage", "/var/lib/arvados", "/var/www/.gem", "/var/www/.passenger", -- 2.30.2