On Tue, Sep 09, 2014 at 03:26:44PM +0200, David Kalnischkies wrote: > On Sat, Sep 06, 2014 at 11:47:24AM -0300, Antonio Terceiro wrote: > > Please do report a bug. > > Your wish be my command -> #760951 > > > Another point, perhaps more important, would be that an automated test > > suite is something that is mainly supposed to run unattended, so using a > > pager at all does not look like a good decision to me. If you want the > > contents of a file to show up in the test logs, you might want to use > > just `cat`, or even `tee` exactly at the point where the file is > > created: > > > > apt-get changelog | tee /path/to/file > > I think you misunderstood me – the tests aren't using a pager > themselves, apt-get is calling one automatically and unconditionally > with the expectation that the pager degrades nicely to just working like > 'cat' if the output isn't a terminal. oh, got it now. > While I would still be interested which pager it actually is which does > this as I couldn't reproduce it with less/more/most/cat at all, Both in a local debci chroot and on the ci.debian.net server, on a clean system the pager is what you would expect: /usr/bin/pager -> /bin/more $ sh -x /usr/bin/sensible-pager /etc/debian_version + pager /etc/debian_version jessie/sid + ret=0 + [ 0 -eq 126 ] + [ 0 -eq 127 ] $ which pager /usr/bin/pager $ readlink -f /usr/bin/pager /bin/more even if I tell adt-run to spawn a shell in the testbed after running the apt tests, I still get `more` as the pager. looking at the source code for more, it will add those headers when you pass more than one file to it. In fact: $ more /etc/debian_version | cat jessie/sid $ more /etc/debian_version /etc/debian_version | cat :::::::::::::: /etc/debian_version :::::::::::::: jessie/sid :::::::::::::: /etc/debian_version :::::::::::::: jessie/sid > I guess that the expection of a well behaving pager is a bit > optimistic/wrong, so I am just going to change that and call 'cat' > unconditionally if we are faced with a non-terminal (looking at the > code, it is currently a bit unclean anyway, so we have to change that > anyway). cool :) > Thanks for the input! Sometimes, talking about the room makes the > elephant at least partially visible. ;) yeah :) -- Antonio Terceiro <terceiro@debian.org>
Attachment:
signature.asc
Description: Digital signature