17344: Run `ls -l newpkg.deb` on host instead of container.
authorTom Clegg <tom@curii.com>
Thu, 8 Sep 2022 14:19:01 +0000 (10:19 -0400)
committerTom Clegg <tom@curii.com>
Thu, 8 Sep 2022 14:19:01 +0000 (10:19 -0400)
This way the displayed path reflects the final package location on the
host, rather than the path inside the fpm container where the build
command's tempdir is bind-mounted.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

cmd/arvados-package/build.go
cmd/arvados-package/fpm.go

index 9841c890b78a9f8363817d135e915bea29c6b472..2ce8a674322dedf410b331b496a7e31987ff01a1 100644 (file)
@@ -133,6 +133,13 @@ func build(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Wr
        if err != nil {
                return err
        }
+       cmd = exec.CommandContext(ctx, "ls", "-l", opts.PackageDir+"/"+packageFilename)
+       cmd.Stdout = stdout
+       cmd.Stderr = stderr
+       err = cmd.Run()
+       if err != nil {
+               return err
+       }
 
        return nil
 }
index 64d0adabe39190452891db68ee6eeb91d20717ee..0b13b15c1e2df4047bf6782b383c62d06af1c8e2 100644 (file)
@@ -142,10 +142,5 @@ func fpm(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Writ
                }
        }
 
-       cmd = exec.Command("ls", "-l", pkgfile)
-       cmd.Stdout = stdout
-       cmd.Stderr = stderr
-       _ = cmd.Run()
-
        return nil
 }