Message ID | 20190913155116.19225-2-ludo@gnu.org |
---|---|
State | Accepted |
Headers | show |
Series | 'guix pack -f docker' uses a meaningful "repository name" | expand |
Ludovic Courtès <ludo@gnu.org> writes: > * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): > Reverse order of packages taken fro OPTS. Typo: “from”. > - (filter-map maybe-package-argument opts))) > + (reverse > + (filter-map maybe-package-argument opts)))) Why is this necessary?
Ricardo Wurmus <rekado@elephly.net> skribis: > Ludovic Courtès <ludo@gnu.org> writes: > >> * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): >> Reverse order of packages taken fro OPTS. > > Typo: “from”. > >> - (filter-map maybe-package-argument opts))) >> + (reverse >> + (filter-map maybe-package-argument opts)))) > > Why is this necessary? It’s mostly so that if you do ‘guix pack -f docker sed grep findutils’ the repo name is “sed-grep-findutils” and not “findutils-grep-sed”. Ludo’.
Hi, That really nice! Thank you. On Sat, 14 Sep 2019 at 11:43, Ludovic Courtès <ludo@gnu.org> wrote: > It’s mostly so that if you do ‘guix pack -f docker sed grep findutils’ > the repo name is “sed-grep-findutils” and not “findutils-grep-sed”. It is not in the doc, right? If I want to create a "profile" with a meaningful name, then the order after '-f' becomes important. Maybe one line explaining, something like: (current doc) The result is a tarball that can be passed to the ‘docker load’ command. See the Docker documentation (https://docs.docker.com/engine/reference/commandline/load/) for more information. (addition) Note that the profile name is built using the package names. Well, and what happens if there is 10 or more packages? Is the name trimmed? All the best, simon
Hi, zimoun <zimon.toutoune@gmail.com> skribis: > On Sat, 14 Sep 2019 at 11:43, Ludovic Courtès <ludo@gnu.org> wrote: > >> It’s mostly so that if you do ‘guix pack -f docker sed grep findutils’ >> the repo name is “sed-grep-findutils” and not “findutils-grep-sed”. > > It is not in the doc, right? > If I want to create a "profile" with a meaningful name, then the order > after '-f' becomes important. Maybe one line explaining, something > like: > > (current doc) > The result is a tarball that can be passed to the ‘docker load’ command. > See the Docker documentation > (https://docs.docker.com/engine/reference/commandline/load/) for more > information. > (addition) > Note that the profile name is built using the package names. Good idea, I’ve committed something along these lines. > Well, and what happens if there is 10 or more packages? Is the name trimmed? Yes, it’s trimmed (there are apparently no hard limits but the output of “docker images” becomes hard to read if the first column is too wide.) Ludo’.
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index ed8c177055..2543f0c0b5 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -957,7 +957,8 @@ Create a bundle of PACKAGE.\n")) (list (transform store package) output)) ((? package? package) (list (transform store package) "out"))) - (filter-map maybe-package-argument opts))) + (reverse + (filter-map maybe-package-argument opts)))) (manifest-file (assoc-ref opts 'manifest))) (define properties (if (assoc-ref opts 'save-provenance?)