Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: cipd/client/cmd/cipd/main.go

Issue 2654123005: [cipd] update internal function signatures in preparation for subdir. (Closed)
Patch Set: root->subdir Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cipd/client/cmd/cipd/friendly.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cipd/client/cmd/cipd/main.go
diff --git a/cipd/client/cmd/cipd/main.go b/cipd/client/cmd/cipd/main.go
index 61e1d674a0c9cb168d1da73e32b4248f75e16ee0..19d9a04f8edf920b4120c76f833191d175612af9 100644
--- a/cipd/client/cmd/cipd/main.go
+++ b/cipd/client/cmd/cipd/main.go
@@ -730,7 +730,7 @@ func (c *ensureRun) Run(a subcommands.Application, args []string, env subcommand
return c.done(currentPins, err)
}
-func ensurePackages(ctx context.Context, root string, desiredStateFile string, dryRun bool, clientOpts ClientOptions) ([]common.Pin, cipd.Actions, error) {
+func ensurePackages(ctx context.Context, root string, desiredStateFile string, dryRun bool, clientOpts ClientOptions) (common.PinSlice, cipd.Actions, error) {
f, err := os.Open(desiredStateFile)
if err != nil {
return nil, cipd.Actions{}, err
@@ -770,13 +770,14 @@ func ensurePackages(ctx context.Context, root string, desiredStateFile string, d
if err := resolved.PackagesBySubdir.AssertOnlyDefaultSubdir(); err != nil {
return nil, cipd.Actions{}, err
}
- baseSubdir := resolved.PackagesBySubdir[""]
- actions, err := client.EnsurePackages(ctx, baseSubdir, dryRun)
+ actions, err := client.EnsurePackages(ctx, resolved.PackagesBySubdir, dryRun)
if err != nil {
return nil, actions, err
}
- return baseSubdir, actions, nil
+
+ // TODO(iannucci): fix 'dump' format so that it can contain subdir information
+ return resolved.PackagesBySubdir[""], actions, nil
}
////////////////////////////////////////////////////////////////////////////////
@@ -1514,7 +1515,9 @@ func deployInstanceFile(ctx context.Context, root string, instanceFile string) (
d := local.NewDeployer(root)
defer d.CleanupTrash(ctx)
- return d.DeployInstance(ctx, inst)
+ // TODO(iannucci): add subdir arg to deployRun
+
+ return d.DeployInstance(ctx, "", inst)
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « cipd/client/cmd/cipd/friendly.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698