Bug#759772: Allow format strings to require fixed width for optional arguments
Control: tags -1 + wontfix Hi Benny, 2014-08-30 07:15 Benny Baumann: Package: aptitude Version: 0.6.11-1 Severity: minor Let's assume the following format string for package lists: %c%a%M%S %?i %p# %Z %10D %10I %4r %20v %20V %t Now configure some packages with explicit preferences along the lines of: $ cat /etc/apt/preferences Package: linux-image-* linux-headers-* linux-firmware-* firmware-* *-firmware Pin: release a=experimental Pin-Priority: 1000 Package: linux-image-* linux-headers-* linux-firmware-* firmware-* *-firmware Pin: release a=unstable Pin-Priority: 950 Package: * Pin: release a=testing Pin-Priority: 900 Package: * Pin: release a=stable Pin-Priority: 800 Package: * Pin: release a=experimental Pin-Priority: 750 Package: * Pin: release a=unstable Pin-Priority: 700 When browsing the various categories you will see various most packages without any priority, as desired. But when looking into a section with kernel images, development headers or firmware packages in them, mixed with other, you will see stairs and other effects with misalignment of the columns. It would be cool if you could ask Aptitude to skip the value as is now, but still reserve a certain amount of space for it anyway. If I understood this correctly, this works as documented [1]. The field is there, only that it tries to use only the necessary space, so for each line/row it can have different widths. Pin priority has well known boundaries, so it's easy to specify the width instead: "%4i". In that case, packages without anything to show will have the column empty, but still be there with the necessary width to not produce strange visual effects. Changing the current behaviour can break existing assumptions and is not desirable at this point unless there are more compelling cases. For example, if width of the field is only set for all rows after calculating the widest that can be possibly needed, it's an unneccesary extra computation most of the time. And in any case, if any in the list of packages present in the view (even if folded or out of the visible area at the moment) has pin priority needing N=4 spaces, it is equivalent to setting the field width to %4i to start with, so there would be no advantage in this case. So marking as +wontfix for the time being. [1] http://aptitude.alioth.debian.org/doc/en/ch02s05s01.html "Placing a question mark (?) between the % and the character identifying the escape causes the column's “basic” width to vary depending on its content. Note that the resulting columns might not line up vertically!" Cheers. -- Manuel A. Fernandez Montecelo
Bug#759772: Allow format strings to require fixed width for optional arguments
Package: aptitude Version: 0.6.11-1 Severity: minor Let's assume the following format string for package lists: %c%a%M%S %?i %p# %Z %10D %10I %4r %20v %20V %t Now configure some packages with explicit preferences along the lines of: $ cat /etc/apt/preferences Package: linux-image-* linux-headers-* linux-firmware-* firmware-* *-firmware Pin: release a=experimental Pin-Priority: 1000 Package: linux-image-* linux-headers-* linux-firmware-* firmware-* *-firmware Pin: release a=unstable Pin-Priority: 950 Package: * Pin: release a=testing Pin-Priority: 900 Package: * Pin: release a=stable Pin-Priority: 800 Package: * Pin: release a=experimental Pin-Priority: 750 Package: * Pin: release a=unstable Pin-Priority: 700 When browsing the various categories you will see various most packages without any priority, as desired. But when looking into a section with kernel images, development headers or firmware packages in them, mixed with other, you will see stairs and other effects with misalignment of the columns. It would be cool if you could ask Aptitude to skip the value as is now, but still reserve a certain amount of space for it anyway. Regards, BenBE. -- Package-specific info: Terminal: screen $DISPLAY not set. which aptitude: /usr/bin/aptitude aptitude version information: aptitude 0.6.11 compiled at Jun 9 2014 20:46:57 Compiler: g++ 4.8.3 Compiled against: apt version 4.12.0 NCurses version 5.9 libsigc++ version: 2.2.11 Gtk+ support disabled. Qt support disabled. Current library versions: NCurses version: ncurses 5.9.20140712 cwidget version: 0.5.17 Apt version: 4.12.0 aptitude linkage: linux-vdso.so.1 (0x7fffa67fc000) libapt-pkg.so.4.12 = /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 (0x7f1358d05000) libncursesw.so.5 = /lib/x86_64-linux-gnu/libncursesw.so.5 (0x7f1358acf000) libtinfo.so.5 = /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f13588a4000) libsigc-2.0.so.0 = /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x7f135869f000) libcwidget.so.3 = /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x7f1358398000) libsqlite3.so.0 = /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x7f13580d6000) libboost_iostreams.so.1.55.0 = /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.55.0 (0x7f1357ebe000) libxapian.so.22 = /usr/lib/libxapian.so.22 (0x7f1357ab3000) libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1357895000) libstdc++.so.6 = /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f135758a000) libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7f1357289000) libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f1357072000) libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f1356cc9000) libutil.so.1 = /lib/x86_64-linux-gnu/libutil.so.1 (0x7f1356ac6000) libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f13568c1000) libz.so.1 = /lib/x86_64-linux-gnu/libz.so.1 (0x7f13566a9000) libbz2.so.1.0 = /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x7f1356499000) liblzma.so.5 = /lib/x86_64-linux-gnu/liblzma.so.5 (0x7f1356275000) librt.so.1 = /lib/x86_64-linux-gnu/librt.so.1 (0x7f135606d000) libuuid.so.1 = /lib/x86_64-linux-gnu/libuuid.so.1 (0x7f1355e67000) /lib64/ld-linux-x86-64.so.2 (0x7f135969b000) -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (900, 'testing'), (800, 'stable'), (750, 'experimental'), (700, 'unstable'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 3.16-trunk-amd64 (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages aptitude depends on: ii aptitude-common 0.6.11-1 ii libapt-pkg4.121.0.6 ii libboost-iostreams1.55.0 1.55.0+dfsg-2 ii libc6 2.19-9 ii libcwidget3 0.5.17-1 ii libgcc1 1:4.9.1-4 ii libncursesw5 5.9+20140712-2 ii libsigc++-2.0-0c2a2.2.11-4 ii libsqlite3-0 3.8.5-2 ii libstdc++64.9.1-4 ii libtinfo5 5.9+20140712-2 ii libxapian22 1.2.18-1 Versions of packages aptitude recommends: pn aptitude-doc-en | aptitude-doc none ii libparse-debianchangelog-perl 1.2.0-1 ii sensible-utils 0.0.9 Versions of packages aptitude suggests: pn apt-xapian-index none ii debtags 1.12.1 ii tasksel 3.20 -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org