all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19219: Package names with digits following dashes
@ 2014-11-29 20:31 Andreas Enge
  2014-12-06 23:38 ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Andreas Enge @ 2014-11-29 20:31 UTC (permalink / raw)
  To: 19219

Trying to rename the font-adobe100dpi package to font-adobe-100dpi
(which is the correct name given our font conventions and even before),
I noticed the following problem:
guix build font-adobe-100dpi
looks in vain for a version 100dpi of the package named font-adobe.
The problem only occurs with digits following the dash; font-adobe-xdpi
would work.

I think we need a more sophisticated mechanism for separating package names
and versions, such as this:
- Try the compete string as a package name.
- If it does not exist, treat the part after the last dash as a version and
  the part before the last dash as the name.

One could continue recursively to the second to last dash and so on, but
I think it would be easier to prohibit dashes as part of version names.

Andreas

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2014-11-29 20:31 bug#19219: Package names with digits following dashes Andreas Enge
@ 2014-12-06 23:38 ` Ludovic Courtès
  2015-12-08 18:42   ` Mathieu Lirzin
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2014-12-06 23:38 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 19219, request

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

tag 19219 patch
thanks

Andreas Enge <andreas@enge.fr> skribis:

> I think we need a more sophisticated mechanism for separating package names
> and versions, such as this:
> - Try the compete string as a package name.
> - If it does not exist, treat the part after the last dash as a version and
>   the part before the last dash as the name.

Attached is the beginning of a patch to do that.

However, there are users of ‘package-specification->name+version+output’
that still need to be adjusted, such as Emacs (in guix-main.scm.)  Also,
the responsibility of trying NAME-VERSION is on each caller, which is
not really satisfying.

I’ll ponder it some more.  Suggestions welcome.

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3309 bytes --]

diff --git a/gnu/packages.scm b/gnu/packages.scm
index c9efd0d..25f1221 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -370,19 +370,24 @@ but ~a is available upstream~%")
   "Return a package matching SPEC.  SPEC may be a package name, or a package
 name followed by a hyphen and a version number.  If the version number is not
 present, return the preferred newest version."
-  (let-values (((name version)
-                (package-name->name+version spec)))
+  (define (lookup name version)
     (match (find-best-packages-by-name name version)
-      ((p)                                      ; one match
+      ((p)                                        ;one match
        p)
-      ((p x ...)                                ; several matches
+      ((p x ...)                                  ;several matches
        (warning (_ "ambiguous package specification `~a'~%") spec)
        (warning (_ "choosing ~a from ~a~%")
                 (package-full-name p)
                 (location->string (package-location p)))
        p)
-      (_                                        ; no matches
-       (if version
-           (leave (_ "~A: package not found for version ~a~%")
-                  name version)
-           (leave (_ "~A: unknown package~%") name))))))
+      (_                                          ;no matches
+       #f)))
+
+  (let-values (((name version)
+                (package-name->name+version spec)))
+    (or (lookup name version)
+        (if version
+            (or (lookup spec #f)
+                (leave (_ "~A: package not found for version ~a~%")
+                       name version))
+            (leave (_ "~A: unknown package~%") name)))))
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 21dc66c..ae11ee2 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -296,8 +296,7 @@ version; if SPEC does not specify an output, return OUTPUT."
                (package-full-name p)
                sub-drv)))
 
-  (let-values (((name version sub-drv)
-                (package-specification->name+version+output spec output)))
+  (define (lookup name version sub-drv)
     (match (find-best-packages-by-name name version)
       ((p)
        (values p (ensure-output p sub-drv)))
@@ -309,7 +308,26 @@ version; if SPEC does not specify an output, return OUTPUT."
                 (location->string (package-location p)))
        (values p (ensure-output p sub-drv)))
       (()
-       (leave (_ "~a: package not found~%") spec)))))
+       (values #f #f))))
+
+  (define (fail)
+    (leave (_ "~a: package not found~%") spec))
+
+  (let-values (((name version sub-drv)
+                (package-specification->name+version+output spec output)))
+    (let-values (((package output) (lookup name version sub-drv)))
+      (cond
+       ((package? package)
+        (values package output))
+       (version
+        (let-values (((package output)
+                      (lookup (string-append name "-" version) #f
+                              sub-drv)))
+          (if package
+              (values package output)
+              (fail))))
+       (else
+        (fail))))))
 
 (define (upgradeable? name current-version current-path)
   "Return #t if there's a version of package NAME newer than CURRENT-VERSION,

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2014-12-06 23:38 ` Ludovic Courtès
@ 2015-12-08 18:42   ` Mathieu Lirzin
  2015-12-10 13:36     ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Mathieu Lirzin @ 2015-12-08 18:42 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219, request

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> Andreas Enge <andreas@enge.fr> skribis:
>
>> I think we need a more sophisticated mechanism for separating package names
>> and versions, such as this:
>> - Try the compete string as a package name.
>> - If it does not exist, treat the part after the last dash as a version and
>>   the part before the last dash as the name.
>
> Attached is the beginning of a patch to do that.
>
> However, there are users of ‘package-specification->name+version+output’
> that still need to be adjusted, such as Emacs (in guix-main.scm.)  Also,
> the responsibility of trying NAME-VERSION is on each caller, which is
> not really satisfying.
>
> I’ll ponder it some more.  Suggestions welcome.

I had the same issue when trying to create a package named
'rxvt-unicode-256-color'.  I have tried to fix
‘package-name->name+version’ by matching the last hyphen and check if
the next character is a number.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-PRELIM-utils-Fix-version-detection.patch --]
[-- Type: text/x-diff, Size: 1991 bytes --]

From 1c7d036cc7ef310bc57bbde490d41b12d01f38a4 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Mon, 7 Dec 2015 05:20:08 +0100
Subject: [PATCH] PRELIM: utils: Fix version detection.

---
 guix/build/utils.scm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e3f9edc..717c88b 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -100,25 +100,28 @@ is typically a \"PACKAGE-VERSION\" string."
                (+ 34 (string-length (%store-directory)))))
 
 (define (package-name->name+version name)
-  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
-\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
-#f are returned.  The first hyphen followed by a digit is considered to
-introduce the version part."
+  "Given NAME, a package name like \"foo-0.9.1b\", return two values: \"foo\"
+and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
+returned.  The last hyphen followed by some digits is considered to introduce
+the version part."
   ;; See also `DrvName' in Nix.
 
   (define number?
     (cut char-set-contains? char-set:digit <>))
 
-  (let loop ((chars   (string->list name))
-             (prefix '()))
+  (let loop ((chars   (reverse (string->list name)))
+             (suffix '()))
     (match chars
       (()
        (values name #f))
-      ((#\- (? number? n) rest ...)
-       (values (list->string (reverse prefix))
-               (list->string (cons n rest))))
+      ((#\- rest ...)
+       (match suffix
+         (((? number? s1) s2 ...)
+          (values (list->string (reverse rest))
+                  (list->string suffix)))
+         (_ (values name #f))))
       ((head tail ...)
-       (loop tail (cons head prefix))))))
+       (loop tail (cons head suffix))))))
 
 (define parallel-job-count
   ;; Number of processes to be passed next to GNU Make's `-j' argument.
-- 
2.6.3


[-- Attachment #3: Type: text/plain, Size: 19547 bytes --]


The result was a fail attempt to rebuild the earth:

--8<---------------cut here---------------start------------->8---
mthl@godel:~/src/gnu/guix$ ./pre-inst-env guix build -K rxvt-unicode-256-color
substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
Les dérivations suivantes seront compilées:
   /gnu/store/b3zv46ini53j6icpnzmd17shky4fx6b5-rxvt-unicode-256-color-9.21.drv
   /gnu/store/8j2csyqy2f74cnq59lw78hk1l3ag36ah-expat-2.1.0.tar.xz.drv
   /gnu/store/5rnsqky3a8kmz3zgvj16pmvmazf23223-libxml2-2.9.2.tar.xz.drv
   /gnu/store/3r4djy1y1lq0pa8war89ahvmar5y5azj-libgpg-error-1.19.drv
   /gnu/store/akah1zs8pxwafwzbpq4c6v0l009n4a92-libgcrypt-1.6.3.drv
   /gnu/store/c2k690cnfi31vh7gfjcq773anigl37my-libxml2-2.9.2.drv
   /gnu/store/kjk3dq19pazvnhmlv6259ln6mhhqlm03-libxslt-1.1.28.tar.xz.drv
   /gnu/store/hxmgd3z01xnk1jvfsldvlylcvl7gmgy4-openssl-1.0.2d.tar.xz.drv
   /gnu/store/gwm6hzyhc8y5jyqja46nz1ab17lbvy8i-zlib-1.2.7.drv
   /gnu/store/rj28q5fw37v6qhcbwryq1k6bi2qr2z6s-Python-3.4.3.tar.xz.drv
   /gnu/store/zad1p8j5jabvq6acvaa4bp8s8bb9nlhq-openssl-1.0.2d.drv
   /gnu/store/2vzrshxnzasfv6vjkjj1x1qravf51cg3-python-minimal-3.4.3.drv
   /gnu/store/8w4v18895iiikjk4xb55d4mbwq655ix3-xcb-proto-1.11.drv
   /gnu/store/d6dpq3jnchbhmsal9s6vifg794lspbs1-python-wrapper-3.4.3.drv
   /gnu/store/skk30najhll63385vdzk9s5x8kkcajpb-libxslt-1.1.28.drv
   /gnu/store/phy9xyxcanmwksgmlj8xi8swwdazrq2r-gs-fonts-8.11.drv
   /gnu/store/afxqxpg7yldx5mrsrp73r190sfxiqafj-inputproto-2.3.1.drv
   /gnu/store/b7f6jzqvmkn3chwbq1i95ph4cvzslcwv-xtrans-1.3.5.drv
   /gnu/store/r00m0yki2b1xmf4xz43my107gxj7yrvw-xextproto-7.3.0.drv
   /gnu/store/xdj2iys20pwdayyw3lvjchxaqccj3gi9-gzip-1.6.drv
   /gnu/store/qjvjxmi84rmfn5mvjbhpbh10q24brani-gettext-boot0-0.19.6.drv
   /gnu/store/6jrzlx643a8y3rlwbdlfzsqv3ayjy3y7-indent-2.2.10.drv
   /gnu/store/lc89xky5bx2liji5kra8nyapgv3phzvr-flex-2.5.37.tar.xz.drv
   /gnu/store/rwd3q7966g2x2ylhlvrsk6sdjnj6h532-bison-2.7.1.drv
   /gnu/store/1bsm9z6lkl4gbmp1yd4xhqmrj5lfwhf0-perl-5.16.1.drv
   /gnu/store/r1x13yyjfzgk19y033lvlansb61qsavg-flex-2.5.37.drv
   /gnu/store/38vb3w7jzz7cvyrgygna1p4kzbrkm5fw-m4-1.4.17.drv
   /gnu/store/8ckg52fggmd7c4lf2bv3gxa2z201sf02-bison-3.0.4.drv
   /gnu/store/n6gvf7c4z05y3ia3jqsrz9j29n1infky-readline-6.3.drv
   /gnu/store/yf64y8g7zbjjlcrls120d2ncbg03g8a9-ncurses-6.0.drv
   /gnu/store/6wxpvmlb7g4haf37280l6bdiqsbz8php-pkg-config-0.28.drv
   /gnu/store/7g5a05072khdrr67mb9rc8f2s7rra9sp-expat-2.1.0.tar.xz.drv
   /gnu/store/hgjsmx0yv25zpnwkm7yvjhn1zlfawx43-expat-2.1.0.drv
   /gnu/store/2k5lh7m8vixhysq8afg50bs7pl0jv5py-attr-2.4.46.drv
   /gnu/store/aa30r852nlzqy8wqklykhbda4svpyij5-acl-2.2.52.src.tar.xz.drv
   /gnu/store/kg0rgja7vi01v4p9hgahpdrxsqryzzwk-gettext-0.19.6.drv
   /gnu/store/c7rafddhbi8shfjd14c7cv0y1jdncaaj-m4-1.4.17.drv
   /gnu/store/a37vf710ygdv2jaq63xghih6mryxpm35-gmp-6.0.0a.drv
   /gnu/store/j39dnpislqll7g8x739qslkjlbbl77w4-perl-5.16.1.drv
   /gnu/store/kk9dj99mql89f4h45zmkdnpvsh7c2amb-coreutils-8.24.tar.xz.drv
   /gnu/store/s6gbc9n2if8b0yqp8w94x2va2ygza45i-acl-2.2.52.drv
   /gnu/store/w9lib8z4lyk1f2aa9nh6vf3m1429vw7v-libcap-2.24.drv
   /gnu/store/n1g3mm81i2z51z580dk45xkadd9y30wh-grep-2.21.tar.xz.drv
   /gnu/store/bjlrn0a9q6653kvsdzqi44hzgdja42g1-libsigsegv-2.10.drv
   /gnu/store/ky6mn000zxnbbwacwlxnmpirbwcj5dym-sed-4.2.2.tar.xz.drv
   /gnu/store/gmjanqpb0b1s65ai7b5lr4iz1im2pbr7-lzip-1.16.drv
   /gnu/store/19mxk6s5p4g1cxfvqk8z3c9292b7kxqj-patch-2.7.5.tar.xz.drv
   /gnu/store/q3dfm50qilm8k9yhlpac6jf8my78phz6-ed-1.12.drv
   /gnu/store/d43c38p9ljs33i0dpn43n49mzll6x60g-module-import.drv
   /gnu/store/lxhw0rjdgl4h74301nmjing5zysysbyg-module-import-compiled.drv
   /gnu/store/r9cc4rd5li8qiwjrn3b04dymz21zclb5-gzip-1.6.drv
   /gnu/store/crzjkm3vjj4v1lqwr8k9c6xp2r14hgp7-tar-1.28.tar.xz.drv
   /gnu/store/rsfvqnws7xbydjzv90iyb9di9pk46g3l-glibc-utf8-locales-2.22.drv
   /gnu/store/cbf1skg1cr005xj9d17396pviaprv988-module-import-compiled.drv
   /gnu/store/pplcmjbzbr93wdzd8y4brwf2bi02sdl0-module-import.drv
   /gnu/store/80b5ka2vw78lfa1pk12j9mscnm6f099k-perl-5.16.1.tar.xz.drv
   /gnu/store/qz9c8h7mvzbsfk73i2kwjvzqbp29c6n9-libatomic-ops-7.4.2.drv
   /gnu/store/mh4zp5ryvlhfwr5sd8jawyrzi2r0gxaz-m4-1.4.17.drv
   /gnu/store/h8przrpw0gzfj4a2plnsg757pady3j98-readline-6.3.tar.xz.drv
   /gnu/store/5m4irwifpwxqhp6ljcbrvvpmxscwrzz3-make-4.1.tar.xz.drv
   /gnu/store/55ckmn7ya4askz4b5q0a2c54x1fb6l5n-findutils-4.4.2.tar.xz.drv
   /gnu/store/wlxsp7z8ahknh2wyyx62wf684az3hd8s-glibc-2.22.tar.xz.drv
   /gnu/store/dcfksz0an9yd6ypdms4nf5v2vcn8flm0-perl-5.16.1.drv
   /gnu/store/a9biqnpx060j6nmii4csisa5lnq16slr-bison-3.0.4.drv
   /gnu/store/h9ssvwdrl03dg8cxm928xdlxfj6vyw63-m4-1.4.17.drv
   /gnu/store/i6b01h7rgd7zgvzzak2rpahkjahzf8vv-bash-4.3.tar.xz.drv
   /gnu/store/k2w5c6pc53ddwv9rn10gwsn9in89jka7-gcc-cross-boot0-wrapped-4.9.3.drv
   /gnu/store/n1nkh6sq52mcs9k6wxilbb7288rn9vrk-glibc-intermediate-2.22.drv
   /gnu/store/i9wk20fhfqg6n7lxdazqn58q0068jnyz-gcc-cross-boot0-4.9.3.drv
   /gnu/store/v2lgka9vxb4qn55l6w189f82c1piwj3h-perl-5.16.1.tar.xz.drv
   /gnu/store/akz50ri34dp81iwhjsng2sifbawd9hv5-xz-5.0.4.drv
   /gnu/store/x8zyvgd77cg1bz5hnd18kqvc6djlv5zk-perl-5.16.1.drv
   /gnu/store/1s7fn2gpfp0ag5igqlxspqdicn2q72yj-texinfo-6.0.drv
   /gnu/store/8lk4w91vy5icmjgcdmbpm8p1h77gmadm-gcc-cross-boot0-wrapped-4.9.3.drv
   /gnu/store/8p2rmf7w2azh3px6sdc7gjhiial9i9v9-gcc-4.9.3.tar.xz.drv
   /gnu/store/sir4zzx412sks2fgsh3c0y583hiyfhkx-bash-static-4.3.39.drv
   /gnu/store/xivdnbs9prqs523zlv5my9w2k13g5cbp-libstdc++-4.9.3.drv
   /gnu/store/xxprcifxw1wk6mxhnvrxrv6k7r8zgsgf-gmp-6.0.0a.tar.xz.drv
   /gnu/store/84ada1zdrs1z91z6v9z5xj22slam4nxc-module-import-compiled.drv
   /gnu/store/8aad5ydzh1hx9dr18yws360qjdqjc4cx-module-import.drv
   /gnu/store/35al8r8431zkc933rrxd0l6d1db8xnfs-binutils-bootstrap-0.drv
   /gnu/store/7q4xn8c1s10wsl358swh2356ag84a7y0-glibc-bootstrap-0.drv
   /gnu/store/i19jihpa9hv5lmpq5h7bgd9505m8srbx-gcc-bootstrap-0.drv
   /gnu/store/inviyrvi0jkv4fl6czydvabv6b1nj0p5-binutils-2.25.1.tar.xz.drv
   /gnu/store/4qh015x4x9xf2l3n5di2wh9qdd70xqgd-module-import-compiled.drv
   /gnu/store/dfa4293g2n8nw4a8dm8v85g0b63qzwml-module-import.drv
   /gnu/store/6g5v8hb5j615d2350mjqlgmpy4nriqsl-pkg-config-0.28.drv
   /gnu/store/8h8md6x1rlhlz8cmvz8g2zcp2j45j8la-guile-2.0.11.tar.xz.drv
   /gnu/store/ala9ppkdm09dix70x69cqlyww24szpq8-binutils-cross-boot0-2.25.1.drv
   /gnu/store/csc18bnkscl0qaajz292wcjm5mwkbzy4-gcc-4.9.3.drv
   /gnu/store/dahin5amv1rsbcsd2k1rck08xwrf89gd-findutils-4.4.2.drv
   /gnu/store/fsankw4x5fp1kkvhdrpf7xhnsm2srsdd-make-boot0-4.1.drv
   /gnu/store/h8i287b81pbs9bssh4c6ad2v51vq1ch7-libffi-3.1.drv
   /gnu/store/h8z1dgs0fdsfkk8xks6v58z4xz5k55z5-diffutils-3.3.drv
   /gnu/store/j17h8n2qby0q70wrwpkkvm24c8dcxnld-module-import.drv
   /gnu/store/j8414pfdiqfkbkpfwk4ip0cavld35kmp-file-5.22.drv
   /gnu/store/m31wanlfgirmvq2kw8rj1wb7pxxfps6w-libltdl-2.4.6.drv
   /gnu/store/mj4ahd71l08ypjvg6qawf3hbfc3vnnwp-readline-6.3.drv
   /gnu/store/msi8i2348n5khwvyxr72hq5nnfbkwj3g-module-import-compiled.drv
   /gnu/store/n0fayygdvrjlzfxv4mqsm9924pbbn86c-gmp-6.0.0a.drv
   /gnu/store/nzh0a8l2n7wif1n0wy2q5ixp7pxy65l2-bootstrap-binaries-0.drv
   /gnu/store/p30px7xm9v2ha8gv80n9kpz2gqkqgkp2-ld-wrapper-boot3-0.drv
   /gnu/store/wzl21wm81q0l2583dbzg60jwaqa41q68-ncurses-6.0.drv
   /gnu/store/xaxrm0c4ha5wdhgy1imdfsc4y3d5fjsq-libgc-7.4.2.drv
   /gnu/store/ym66xj2s2wi5sy555b1ppr41n1n6y741-libunistring-0.9.6.drv
   /gnu/store/6ckhnjkrk0w8ivsqqn650p9nvqmlw39i-guile-2.0.11.drv
   /gnu/store/m7r4syanb98yyf83pzw8s7wkb1689myy-ncurses-6.0.drv
   /gnu/store/kkx13lmrpsxc36b030ljpqf46297zl5c-perl-5.16.1.drv
   /gnu/store/8dhrvqri54bifzjp0b8lcsjsnn7wmxxr-pkg-config-0.28.drv
   /gnu/store/dy9v8sl8cq8q34567l4dn4dq6p67mxxc-tar-1.28.drv
   /gnu/store/zhyxhq3c0cl9wh0dy9253ks6jmsrbhhk-gzip-1.6.drv
   /gnu/store/pnv38sskq3qm9i11cps3plnnfkf6kx14-bzip2-1.0.6.drv
   /gnu/store/7myf60idmlwx95qqfl0wk2vvg0n71mdy-xz-5.0.4.drv
   /gnu/store/c1ch9jzrj0vrgwnf56wgmp0mw81067li-file-5.22.drv
   /gnu/store/6vxs9vpakdi4h2sdwmmlsis3w83z596i-diffutils-3.3.drv
   /gnu/store/zwjkymgzvlvq1mqbjpcwjbkv7jms190g-patch-2.7.5.drv
   /gnu/store/qj1rsdcc5i2n91gzllg3d1r2apcagp4f-sed-4.2.2.drv
   /gnu/store/d6s931cp43pdppgl8c7mpnbm3ag2w82i-findutils-4.4.2.drv
   /gnu/store/1z5pqvkd66dwwm9yi8zw1s5x7v508pjj-gawk-4.1.3.drv
   /gnu/store/7qgfzpmiwln3hwcpz6hy0yzad7w4vaq3-grep-2.21.drv
   /gnu/store/4fv98wlv58gr5zkxzsszc4ndq5hdwvv5-coreutils-8.24.drv
   /gnu/store/is5gkglsyczqi45x3719211wd48cij96-make-4.1.drv
   /gnu/store/vkr0r05w07p5jn80gz1hfph0flpv3abv-bash-4.3.39.drv
   /gnu/store/jb7bcsnis9s383zx6rpvqhkvvzghys6v-ld-wrapper-0.drv
   /gnu/store/7y1gii2cpaa5rzgb01nzvpms4vghfvzh-binutils-2.25.1.drv
   /gnu/store/i9j2q1w8gkx2z2cpc4d06zb4j1ba07fk-gcc-4.9.3.drv
   /gnu/store/dsq7i94k4xn0igj1hwkrd6lbplj8sbgv-glibc-2.22.drv
   /gnu/store/sl680k0ijx0hi7ixn40yac0csr503bbs-glibc-utf8-locales-2.22.drv
   /gnu/store/9wm00w0052rlsz3d3wd5v7vfwviwp08h-libxft-2.3.2.drv
   /gnu/store/ic4w7yfma7hz6ypakgb7iinb465rr3lp-libx11-1.6.2.drv
   /gnu/store/1y8szkj0vnj3pk4w1wzgj8gw63r4r4wk-linux-libre-headers-3.14.37.drv
   /gnu/store/8dnmcd8lcgwgkih23xv46ijd9hgh9v8s-fontconfig-2.11.94.drv
   /gnu/store/q4mzadajz948qh37aazhadn3x6127sr3-freetype-2.6.drv
   /gnu/store/xrr4yga4vl2kkmxiyja4wk7zz6limwr6-libxrender-0.9.8.drv
   /gnu/store/4b2gpjs9aqhaic8lc4798xrijsfmb5lq-libxcb-1.11.drv
   /gnu/store/29zrb2dcfnr5h61msxjyk052a8wi6zj9-kbproto-1.0.6.drv
   /gnu/store/b3c76cv2wmdipamssfhiw3r253763ix7-expat-2.1.0.drv
   /gnu/store/1465cclkh3c8sc8bsdsy1gnm29n9sad0-renderproto-0.11.1.drv
   /gnu/store/7q49x70vdy4kgqqkqplrzwf1nvb90mxl-libxdmcp-1.1.1.drv
   /gnu/store/4b2x996m3gdx1gs01d2diqm2dmdfz4ab-libxau-1.0.8.drv
   /gnu/store/ih5n2vy79kfx079phhh746yymzqv7d0p-libpthread-stubs-0.3.drv
   /gnu/store/5x33jkr6gjq3jh9rzm0i6jlgmbn4dj66-xproto-7.0.26.drv
   /gnu/store/cknx55i004zpiy08lyf77gylsv22ypil-util-macros-1.19.0.drv
   /gnu/store/p48nn50r5zxwanhivwhjflri1lkvhzd0-module-import.drv
   /gnu/store/ly68jp4xnwkxhm819ziwhn8x9z11lvxx-module-import-compiled.drv
Les fichiers suivants seront téléchargés:
   /gnu/store/3h4krhn4k2dm6bxh8p2l1hqbaab1li69-util-macros-1.19.0.tar.bz2
   /gnu/store/x1gj4kzwmsi3r34bsmymhb71fwdw7naq-xproto-7.0.26.tar.bz2
   /gnu/store/1xyi1l5n53mvx6ad1iy71fj6z0i4cbl9-libpthread-stubs-0.3.tar.bz2
   /gnu/store/wlhqy843wnd73znkahpix7p44krcsydy-libXau-1.0.8.tar.bz2
   /gnu/store/nn0gc6bljmp5z9q87h0zx62lx4r6af0n-libXdmcp-1.1.1.tar.bz2
   /gnu/store/7xy8zihsgr8ilzrw2n3dyai58wpkrir1-renderproto-0.11.1.tar.bz2
   /gnu/store/n3n1w8avlc41qgy886sxhdkk6lamipvk-expat-2.1.0.tar.gz
   /gnu/store/4kvacx6lvdr7jpzm65g1qn0sqm822z41-kbproto-1.0.6.tar.bz2
   /gnu/store/4gqp60hijd53j1nl0ybsbq8kw5b6f2wr-libxslt-1.1.28.tar.gz
   /gnu/store/d35cqram5gh8h6nr8qb09y6kpaqn9n3b-libxml2-2.9.2.tar.gz
   /gnu/store/dhpnla367mpj5pycd7kglgbyrjxsdx70-libgcrypt-1.6.3.tar.bz2
   /gnu/store/1hm09ywaa8s3qli067jqd1rkh4431411-libgpg-error-1.19.tar.bz2
   /gnu/store/hwcxisl3njd8nnmnn0rrrn5qr2ixy8d5-xcb-proto-1.11.tar.bz2
   /gnu/store/07g62p2a5q8ppx4q9h5jwhri1gck5lyf-openssl-1.0.2d.tar.gz
   /gnu/store/gbjq0sxwzh9z1hna7h1c8d1b1b85py06-Python-3.4.3.tar.xz
   /gnu/store/gpvn3cp4h885hlxpl5qnjgfs25vcs1w6-zlib-1.2.7.tar.gz
   /gnu/store/3jch0bhr64c8lm1y6ap385p4hggxq2r8-libxcb-1.11.tar.bz2
   /gnu/store/za9s0pjy549hdns5qr0ryn7lj9fyfiac-libXrender-0.9.8.tar.bz2
   /gnu/store/fv9ikikgqfc6w9nmc8q3jl77g1ap6422-freetype-2.6.tar.bz2
   /gnu/store/z483nc9b6w9h261w7wqq8mc6p7pvwldk-ghostscript-fonts-std-8.11.tar.gz
   /gnu/store/v55hic2g257hk2bc5bmr9abslf649pc0-fontconfig-2.11.94.tar.bz2
   /gnu/store/c2qv2apxw7bi3m5yazaqglgdigibnqhx-linux-libre-3.14.37-gnu.tar.xz
   /gnu/store/aiz8db2gni401wc9fgidmcggxyb1czis-guile-bootstrap-2.0
   /gnu/store/4mg0b0b7wf6alrfikfnx57dpz0glrbl7-xextproto-7.3.0.tar.bz2
   /gnu/store/p2a6rhji41izw40kss4w742n5cna676c-xtrans-1.3.5.tar.bz2
   /gnu/store/0qwbgz4r19hzx4zgjmfgalzzsii8i1b5-inputproto-2.3.1.tar.bz2
   /gnu/store/rmskwi5cla09bk1aba67d8h2d9kbj3ky-libX11-1.6.2.tar.bz2
   /gnu/store/anyv7kids1cfm962f8s1mk17qv8y2b0d-libXft-2.3.2.tar.bz2
   /gnu/store/c6573fmbld9z293sl7ycdmllw2h8526z-gzip-1.6.tar.gz
   /gnu/store/gb93yglsw38knxm21ryv1n6jcxmq6rq5-gettext-0.19.6.tar.gz
   /gnu/store/s5nw83vs8n22df0fxcqa6babdfyc1r84-mpfr-3.1.3.tar.xz
   /gnu/store/y9akh452n3p4w2v631nj0injx7y0d68x-mpc-1.0.3.tar.gz
   /gnu/store/1i515s240fqpzgigakdbkidnxgkgnldl-bison-2.7.1.tar.xz
   /gnu/store/9c9mmx7i1xk81rrgmb3m1r1xdp1plhf9-flex-2.5.37.tar.bz2
   /gnu/store/nvarny121kqi9kbmqn9nc4a50a4pwx6x-indent-2.2.10.tar.gz
   /gnu/store/829bkhjp870l8xx3x5h4njw7836hrcnj-bison-3.0.4.tar.xz
   /gnu/store/q6si4g7i42x18mmav1p61ih79kzjq56c-m4-1.4.17.tar.bz2
   /gnu/store/n7hw4dgm9qh1ihhb13jf5a1ll0wgf6ns-pkg-config-0.28.tar.gz
   /gnu/store/288vbaj26b5mijg1mlj6wail4v8fq2y1-libcap-2.24.tar.xz
   /gnu/store/2x3b0w1cx9128p564s5iryp76yy4l8w0-acl-2.2.52.src.tar.gz
   /gnu/store/y23pyisb22na45pjwflnysiy6vrbr1j0-attr-2.4.46.src.tar.gz
   /gnu/store/zv4q2jj4frjqns7b4z416la3ifj7lb7q-coreutils-8.24.tar.xz
   /gnu/store/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0
   /gnu/store/7payzrwxn2jrpkpi28knv4zin94k5lrj-grep-2.21.tar.xz
   /gnu/store/dwp927b6lvsdxv5816dnpix0645cr5kc-libsigsegv-2.10.tar.gz
   /gnu/store/pzh4nvlv5wkfnxwcp9vck6d6q4mfrk8k-gawk-4.1.3.tar.xz
   /gnu/store/k07kbclxbpc54m3pw6w105h13zd83rv6-sed-4.2.2.tar.bz2
   /gnu/store/igs2ybsib115wkccwnidyr2cmlf4al6k-lzip-1.16.tar.gz
   /gnu/store/f7zbx10dy9xa3alabxvr43mif9gg4yin-ed-1.12.tar.lz
   /gnu/store/2rq0dh8mkzi8x02yh38j71vc4d1dcnbr-patch-2.7.5.tar.xz
   /gnu/store/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz
   /gnu/store/0d7xnp3nji2mi4cw4jmd3mzbpija9a5a-xz-5.0.4.tar.gz
   /gnu/store/nwp6jsg2bnd0cv756hv1v8pid3py8a3h-tar-1.28.tar.xz
   /gnu/store/7dbskk7yv9vnpkm3qa44dy8sdxq334rn-perl-5.16.1.tar.gz
   /gnu/store/v15vaq5yhkh294nd7ivxmdrxpj9rq0zp-libunistring-0.9.6.tar.gz
   /gnu/store/15i7r667gvs6x753zbwik2kr8fi8y185-libatomic_ops-7.4.2.tar.gz
   /gnu/store/dm2a2zpfpdrz7lks85ffm6pwa5mafl52-gc-7.4.2.tar.gz
   /gnu/store/1k26zf7qsmg6pkaygi75xnxm2ga9ppdm-static-binaries.tar.xz
   /gnu/store/1ibfp6q6431rd43xh54jw7hvglnh7zxx-readline-6.3.tar.gz
   /gnu/store/sji2sqfh4x9b6vb9kp6qk0l5ci8h55h2-libtool-2.4.6.tar.xz
   /gnu/store/nbbiv8hyn9nsiim5qrybbxffn5yl4wv9-libffi-3.1.tar.gz
   /gnu/store/sahl359ai78ci7rg2pbmlvfwq55xbpp9-make-4.1.tar.bz2
   /gnu/store/yr1yb386zw4s4r8dwpap9mf47wwkrgkd-findutils-4.4.2.tar.gz
   /gnu/store/ynwa5d9ghl29hwlxf1xckf12i52k6wy3-gmp-6.0.0a.tar.xz
   /gnu/store/vvm8pcjgpxnhlqks6vnwp3sj97rhmsmg-glibc-2.22.tar.xz
   /gnu/store/yca84ljyx56i31b7wmp700zcg3gn80p3-bash43-017
   /gnu/store/h7ncblfv0dxk036cihxwqkymkz4vs7m3-bash43-001
   /gnu/store/4x154ffbi3gwmy7xbv3f8igk9sz6f5d3-bash43-032
   /gnu/store/69a8xk8a55rl8194lgpjcx6x5bh503af-bash43-015
   /gnu/store/6qhx57w9kfqlsgg9fba911v7qlrrbq0h-bash43-018
   /gnu/store/gakaqqn642zjw8shmkgn5nkrcssv3vif-bash43-010
   /gnu/store/ir3kf45fqaa9bzlcid9l0z5fzl65jixl-bash43-035
   /gnu/store/mnyx26pm6xqh75j0q2pwx60xm1cqmi5a-bash43-005
   /gnu/store/bbn5p22mfq5w6mxngh9zgpjnngaydq6x-bash43-002
   /gnu/store/7l63pzpgl07nhr2cn66vawxyf8wx07mz-bash43-024
   /gnu/store/094plzy7v18kyll6xfyscl68l0vpvnim-bash43-003
   /gnu/store/jxqhxa429pi68vwk8m2vn9g28wal90qn-bash43-007
   /gnu/store/l8l9qcm6kzzsq3d3smml5is49y819sfp-bash43-036
   /gnu/store/msc9i78392v4vblzfgyjaa0rghdm3mbr-bash43-039
   /gnu/store/y633n120y8a8bbrw5a744hck6zsgwmak-bash43-008
   /gnu/store/3mjnsrxpdmz1wkfng4hbig16x15sdq9q-bash43-019
   /gnu/store/is65c16lyj34qpkk6ifqard9ihdv9r86-bash43-026
   /gnu/store/ppvhn48d45m2p359q2a79nfqdmdz6jxx-bash43-034
   /gnu/store/bff6vzimv62cwy6gsvqavf7paxsbplsr-bash43-014
   /gnu/store/nvn3dw0467z6rx3a8070saixqkf1kgsf-bash43-033
   /gnu/store/xb3ahhdxnj6mfwr5139qmrlswzvrk9m0-bash43-031
   /gnu/store/axjfdnc45dwfipgj7ymm4gi3s4rn0g77-bash43-027
   /gnu/store/2x8bg76lmjy2g39zj9z638k9riqscg9n-bash43-021
   /gnu/store/c0x51s4ksl77i5a8vrns5fc9771injsx-bash43-020
   /gnu/store/4ass5dmchxw2ycbk48gdm76p114ci420-bash43-022
   /gnu/store/dk0gavi6l7a2pp21r0xaax1xgw2zm715-bash43-006
   /gnu/store/fazrziwpk2xw6vdwifmj4km0aw0pinxh-bash43-012
   /gnu/store/lq1hbdn1iyjpc25xxbqqpx7fnxnmbgmx-bash-4.3.tar.gz
   /gnu/store/y83wjq69cap97z662kiv42bljjcm950g-bash43-037
   /gnu/store/315kjv9dc6nff46v39sxlnqspxs7rvl0-bash43-011
   /gnu/store/6arl6w972qwi7k384y5nf0pg00dsy5rl-bash43-028
   /gnu/store/mm9nb1ywnlmg6n5yhknyxslrwqrimn1v-bash43-013
   /gnu/store/igr9cd9bmfn376cll0q4jjfm796cg78b-bash43-023
   /gnu/store/p2allvs8jbs832dgjhqkli0kjxb0k254-bash43-004
   /gnu/store/njzjdmcbwd6dpifpz6p62gjdw9jbr11s-bash43-029
   /gnu/store/pqfxx6jxlsdjh8hp6gnf1gj6n82g31rz-bash43-016
   /gnu/store/p9aw6fjq71snp6sid226j8rb31izrs2m-bash43-009
   /gnu/store/c442c68li24v8ix260sx3lv67vk5ygha-bash43-025
   /gnu/store/9ga17ppi7xq7nvdsas2235da516j9ncv-bash43-030
   /gnu/store/q4i2b6ggla06wf8n7jk2wczflpcq0734-bash43-038
   /gnu/store/jwz7l0v8zp7hx2imvi496pasackmaigj-gcc-4.9.3.tar.bz2
   /gnu/store/77pwki3c8chb2hisrncfg4kfyhn1z5f1-texinfo-6.0.tar.xz
   /gnu/store/k78dz54pl07qawhhb7pzaf2qx6lwhjwp-binutils-2.25.1.tar.bz2
   /gnu/store/ipzn49z81cvsgkg9pghcxvb8fsxk06i1-gcc-4.8.2.tar.xz
   /gnu/store/3fjmnhbjvgmgyym3i6idv1vxv2grb8ki-glibc-2.18.tar.xz
   /gnu/store/a62j9z64i667zi6c2g9xhm15pld6rnyz-binutils-2.23.2.tar.xz
   /gnu/store/6bqdkvhgx50q3rrv7mnp1c2flx2jf5sf-guile-2.0.11.tar.xz
@ substituter-started /gnu/store/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz /usr/local/libexec/guix/substitute

Found valid signature for /gnu/store/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz
From http://hydra.gnu.org/nar/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz
Downloading fpl50c…-file-5.22.tar.gz (716KiB installed)...
 http://hydra.gnu.org/nar/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz 67KiB/s 00:11 | 719KiB transferred
@ substituter-succeeded /gnu/store/fpl50c6v7n44qmp6zd2n7almkzkifa18-file-5.22.tar.gz
@ substituter-started /gnu/store/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0 /usr/local/libexec/guix/substitute

Found valid signature for /gnu/store/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0
From http://hydra.gnu.org/nar/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0
Downloading hg3692…-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0 (4KiB installed)...
guix substitute: error: download from 'http://hydra.gnu.org/nar/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0' failed: 410, "Gone"
@ substituter-failed /gnu/store/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0 256 fetching path `/gnu/store/hg3692jqq4jmhg4qx8d7y67fspimy898-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0' failed with exit code 1
@ substituter-started /gnu/store/gbjq0sxwzh9z1hna7h1c8d1b1b85py06-Python-3.4.3.tar.xz /usr/local/libexec/guix/substitute
killing process 4603
guix build: error: build failed: some substitutes for the outputs of derivation `/gnu/store/q5yiqxnckc4krmcixqa34dx888ylks60-?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source 
--8<---------------cut here---------------end--------------->8---

I guess this is not the good angle...

Thanks,

--
Mathieu Lirzin

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2015-12-08 18:42   ` Mathieu Lirzin
@ 2015-12-10 13:36     ` Ludovic Courtès
  2015-12-21 18:27       ` Mathieu Lirzin
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2015-12-10 13:36 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219, request

Mathieu Lirzin <mthl@gnu.org> skribis:

> I had the same issue when trying to create a package named
> 'rxvt-unicode-256-color'.  I have tried to fix
> ‘package-name->name+version’ by matching the last hyphen and check if
> the next character is a number.

Sounds like a reasonable approach (better than what I submitted), but we
would need test for the various corner cases.  Could you augment the
test that’s in tests/utils.scm?

> The result was a fail attempt to rebuild the earth:

This is because everything depends on (guix build utils).

But we’re right in time to make this change in ‘core-updates’.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2015-12-10 13:36     ` Ludovic Courtès
@ 2015-12-21 18:27       ` Mathieu Lirzin
  2015-12-21 21:46         ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Mathieu Lirzin @ 2015-12-21 18:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> I had the same issue when trying to create a package named
>> 'rxvt-unicode-256-color'.  I have tried to fix
>> ‘package-name->name+version’ by matching the last hyphen and check if
>> the next character is a number.
>
> Sounds like a reasonable approach (better than what I submitted), but we
> would need test for the various corner cases.  Could you augment the
> test that’s in tests/utils.scm?

The test case contains the example "guile-2.0.6.65-134c9" which
invalidates my proposal.  Here is another idea which identifies the
version part by the presence of dots.  WDYT?

--
Mathieu Lirzin


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-utils-Improve-package-name-name-version-version-dete.patch --]
[-- Type: text/x-diff, Size: 3110 bytes --]

From 19d37ea3843d236a3e32127a724a712dba3c58db Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Mon, 7 Dec 2015 05:20:08 +0100
Subject: [PATCH] utils: Improve 'package-name->name+version' version
 detection.

Fixes <http://bugs.gnu.org/19219>.

* guix/build/utils.scm (package-name->name+version): Use a more generic
heuristic to detect version.  Usage of digits in names is now possible.
* tests/utils.scm ("package-name->name+version"): Add some cases.
---
 guix/build/utils.scm | 29 +++++++++++++++--------------
 tests/utils.scm      |  6 +++++-
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e3f9edc..0ace2c7 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -100,25 +100,26 @@ is typically a \"PACKAGE-VERSION\" string."
                (+ 34 (string-length (%store-directory)))))
 
 (define (package-name->name+version name)
-  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
-\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
-#f are returned.  The first hyphen followed by a digit is considered to
-introduce the version part."
+  "Given NAME, a package name like \"foo-0.9.1b\", return two values: \"foo\"
+and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
+returned.  The version part must contain a dot to be properly detected."
   ;; See also `DrvName' in Nix.
 
   (define number?
     (cut char-set-contains? char-set:digit <>))
 
-  (let loop ((chars   (string->list name))
-             (prefix '()))
-    (match chars
-      (()
-       (values name #f))
-      ((#\- (? number? n) rest ...)
-       (values (list->string (reverse prefix))
-               (list->string (cons n rest))))
-      ((head tail ...)
-       (loop tail (cons head prefix))))))
+  (let ((lst (reverse (string->list name))))
+    (let loop ((chars lst) (suffix '()) (retry #t) (dots #f))
+      (match chars
+        (()
+         (values name #f))
+        ((#\- rest ...)
+         (cond (dots  (values (list->string (reverse rest))
+                              (list->string suffix)))
+               (retry (loop rest (cons #\- suffix) #f #f))
+               (else  (values name #f))))
+        ((head tail ...)
+         (loop tail (cons head suffix) retry (or dots (char=? #\. head))))))))
 
 (define parallel-job-count
   ;; Number of processes to be passed next to GNU Make's `-j' argument.
diff --git a/tests/utils.scm b/tests/utils.scm
index 04a859f..a7d8900 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -68,7 +68,11 @@
          '(("foo" "0.9.1b")
            ("foo-bar" "1.0")
            ("foo-bar2" #f)
-           ("guile" "2.0.6.65-134c9") ; as produced by `git-version-gen'
+           ("emacs" "24.5")
+           ("font-adobe-100-dpi" #f)
+           ("rxvt-unicode-256-color" "9.21")
+           ("guile" "2.0.6.65-134c9") ;as produced by Gnulib 'git-version-gen'
+           ("guile" "2.1.1.75-a147")  ;and with a different hash
            ("nixpkgs" "1.0pre22125_a28fe19")
            ("gtk2" "2.38.0"))))
 
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2015-12-21 18:27       ` Mathieu Lirzin
@ 2015-12-21 21:46         ` Ludovic Courtès
  2015-12-22 21:23           ` Mathieu Lirzin
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2015-12-21 21:46 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Mathieu Lirzin <mthl@gnu.org> skribis:

> The test case contains the example "guile-2.0.6.65-134c9" which
> invalidates my proposal.  Here is another idea which identifies the
> version part by the presence of dots.  WDYT?

Sometimes the version part does not contain dots, as in “diffoscope-34”.
Here’s the complete list of dot-less versions:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(gnu packages)
scheme@(guile-user)> (fold-packages (lambda (p r)
				      (if (string-index (package-version p) #\.)
					  r
					  (cons (package-full-name p) r)))
				    '())
$38 = ("xterm-320" "unclutter-8" "tidy-20091223" "perl-uri-find-20140709" "libx264-20150706-2245" "vapoursynth-28" "texlive-texmf-2015" "texlive-bin-2015" "texlive-2015" "scmutils-20140302" "perl-regexp-common-2013031301" "parallel-20151122" "diffoscope-34" "mg-20050429" "ngircd-22" "bootstrap-tarballs-0" "static-binaries-tarball-0" "usbutils-006" "kmod-17" "less-481" "libjpeg-9a" "libjpeg-8d" "hugs-Sep2006" "ghc-bifunctors-5" "ghc-nats-1" "brdf-explorer-17" "libgudev-230" "psutils-17" "gcal-4" "libspiro-20071029" "fontforge-20120731-b" "font-gnu-freefont-ttf-20100919" "pcb-20140316" "paredit-24" "sfarkxtc-b5e0a2ba39" "lz4-131" "ld-wrapper-0" "glibc-bootstrap-0" "gcc-bootstrap-0" "binutils-bootstrap-0" "bootstrap-binaries-0" "bless-1p02" "tzdata-2015c" "freepats-20060219" "acpica-20150410")
--8<---------------cut here---------------end--------------->8---

Would they still be suitably parsed?

I liked that the initial algorithm was trivial, as in Nix:

--8<---------------cut here---------------start------------->8---
/* Parse a derivation name.  The `name' part of a derivation name is
   everything up to but not including the first dash *not* followed by
   a letter.  The `version' part is the rest (excluding the separating
   dash).  E.g., `apache-httpd-2.0.48' is parsed to (`apache-httpd',
   '2.0.48'). */
DrvName::DrvName(const string & s) : hits(0)
{
    name = fullName = s;
    for (unsigned int i = 0; i < s.size(); ++i) {
        /* !!! isalpha/isdigit are affected by the locale. */
        if (s[i] == '-' && i + 1 < s.size() && !isalpha(s[i + 1])) {
            name = string(s, 0, i);
            version = string(s, i + 1);
            break;
        }
    }
}
--8<---------------cut here---------------end--------------->8---

Another option would be to return a list of possible name version pairs,
and to change the UI to try them one after another?  The downside would
be that it moves complexity to the UI.  Hmm…

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2015-12-21 21:46         ` Ludovic Courtès
@ 2015-12-22 21:23           ` Mathieu Lirzin
  2015-12-23  8:05             ` Alex Kost
  2015-12-30 14:07             ` bug#19219: New command-line syntax for package + version? Ludovic Courtès
  0 siblings, 2 replies; 24+ messages in thread
From: Mathieu Lirzin @ 2015-12-22 21:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> The test case contains the example "guile-2.0.6.65-134c9" which
>> invalidates my proposal.  Here is another idea which identifies the
>> version part by the presence of dots.  WDYT?
>
> Sometimes the version part does not contain dots, as in “diffoscope-34”.
> Here’s the complete list of dot-less versions:

Oops, I have totally overlooked that.  I have blindly followed the
examples in the test case.  Sorry about that.

> scheme@(guile-user)> ,use(gnu packages)
> scheme@(guile-user)> (fold-packages (lambda (p r)
> 				      (if (string-index (package-version p) #\.)
> 					  r
> 					  (cons (package-full-name p) r)))
> 				    '())
> $38 = ("xterm-320" "unclutter-8" "tidy-20091223" "perl-uri-find-20140709" "libx264-20150706-2245" "vapoursynth-28" "texlive-texmf-2015" "texlive-bin-2015" "texlive-2015" "scmutils-20140302" "perl-regexp-common-2013031301" "parallel-20151122" "diffoscope-34" "mg-20050429" "ngircd-22" "bootstrap-tarballs-0" "static-binaries-tarball-0" "usbutils-006" "kmod-17" "less-481" "libjpeg-9a" "libjpeg-8d" "hugs-Sep2006" "ghc-bifunctors-5" "ghc-nats-1" "brdf-explorer-17" "libgudev-230" "psutils-17" "gcal-4" "libspiro-20071029" "fontforge-20120731-b" "font-gnu-freefont-ttf-20100919" "pcb-20140316" "paredit-24" "sfarkxtc-b5e0a2ba39" "lz4-131" "ld-wrapper-0" "glibc-bootstrap-0" "gcc-bootstrap-0" "binutils-bootstrap-0" "bootstrap-binaries-0" "bless-1p02" "tzdata-2015c" "freepats-20060219" "acpica-20150410")
>
> Would they still be suitably parsed?

Nope, we are screwed! :) There are too many combinaisons.

> I liked that the initial algorithm was trivial, as in Nix:
>
[...]
> DrvName::DrvName(const string & s) : hits(0)
> {
>     name = fullName = s;
>     for (unsigned int i = 0; i < s.size(); ++i) {
>         /* !!! isalpha/isdigit are affected by the locale. */
>         if (s[i] == '-' && i + 1 < s.size() && !isalpha(s[i + 1])) {
>             name = string(s, 0, i);
>             version = string(s, i + 1);
>             break;
>         }
>     }
> }

Baahh.

In fact I think that having the same character for separating words and
version is a design flaw.  This brings non desirable limitations when
choosing a package name (as shown in this bug report) and/or requires a
complex parsing algorithm.  We could use a reserved character instead
(just like we do for multiple outputs).  My proposition would be to have
':' for versions and '/' for outputs, like this:

  guile:1.8/doc
  xterm-256-color:320
  emacs:24.5/out

WDYT?

> Another option would be to return a list of possible name version pairs,
> and to change the UI to try them one after another?  The downside would
> be that it moves complexity to the UI.  Hmm…

This sounds like possible non-determinism, so it feels ugly.  ;)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: Package names with digits following dashes
  2015-12-22 21:23           ` Mathieu Lirzin
@ 2015-12-23  8:05             ` Alex Kost
  2015-12-30 14:07             ` bug#19219: New command-line syntax for package + version? Ludovic Courtès
  1 sibling, 0 replies; 24+ messages in thread
From: Alex Kost @ 2015-12-23  8:05 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Mathieu Lirzin (2015-12-23 00:23 +0300) wrote:

[...]
> In fact I think that having the same character for separating words and
> version is a design flaw.

Wow, I didn't think about it before.  And I totally agree!

> This brings non desirable limitations when
> choosing a package name (as shown in this bug report) and/or requires a
> complex parsing algorithm.  We could use a reserved character instead
> (just like we do for multiple outputs).

Great idea!  I also think it would be a right decision to have different
separators for package name words, versions and outputs.

> My proposition would be to have
> ':' for versions and '/' for outputs, like this:
>
>   guile:1.8/doc
>   xterm-256-color:320
>   emacs:24.5/out
>
> WDYT?

The choice of the separator characters doesn't really matter I think.  I
would prefer '_' and ':', i.e. 'emacs-foo-bar_24.5:out'.

-- 
Alex

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-22 21:23           ` Mathieu Lirzin
  2015-12-23  8:05             ` Alex Kost
@ 2015-12-30 14:07             ` Ludovic Courtès
  2015-12-30 22:45               ` Mathieu Lirzin
  1 sibling, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2015-12-30 14:07 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Mathieu Lirzin <mthl@gnu.org> skribis:

> In fact I think that having the same character for separating words and
> version is a design flaw.  This brings non desirable limitations when
> choosing a package name (as shown in this bug report) and/or requires a
> complex parsing algorithm.  We could use a reserved character instead
> (just like we do for multiple outputs).  My proposition would be to have
> ':' for versions and '/' for outputs, like this:
>
>   guile:1.8/doc
>   xterm-256-color:320
>   emacs:24.5/out
>
> WDYT?

I had to think a lot because that’s a big change (technically simple I
think, but it’s the change of UI and habits that’s bigger ;-)).  I came
to the conclusion that it’s probably a necessary thing.

Regarding the aesthetics, I’d be in favor of using @ for the version:

  guile@1.8
  guile@1.8:doc

I’m not sure if we should also allow:

  guile:doc@1.8

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-30 14:07             ` bug#19219: New command-line syntax for package + version? Ludovic Courtès
@ 2015-12-30 22:45               ` Mathieu Lirzin
  2015-12-31  1:16                 ` Leo Famulari
                                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Mathieu Lirzin @ 2015-12-30 22:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219

ludo@gnu.org (Ludovic Courtès) writes:

> I had to think a lot because that’s a big change (technically simple I
> think, but it’s the change of UI and habits that’s bigger ;-)).  I came
> to the conclusion that it’s probably a necessary thing.

Sure, such change should not be made lightly.

> Regarding the aesthetics, I’d be in favor of using @ for the version:

You mean like npm...  :)

>   guile@1.8
>   guile@1.8:doc
>
> I’m not sure if we should also allow:
>
>   guile:doc@1.8
>
> Thoughts?

I'm OK with that.  Since choosing the reserved characters is not a
technical decision, maybe we could poll users?

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-30 22:45               ` Mathieu Lirzin
@ 2015-12-31  1:16                 ` Leo Famulari
  2015-12-31  8:09                   ` Efraim Flashner
  2015-12-31  8:19                 ` Alex Kost
  2015-12-31 11:27                 ` Ludovic Courtès
  2 siblings, 1 reply; 24+ messages in thread
From: Leo Famulari @ 2015-12-31  1:16 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

On Wed, Dec 30, 2015 at 11:45:14PM +0100, Mathieu Lirzin wrote:
> ludo@gnu.org (Ludovic Courtès) writes:
> 
> > I had to think a lot because that’s a big change (technically simple I
> > think, but it’s the change of UI and habits that’s bigger ;-)).  I came
> > to the conclusion that it’s probably a necessary thing.
> 
> Sure, such change should not be made lightly.
> 
> > Regarding the aesthetics, I’d be in favor of using @ for the version:
> 
> You mean like npm...  :)
> 
> >   guile@1.8
> >   guile@1.8:doc
> >
> > I’m not sure if we should also allow:
> >
> >   guile:doc@1.8
> >
> > Thoughts?
> 
> I'm OK with that.  Since choosing the reserved characters is not a
> technical decision, maybe we could poll users?

I think we should poll a big list of packages and see which characters
are most safe to use.

The question is: which big list? Debian's?

> 
> --
> Mathieu Lirzin
> 
> 
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-31  1:16                 ` Leo Famulari
@ 2015-12-31  8:09                   ` Efraim Flashner
  2016-01-01 15:55                     ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Efraim Flashner @ 2015-12-31  8:09 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 19219, Mathieu Lirzin

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

On Wed, 30 Dec 2015 20:16:31 -0500
Leo Famulari <leo@famulari.name> wrote:

> On Wed, Dec 30, 2015 at 11:45:14PM +0100, Mathieu Lirzin wrote:
>  [...]  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
> > 
> > I'm OK with that.  Since choosing the reserved characters is not a
> > technical decision, maybe we could poll users?  
> 
> I think we should poll a big list of packages and see which characters
> are most safe to use.
> 
> The question is: which big list? Debian's?
> 
> 
 
When debian adopted multiarch they had a small internal fight about what characters to use, since there are only so many usable characters. IIRC, a long version of a debian package could be 1:6.3.2-1+bpo1~henry. I don't remember if their sorting takes into account ascii order or their own internal order, but I'm pretty sure they only allow using each character once.

http://www.fifi.org/doc/debian-policy/policy.html/ch-versions.html
https://www.debian.org/doc/manuals/maint-guide/first.en.html#namever
https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-30 22:45               ` Mathieu Lirzin
  2015-12-31  1:16                 ` Leo Famulari
@ 2015-12-31  8:19                 ` Alex Kost
  2015-12-31 11:27                 ` Ludovic Courtès
  2 siblings, 0 replies; 24+ messages in thread
From: Alex Kost @ 2015-12-31  8:19 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Mathieu Lirzin (2015-12-31 01:45 +0300) wrote:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> I had to think a lot because that’s a big change (technically simple I
>> think, but it’s the change of UI and habits that’s bigger ;-)).  I came
>> to the conclusion that it’s probably a necessary thing.
>
> Sure, such change should not be made lightly.
>
>> Regarding the aesthetics, I’d be in favor of using @ for the version:
>
> You mean like npm...  :)
>
>>   guile@1.8
>>   guile@1.8:doc
>>
>> I’m not sure if we should also allow:
>>
>>   guile:doc@1.8
>>
>> Thoughts?
>
> I'm OK with that.  Since choosing the reserved characters is not a
> technical decision, maybe we could poll users?

I'm for the polling (but how should it be organized?)  I don't really
like "@" character.

-- 
Alex

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-30 22:45               ` Mathieu Lirzin
  2015-12-31  1:16                 ` Leo Famulari
  2015-12-31  8:19                 ` Alex Kost
@ 2015-12-31 11:27                 ` Ludovic Courtès
  2015-12-31 16:26                   ` Christopher Allan Webber
  2016-01-09  3:04                   ` Mathieu Lirzin
  2 siblings, 2 replies; 24+ messages in thread
From: Ludovic Courtès @ 2015-12-31 11:27 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Mathieu Lirzin <mthl@gnu.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> Regarding the aesthetics, I’d be in favor of using @ for the version:
>
> You mean like npm...  :)

Possibly, but I’m not that proficient at npm.  ;-)  I think I’ve seen
another tool use that convention, though I don’t remember which one
(maybe Spack?).

It’s more that “guile@1.8” reads like “Guile at [version] 1.8.”

>>   guile@1.8
>>   guile@1.8:doc
>>
>> I’m not sure if we should also allow:
>>
>>   guile:doc@1.8
>>
>> Thoughts?
>
> I'm OK with that.  Since choosing the reserved characters is not a
> technical decision, maybe we could poll users?

Yes, why not (bikeshedding ahead! :-)).  Would you like to email
guix-devel about it?

Note that it only affects the CLI.  The Emacs and Web UIs won’t see any
difference.

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-31 11:27                 ` Ludovic Courtès
@ 2015-12-31 16:26                   ` Christopher Allan Webber
  2016-01-01 20:36                     ` Andreas Enge
  2016-01-09  3:04                   ` Mathieu Lirzin
  1 sibling, 1 reply; 24+ messages in thread
From: Christopher Allan Webber @ 2015-12-31 16:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219, Mathieu Lirzin

Ludovic Courtès writes:

>>>   guile@1.8
>>>   guile@1.8:doc
>>>
>>> I’m not sure if we should also allow:
>>>
>>>   guile:doc@1.8
>>>
>>> Thoughts?
>>
>> I'm OK with that.  Since choosing the reserved characters is not a
>> technical decision, maybe we could poll users?
>
> Yes, why not (bikeshedding ahead! :-)).  Would you like to email
> guix-devel about it?
>
> Note that it only affects the CLI.  The Emacs and Web UIs won’t see any
> difference.
>
> Ludo’.

If the @ is for the optional choice of including a version, I'm good
with it.  It does mean we can never have @ in our package names, but
that might be a good restriction anyway :)

Anyway, I like it, since it's for command-line only.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-31  8:09                   ` Efraim Flashner
@ 2016-01-01 15:55                     ` Ludovic Courtès
  2016-01-01 21:25                       ` Leo Famulari
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2016-01-01 15:55 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 19219, Mathieu Lirzin

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Wed, 30 Dec 2015 20:16:31 -0500
> Leo Famulari <leo@famulari.name> wrote:
>
>> On Wed, Dec 30, 2015 at 11:45:14PM +0100, Mathieu Lirzin wrote:
>>  [...]  
>>  [...]  
>>  [...]  
>>  [...]  
>>  [...]  
>>  [...]  
>> > 
>> > I'm OK with that.  Since choosing the reserved characters is not a
>> > technical decision, maybe we could poll users?  
>> 
>> I think we should poll a big list of packages and see which characters
>> are most safe to use.
>> 
>> The question is: which big list? Debian's?
>> 
>> 
>  
> When debian adopted multiarch 

[...]

I forgot to reply to Leo’s message, but it seems clear to me that it
only makes sense to discuss on Guix mailing lists.  I don’t think anyone
else cares about the syntax of Guix’s command-line interface.  ;-)

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-31 16:26                   ` Christopher Allan Webber
@ 2016-01-01 20:36                     ` Andreas Enge
  0 siblings, 0 replies; 24+ messages in thread
From: Andreas Enge @ 2016-01-01 20:36 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: 19219, Mathieu Lirzin

On Thu, Dec 31, 2015 at 10:26:56AM -0600, Christopher Allan Webber wrote:
> If the @ is for the optional choice of including a version, I'm good
> with it.  It does mean we can never have @ in our package names, but
> that might be a good restriction anyway :)

According to the packaging guidelines, package names should only contain
lower-case letters, digits and "-" (the formulation is a bit ambiguous,
but this is the intent). So any choice of separators apart from "-" should
be fine, and we can happily bikeshed!

Andreas

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-01 15:55                     ` Ludovic Courtès
@ 2016-01-01 21:25                       ` Leo Famulari
  2016-01-01 21:45                         ` Leo Famulari
  0 siblings, 1 reply; 24+ messages in thread
From: Leo Famulari @ 2016-01-01 21:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219, Mathieu Lirzin

On Fri, Jan 01, 2016 at 04:55:40PM +0100, Ludovic Courtès wrote:
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > On Wed, 30 Dec 2015 20:16:31 -0500
> > Leo Famulari <leo@famulari.name> wrote:
> >
> >> On Wed, Dec 30, 2015 at 11:45:14PM +0100, Mathieu Lirzin wrote:
> >>  [...]  
> >>  [...]  
> >>  [...]  
> >>  [...]  
> >>  [...]  
> >>  [...]  
> >> > 
> >> > I'm OK with that.  Since choosing the reserved characters is not a
> >> > technical decision, maybe we could poll users?  
> >> 
> >> I think we should poll a big list of packages and see which characters
> >> are most safe to use.
> >> 
> >> The question is: which big list? Debian's?
> >> 
> >> 
> >  
> > When debian adopted multiarch 
> 
> [...]
> 
> I forgot to reply to Leo’s message, but it seems clear to me that it
> only makes sense to discuss on Guix mailing lists.  I don’t think anyone
> else cares about the syntax of Guix’s command-line interface.  ;-)

I don't mean that we should discuss it on Debian's mailing list. I mean
that we should consult the largest list of packages that we can find in
order to learn which characters are safest to choose as reserved. Debian
has a very long list of packages.

> 
> Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-01 21:25                       ` Leo Famulari
@ 2016-01-01 21:45                         ` Leo Famulari
  2016-01-02  3:18                           ` carl hansen
  0 siblings, 1 reply; 24+ messages in thread
From: Leo Famulari @ 2016-01-01 21:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219, Mathieu Lirzin

On Fri, Jan 01, 2016 at 04:25:40PM -0500, Leo Famulari wrote:
> On Fri, Jan 01, 2016 at 04:55:40PM +0100, Ludovic Courtès wrote:
> > Efraim Flashner <efraim@flashner.co.il> skribis:
> > 
> > > On Wed, 30 Dec 2015 20:16:31 -0500
> > > Leo Famulari <leo@famulari.name> wrote:
> > >
> > >> On Wed, Dec 30, 2015 at 11:45:14PM +0100, Mathieu Lirzin wrote:
> > >>  [...]  
> > >>  [...]  
> > >>  [...]  
> > >>  [...]  
> > >>  [...]  
> > >>  [...]  
> > >> > 
> > >> > I'm OK with that.  Since choosing the reserved characters is not a
> > >> > technical decision, maybe we could poll users?  
> > >> 
> > >> I think we should poll a big list of packages and see which characters
> > >> are most safe to use.
> > >> 
> > >> The question is: which big list? Debian's?
> > >> 
> > >> 
> > >  
> > > When debian adopted multiarch 
> > 
> > [...]
> > 
> > I forgot to reply to Leo’s message, but it seems clear to me that it
> > only makes sense to discuss on Guix mailing lists.  I don’t think anyone
> > else cares about the syntax of Guix’s command-line interface.  ;-)
> 
> I don't mean that we should discuss it on Debian's mailing list. I mean
> that we should consult the largest list of packages that we can find in
> order to learn which characters are safest to choose as reserved. Debian
> has a very long list of packages.

Of course, Debian has to choose how to name their packages, so the list
provided by `apt-cache pkgnames` is not the same as the list of upstream
names. But it does give some idea of what is possible once everything is
packaged.

I did this:
$ apt-cache pkgnames | tr -d 'a-zA-Z0-9' | tr -d - | tr -d '\n'

The only remaining characters were '.' and '+'. So it could be possible
to reserve : and @ without causing too many problems.

> 
> > 
> > Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-01 21:45                         ` Leo Famulari
@ 2016-01-02  3:18                           ` carl hansen
  0 siblings, 0 replies; 24+ messages in thread
From: carl hansen @ 2016-01-02  3:18 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 19219, Mathieu Lirzin

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

On Fri, Jan 1, 2016 at 1:45 PM, Leo Famulari <leo@famulari.name> wrote:

>
>
> I did this:
> $ apt-cache pkgnames | tr -d 'a-zA-Z0-9' | tr -d - | tr -d '\n'
>
> The only remaining characters were '.' and '+'.
>
>
> I did:
ls -1 /var/cache/apt/archive/ | tr -d 'a-zA-Z0-9' | tr -d - | tr -d '\n'
Got:  . + % ~ _

typical pkgnames, as seen in the file system:
zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4_amd64.deb
zoo_2.10-27_amd64.deb
zynjacku_6-4build1_amd64.deb

Note pkgname:

package-name  _  upstreamversion - localversion _ otherstuff

version delimited by _
may have optional subversions split by -
(like when an upstream version is remade on hydra, but is only locally
different somehow.)

For your comtemplation.

I believe on debian the : is used when the package starts a new numbering
scheme, like when
they decide the old scheme was crazy.

[-- Attachment #2: Type: text/html, Size: 1684 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2015-12-31 11:27                 ` Ludovic Courtès
  2015-12-31 16:26                   ` Christopher Allan Webber
@ 2016-01-09  3:04                   ` Mathieu Lirzin
  2016-01-18  8:10                     ` Ludovic Courtès
  1 sibling, 1 reply; 24+ messages in thread
From: Mathieu Lirzin @ 2016-01-09  3:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:

>> I'm OK with that.  Since choosing the reserved characters is not a
>> technical decision, maybe we could poll users?
>
> Yes, why not (bikeshedding ahead! :-)).  Would you like to email
> guix-devel about it?

Sorry for the late answer, I am quite busy with my school duties.  As a
consequence my mind is not available anymore for polling/bikeshedding.
Feel free to do the the poll or to exercise your dictatorial maintainer
power.  :)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-09  3:04                   ` Mathieu Lirzin
@ 2016-01-18  8:10                     ` Ludovic Courtès
  2016-01-18  8:31                       ` Mathieu Lirzin
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2016-01-18  8:10 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: 19219

Following the poll, it seems there’s a slight preference for the
“guile@1.8” syntax (and I admit it’s also my preference; hope I’m not
too biased ;-)).

  https://lists.gnu.org/archive/html/guix-devel/2016-01/threads.html#00335

Mathieu, would you be willing/available to implement the change?

Ludo’.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-18  8:10                     ` Ludovic Courtès
@ 2016-01-18  8:31                       ` Mathieu Lirzin
  2016-03-02 21:10                         ` Mathieu Lirzin
  0 siblings, 1 reply; 24+ messages in thread
From: Mathieu Lirzin @ 2016-01-18  8:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 19219

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> Following the poll, it seems there’s a slight preference for the
> “guile@1.8” syntax (and I admit it’s also my preference; hope I’m not
> too biased ;-)).

I have the same impression.

> Mathieu, would you be willing/available to implement the change?

I am free of any school project for now, so I can work on it.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#19219: New command-line syntax for package + version?
  2016-01-18  8:31                       ` Mathieu Lirzin
@ 2016-03-02 21:10                         ` Mathieu Lirzin
  0 siblings, 0 replies; 24+ messages in thread
From: Mathieu Lirzin @ 2016-03-02 21:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: control, 19219

close 19219

This is bug is Fixed by commit 1b846da8c372bee78851439fd9e72b2499115e5a, see:

  http://git.savannah.gnu.org/cgit/guix.git/commit/?id=1b846da8c372bee78851439fd9e72b2499115e5a

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-03-02 21:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-29 20:31 bug#19219: Package names with digits following dashes Andreas Enge
2014-12-06 23:38 ` Ludovic Courtès
2015-12-08 18:42   ` Mathieu Lirzin
2015-12-10 13:36     ` Ludovic Courtès
2015-12-21 18:27       ` Mathieu Lirzin
2015-12-21 21:46         ` Ludovic Courtès
2015-12-22 21:23           ` Mathieu Lirzin
2015-12-23  8:05             ` Alex Kost
2015-12-30 14:07             ` bug#19219: New command-line syntax for package + version? Ludovic Courtès
2015-12-30 22:45               ` Mathieu Lirzin
2015-12-31  1:16                 ` Leo Famulari
2015-12-31  8:09                   ` Efraim Flashner
2016-01-01 15:55                     ` Ludovic Courtès
2016-01-01 21:25                       ` Leo Famulari
2016-01-01 21:45                         ` Leo Famulari
2016-01-02  3:18                           ` carl hansen
2015-12-31  8:19                 ` Alex Kost
2015-12-31 11:27                 ` Ludovic Courtès
2015-12-31 16:26                   ` Christopher Allan Webber
2016-01-01 20:36                     ` Andreas Enge
2016-01-09  3:04                   ` Mathieu Lirzin
2016-01-18  8:10                     ` Ludovic Courtès
2016-01-18  8:31                       ` Mathieu Lirzin
2016-03-02 21:10                         ` Mathieu Lirzin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.