`guix search` shows control sequences

DoneSubmitted by Lars-Dominik Braun.
Details
2 participants
  • Lars-Dominik Braun
  • Ludovic Courtès
Owner
unassigned
Severity
normal
L
L
Lars-Dominik Braun wrote on 11 Jun 2020 19:18
(address . bug-guix@gnu.org)
20200611171838.GA341429@noor.fritz.box
Hi,
when using `guix search python2-xcffib` on a foreign distribution (Gentoo) notall control sequences are stripped by the pager (see location and license):
---snip---name: python2-xcffibversion: 0.6.0outputs: outsystems: x86_64-linux i686-linuxdependencies: libxcb@1.14 python2-cffi@1.13.2 python2-six@1.14.0location: 8;;file://xxx/gnu/store/1ccswh99papcvkj028s9myy8kq26y26g-guix-module-union/share/guile/site/3.0/gnu/packages/python-xyz.scmgnu/packages/python-xyz.scm:5437:28;;homepage: https://github.com/tych0/xcffiblicense: 8;;http://directory.fsf.org/wiki/License:ExpatExpat8;;synopsis: XCB Python bindingsdescription: Xcffib is a replacement for xpyb, an XCB Python bindings.It adds support for Python 3 and PyPy. It is based on cffi.relevance: 20---
`guix search python2-xcffib | less` works fine, `unset`ting the environmentvariable $LESS or setting it to 'FrX' (i.e. what guix does when it’s missing)fixes the issue too, so I’m a little puzzled. Some more information:
---snip---$ env | grep -i lessLESS=-R -M --shift 5LESSOPEN=|lesspipe %sPAGER=/usr/bin/less$ less --versionless 551 (PCRE2 regular expressions)[…]$ LANG=C guix describeGeneration 15 Jun 11 2020 17:47:13 (current) guix cbd9581 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: cbd9581acc41cd49eb81c2432452cad4de805cbd---snap---
Cheers,Lars
L
L
Ludovic Courtès wrote on 13 Jun 2020 22:54
(name . Lars-Dominik Braun)(address . lars@6xq.net)(address . 41811@debbugs.gnu.org)
87d062wutr.fsf@gnu.org
Hi,
Lars-Dominik Braun <lars@6xq.net> skribis:
Toggle quote (8 lines)> $ env | grep -i less> LESS=-R -M --shift 5> LESSOPEN=|lesspipe %s> PAGER=/usr/bin/less> $ less --version> less 551 (PCRE2 regular expressions)> […]
No control sequences if you do “unset LESS” before hand, right?
I think we’ll just override ‘LESS’ unconditionally as shown below.
Thanks,Ludo’.
Toggle diff (14 lines)diff --git a/guix/ui.scm b/guix/ui.scmindex 98b30445c8..2595e44062 100644--- a/guix/ui.scm+++ b/guix/ui.scm@@ -1563,8 +1563,7 @@ zero means that PACKAGE does not match any of REGEXPS." ;; Set 'LESS' so that 'less' exits if everything fits on the screen (F), ;; lets ANSI escapes through (r), does not send the termcap ;; initialization string (X).- (let ((pager (with-environment-variables `(("LESS"- ,(or (getenv "LESS") "FrX")))+ (let ((pager (with-environment-variables `(("LESS" "FrX")) (open-pipe* OPEN_WRITE (or (getenv "GUIX_PAGER") (getenv "PAGER") "less")))))
L
L
Lars-Dominik Braun wrote on 14 Jun 2020 08:09
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41811@debbugs.gnu.org)
20200614060925.GA1358@noor.fritz.box
Hi,
Toggle quote (2 lines)> No control sequences if you do “unset LESS” before hand, right?> I think we’ll just override ‘LESS’ unconditionally as shown below.
yes, and the patch fixes the issue.
Thanks,Lars
L
L
Ludovic Courtès wrote on 14 Jun 2020 15:46
(name . Lars-Dominik Braun)(address . lars@6xq.net)(address . 41811-done@debbugs.gnu.org)
87v9jtvjxz.fsf@gnu.org
Hi,
Lars-Dominik Braun <lars@6xq.net> skribis:
Toggle quote (4 lines)>> No control sequences if you do “unset LESS” before hand, right?>> I think we’ll just override ‘LESS’ unconditionally as shown below.> yes, and the patch fixes the issue.
Pushed as e66f243e929bbd94e62e77cfa6a63dfd001ebe07.Thanks for testing!
Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 41811@debbugs.gnu.org