Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
As an end user, thank all of you ! Best Regards, Xiangyu LIU 2014-03-03 0:38 GMT+08:00 Manuel A. Fernandez Montecelo manuel.montez...@gmail.com: Control: tags 647474 + pending Control: owner 647474 ! 2014-02-09 10:43 GMT+00:00 Manuel A. Fernandez Montecelo manuel.montez...@gmail.com: But as I also said, I think that the way in which Daniel Burrows solved this at the time is the wrong way and that should have accepted the (verbose 0) from Ubuntu. I don't understand why he didn't, but I think that that's what we should do. [...] I still would like to solve this for the next release 0.6.8.5, better with the (verbose = 0) than with the patch above. This is an unintrusive change that should not get in the way of wip-cmdline. Fix commited, with the verbose flag: http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=commitdiff;h=39803644412f7c99093744a2735f9acc495a583f -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
Control: tags 647474 + pending Control: owner 647474 ! 2014-02-09 10:43 GMT+00:00 Manuel A. Fernandez Montecelo manuel.montez...@gmail.com: But as I also said, I think that the way in which Daniel Burrows solved this at the time is the wrong way and that should have accepted the (verbose 0) from Ubuntu. I don't understand why he didn't, but I think that that's what we should do. [...] I still would like to solve this for the next release 0.6.8.5, better with the (verbose = 0) than with the patch above. This is an unintrusive change that should not get in the way of wip-cmdline. Fix commited, with the verbose flag: http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=commitdiff;h=39803644412f7c99093744a2735f9acc495a583f -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#720074: [Aptitude-devel] Bug#720074: Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
On 3 March 2014 00:38, Manuel A. Fernandez Montecelo manuel.montez...@gmail.com wrote: Control: tags 647474 + pending Control: owner 647474 ! 2014-02-09 10:43 GMT+00:00 Manuel A. Fernandez Montecelo manuel.montez...@gmail.com: But as I also said, I think that the way in which Daniel Burrows solved this at the time is the wrong way and that should have accepted the (verbose 0) from Ubuntu. I don't understand why he didn't, but I think that that's what we should do. [...] I still would like to solve this for the next release 0.6.8.5, better with the (verbose = 0) than with the patch above. This is an unintrusive change that should not get in the way of wip-cmdline. Fix commited, with the verbose flag: http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=commitdiff;h=39803644412f7c99093744a2735f9acc495a583f Apparently you never figured out that the reason to show recommends-not-installed without --verbose is to alert the user to the unusual situation of their absence. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
2014-02-09 Xiangyu Liu u122...@gmail.com: Hi, I personally think that the -v solution as you mentioned is good enough, cause most users don't care these recommend or suggestion messages, even installed things, they just want a out of box application. For people want specific information, like me, -v would be a smart thing. At this moment, it seems that I have to apply this patch manually to get a custom aptitude. Thanks for your information and patch ! I hope that, in one way or another, it's included in the next upstream release in a few weeks. Cheers. -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
2014-02-09 Daniel Hartwig mand...@gmail.com: I created the patch, attached. The solution is not very good for my taste, but Daniel Burrows solved it in this way, attaching this message to the Quiet option (which doesn't happen for any other output than progress-like), so this is the quick and dirty fix chaning behaviour minimally and fixing this problem. I say minimally because I don't think that users will rely (and thus, complain if changes behaviour) on something as subtle as setting the option -q explicitly while using pipes/redirection for other reasons, to specifically avoid printing this message. This presumes too much. It is not possible to determine this quiet_because_of_pipe_or_redirection at the point it is introduced, using the test it does. Yes, it presumes too much, that's what I say in the paragraphs above. To me there seems to be no other way to fix this and maintain the behaviour that Daniel Burrows wanted without changing a significant amount of code, that I don't want to do now to not get in the way of the wip-cmdline. But as I also said, I think that the way in which Daniel Burrows solved this at the time is the wrong way and that should have accepted the (verbose 0) from Ubuntu. I don't understand why he didn't, but I think that that's what we should do. In any case, resolved in wip-cmdline. I still would like to solve this for the next release 0.6.8.5, better with the (verbose = 0) than with the patch above. This is an unintrusive change that should not get in the way of wip-cmdline. Cheers. -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
forcemerge 647474 720074 severity 647474 minor owner 647474 ! tags 647474 + patch moreinfo stop Hi, The problem was introduced here in 2007, after a feature request which was previously implemented in Ubuntu: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452202 The basic problem is that showing the recommends in command line mode depends on the option Quiet (which can be set by -q in the command line, or -o Quiet=integer). It turns out that in src/main.cc, this option is set up automatically to a positive number if the output is not a tty (the case of pipes or redirections), even if the user didn't request it through the command line explicitly: int curr_quiet = aptcfg-FindI(quiet, 0); if(seen_quiet) aptcfg-SetNoUser(quiet, quiet); if(quiet == 0 !isatty(1)) aptcfg-SetNoUser(quiet, std::max(curr_quiet, 1)); The code above cannot be fixed, since the progress operations depend on this to work correctly. I created the patch, attached. The solution is not very good for my taste, but Daniel Burrows solved it in this way, attaching this message to the Quiet option (which doesn't happen for any other output than progress-like), so this is the quick and dirty fix chaning behaviour minimally and fixing this problem. I say minimally because I don't think that users will rely (and thus, complain if changes behaviour) on something as subtle as setting the option -q explicitly while using pipes/redirection for other reasons, to specifically avoid printing this message. My prefered solution would be to do like with Suggests-Will-Not-Install, that is, only show Recommended-Will-Not-Install if verbose0 (as the patch from Ubuntu, but Daniel Burrows didn't like the solution, and I don't know why). Or alternatively, show it inconditionally (which probably users didn't like, and that's why Ubuntu implemented a solution). Opinions? -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com diff --git a/src/cmdline/cmdline_prompt.cc b/src/cmdline/cmdline_prompt.cc index 25fadaa..7f417a5 100644 --- a/src/cmdline/cmdline_prompt.cc +++ b/src/cmdline/cmdline_prompt.cc @@ -702,7 +702,10 @@ bool cmdline_show_preview(bool as_upgrade, pkgset to_install, } } - if(quiet == 0 !recommended.empty()) + // mafm: see bug #720074, assuming that if stdout is not a tty the quiet + // option was automatic and does not apply for silencing this message + bool quiet_because_of_pipe_or_redirection = (quiet != 0) !isatty(1); + if((quiet == 0 || quiet_because_of_pipe_or_redirection) !recommended.empty()) { printf(_(The following packages are RECOMMENDED but will NOT be installed:\n)); cmdline_show_instinfo(recommended, verbose, showvers, showdeps, showsize, false, showwhy, term_metrics);
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
Hi, I personally think that the -v solution as you mentioned is good enough, cause most users don't care these recommend or suggestion messages, even installed things, they just want a out of box application. For people want specific information, like me, -v would be a smart thing. At this moment, it seems that I have to apply this patch manually to get a custom aptitude. Thanks for your information and patch ! 2014-02-09 9:05 GMT+08:00 Manuel A. Fernandez Montecelo manuel.montez...@gmail.com: forcemerge 647474 720074 severity 647474 minor owner 647474 ! tags 647474 + patch moreinfo stop Hi, The problem was introduced here in 2007, after a feature request which was previously implemented in Ubuntu: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452202 The basic problem is that showing the recommends in command line mode depends on the option Quiet (which can be set by -q in the command line, or -o Quiet=integer). It turns out that in src/main.cc, this option is set up automatically to a positive number if the output is not a tty (the case of pipes or redirections), even if the user didn't request it through the command line explicitly: int curr_quiet = aptcfg-FindI(quiet, 0); if(seen_quiet) aptcfg-SetNoUser(quiet, quiet); if(quiet == 0 !isatty(1)) aptcfg-SetNoUser(quiet, std::max(curr_quiet, 1)); The code above cannot be fixed, since the progress operations depend on this to work correctly. I created the patch, attached. The solution is not very good for my taste, but Daniel Burrows solved it in this way, attaching this message to the Quiet option (which doesn't happen for any other output than progress-like), so this is the quick and dirty fix chaning behaviour minimally and fixing this problem. I say minimally because I don't think that users will rely (and thus, complain if changes behaviour) on something as subtle as setting the option -q explicitly while using pipes/redirection for other reasons, to specifically avoid printing this message. My prefered solution would be to do like with Suggests-Will-Not-Install, that is, only show Recommended-Will-Not-Install if verbose0 (as the patch from Ubuntu, but Daniel Burrows didn't like the solution, and I don't know why). Or alternatively, show it inconditionally (which probably users didn't like, and that's why Ubuntu implemented a solution). Opinions? -- Manuel A. Fernandez Montecelo manuel.montez...@gmail.com
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
Control: tags -1 = confirmed Control: owner -1 ! On 9 February 2014 09:05, Manuel A. Fernandez Montecelo manuel.montez...@gmail.com wrote: forcemerge 647474 720074 severity 647474 minor owner 647474 ! tags 647474 + patch moreinfo stop Hi, The problem was introduced here in 2007, after a feature request which was previously implemented in Ubuntu: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452202 The basic problem is that showing the recommends in command line mode depends on the option Quiet (which can be set by -q in the command line, or -o Quiet=integer). It turns out that in src/main.cc, this option is set up automatically to a positive number if the output is not a tty (the case of pipes or redirections), even if the user didn't request it through the command line explicitly: int curr_quiet = aptcfg-FindI(quiet, 0); if(seen_quiet) aptcfg-SetNoUser(quiet, quiet); if(quiet == 0 !isatty(1)) aptcfg-SetNoUser(quiet, std::max(curr_quiet, 1)); The code above cannot be fixed, since the progress operations depend on this to work correctly. The issues here are addressed adequately in wip-cmdline. I created the patch, attached. The solution is not very good for my taste, but Daniel Burrows solved it in this way, attaching this message to the Quiet option (which doesn't happen for any other output than progress-like), so this is the quick and dirty fix chaning behaviour minimally and fixing this problem. I say minimally because I don't think that users will rely (and thus, complain if changes behaviour) on something as subtle as setting the option -q explicitly while using pipes/redirection for other reasons, to specifically avoid printing this message. This presumes too much. It is not possible to determine this quiet_because_of_pipe_or_redirection at the point it is introduced, using the test it does. In any case, resolved in wip-cmdline. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#647474: aptitude: When piping, stdout doesn't include RECOMMENDED but will not be installed
Package: aptitude Version: 0.6.3-3.2 Severity: normal aptitude install -Rsy package shows RECOMMENDED but will NOT be installed *unless* the output is piped (e.g. to 'cat'), in which case it does not. Piped output *should* display this information. For example, if we find a package that is not installed, and *recommends* another packages that is not installed (this is done using aptitude search '!~i~Drecommends:!~i' -F %p | head -1), we can demonstrate this behaviour: When output is to terminal, Recommended but will NOT be installed is shown: mattcen@tony:tmp$ aptitude install -Rys $(aptitude search '!~i~Drecommends:!~i' -F %p | head -1) The following NEW packages will be installed: a7xpg-data The following packages are RECOMMENDED but will NOT be installed: a7xpg 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 3,527 kB of archives. After unpacking 3,736 kB will be used. Would download/install/remove packages. When output is to a pipe, Recommended but will NOT be installed is not shown: mattcen@tony:tmp$ aptitude install -Rys $(aptitude search '!~i~Drecommends:!~i' -F %p | head -1) | cat Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Reading task descriptions... The following NEW packages will be installed: a7xpg-data 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 3,527 kB of archives. After unpacking 3,736 kB will be used. Would download/install/remove packages. -- Package-specific info: aptitude 0.6.3 compiled at Oct 18 2010 22:11:25 Compiler: g++ 4.4.5 Compiled against: apt version 4.10.1 NCurses version 5.7 libsigc++ version: 2.2.4.2 Ept support enabled. Gtk+ support disabled. Current library versions: NCurses version: ncurses 5.7.20100313 cwidget version: 0.5.16 Apt version: 4.10.1 linux-gate.so.1 = (0xb7813000) libapt-pkg.so.4.10 = /usr/lib/libapt-pkg.so.4.10 (0xb7706000) libncursesw.so.5 = /lib/libncursesw.so.5 (0xb76c) libsigc-2.0.so.0 = /usr/lib/libsigc-2.0.so.0 (0xb76b9000) libcwidget.so.3 = /usr/lib/libcwidget.so.3 (0xb75f9000) libept.so.1 = /usr/lib/libept.so.1 (0xb75a8000) libxapian.so.22 = /usr/lib/sse2/libxapian.so.22 (0xb73cd000) libz.so.1 = /usr/lib/libz.so.1 (0xb73b9000) libsqlite3.so.0 = /usr/lib/libsqlite3.so.0 (0xb732c000) libboost_iostreams.so.1.42.0 = /usr/lib/libboost_iostreams.so.1.42.0 (0xb7313000) libpthread.so.0 = /lib/i686/cmov/libpthread.so.0 (0xb72fa000) libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0xb7205000) libm.so.6 = /lib/i686/cmov/libm.so.6 (0xb71df000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0xb71c1000) libc.so.6 = /lib/i686/cmov/libc.so.6 (0xb707a000) libutil.so.1 = /lib/i686/cmov/libutil.so.1 (0xb7076000) libdl.so.2 = /lib/i686/cmov/libdl.so.2 (0xb7072000) libuuid.so.1 = /lib/libuuid.so.1 (0xb706e000) libbz2.so.1.0 = /lib/libbz2.so.1.0 (0xb705d000) librt.so.1 = /lib/i686/cmov/librt.so.1 (0xb7053000) /lib/ld-linux.so.2 (0xb7814000) Terminal: screen-bce $DISPLAY not set. `which aptitude`: /usr/bin/aptitude aptitude version information: aptitude linkage: -- System Information: Debian Release: 6.0.2 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages aptitude depends on: ii apt [libapt-pkg4.10] 0.8.10.3+squeeze1 Advanced front-end for dpkg ii libboost-iostreams1.42 1.42.0-4 Boost.Iostreams Library ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libcwidget30.5.16-3 high-level terminal interface libr ii libept11.0.4 High-level library for managing De ii libgcc11:4.4.5-8 GCC support library ii libncursesw5 5.7+20100313-5shared libraries for terminal hand ii libsigc++-2.0-0c2a 2.2.4.2-1 type-safe Signal Framework for C++ ii libsqlite3-0 3.7.3-1 SQLite 3 shared library ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3 ii libxapian221.2.3-2 Search engine library ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime Versions of packages aptitude recommends: ii apt-xapian-index 0.41 maintenance and search tools for a ii aptitude-doc-en [aptitude-doc 0.6.3-3.2 English manual for aptitude, a ter ii libparse-debianchangelog-perl 1.1.1-2.1 parse Debian changelogs and output ii sensible-utils0.0.4 Utilities for sensible alternative Versions of packages aptitude suggests: ii debtags 1.7.11 Enables support for