Re: The behaviour of systemctl.

2011-06-21 Thread David Tardon
On Sun, Jun 19, 2011 at 09:46:29AM +0200, Aaron Sowry wrote:
 On Sat, Jun 18, 2011 at 10:25:53PM +0200, Lennart Poettering wrote:
   Yes, but the difference here is that ls does not re-implement something 
   that
   is already available at the command line.
  
  Hmm???
 
 The formatting done by ls is not already available to the user as a command 
 that can be piped to.

ls | column

rpm -qf `which column`
util-linux-2.19.1-1.fc16.x86_64

D.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-21 Thread Aaron Sowry
On Tue, Jun 21, 2011 at 08:25:53AM +0200, David Tardon wrote:
  The formatting done by ls is not already available to the user as a 
  command that can be piped to.
 
 ls | column

Doesn't give me the same output as ls.

ls is a poor anaolgue for systemctl in this respect anyway so we can probably
stop comparing the two.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-20 Thread Aaron Sowry
On Sun, Jun 19, 2011 at 03:49:12PM -0400, Rich Mattes wrote:
 The best place to discuss bugs and design decisions for a project is on 
 that project's mailing list[1].  fedora-devel is the correct forum if 
 there are Fedora related integration issues, but whether or not systemd 
 pages output by default is more of a project level issue.

Fair point - discussion has been moved to [1].

/Aaron

[1] http://lists.freedesktop.org/pipermail/systemd-devel/2011-June/002655.html


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-20 Thread Michal Hlavinka
On 06/17/2011 10:16 PM, Aaron Sowry wrote:
 Hello,

 I'd like to discuss the behaviour of systemctl. See RH bug 713567 for 
 context. To summarise:

 - 'systemctl --all' pages by default when the output is to tty. This consumes 
 50-60+ lines of potentially bug-prone code, and irks the crap out of me as a 
 system administrator. systemctl's jurisdiction ends at stdout.

 - The same command outputs column headers on tty, and no headers otherwise. 
 This is inconsistent. If I am outputting to a file, or perhaps a printer, and 
 want headers on my non-tty output, I have to add them myself since there is 
 no flag to force them on non-tty channels. If I don't want them and they are 
 present, I tail.

 - Currently, if I run 'systemctl --all' and have no pager (at least no pager 
 that systemctl knows of) available, I get an error message and no output. 
 This is horribly bad form, and forces me to use --no-pager or pipe to cat in 
 order to get output. This issue is acknowledged in RH bug 713707.

 - Another bright idea (RH bug 713567) is that --full should be applied to 
 non-tty output automatically, and not to tty output.

 All of these peculiarities stem from poor UNIX programming practise. Do not 
 try to make decisions for me as a user (especially not based on output 
 channels), about how I want my output formatted. No other Linux/UNIX tools 
 make this assumption (with perhaps the exception of git-log et. al.), and if 
 you are wanting administrators to feel comfortable with your new 
 soon-to-be-ubiquitous tools, then I suggest you try to be consistent with 
 existing convention. I don't want to have to check man pages to see if piping 
 output gives me different results than tty, and I would rather use existing, 
 well-proven tools to format my output than a bunch of flags I have to 
 re-learn just to be able to deal with systemctl. The type of people using 
 systemctl are not the type of people that are going to need hand-holding.

 Thanks.


I'll add one (small) inconsistency:

# systemctl is-active service

has following output:
  active
and sets exit code. If you don't wont any output, you need to use --quiet

# systemctl is-enabled service
just sets exit code.

I'd prefer if the behaviour of is-active and is-enabled is the same: 
simple output and --quiet option.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-20 Thread Steve Clark

On 06/19/2011 10:25 PM, Matthew Garrett wrote:

On Sun, Jun 19, 2011 at 07:09:14PM -0400, Steve Clark wrote:


Aaron, haven't you figured it out yet? As far as Lennart is concerned it
is his way or the highway!

My $.02 after following all the threads about sysemd/ctl.

Steve,

This is a technical mailing list and this kind of response is
unproductive. If you have significant technical issues with the design
of systemd then take them up in the appropriate way. Belittling
contributors because of perceived notions of their behaviour is
inappropriate.

(For what it's worth, I've never had any trouble getting a useful
response from Lennart when I've raised a technical issue with him)


That is the issue. In every discussion I have seen Lennart and all his 
supporters say well if you don't like it
use something else. Show me on example where it has been otherwise in the last 
month on this mailing list.



--
Stephen Clark
*NetWolves*
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.cl...@netwolves.com
http://www.netwolves.com
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-20 Thread Lennart Poettering
On Sun, 19.06.11 19:09, Steve Clark (scl...@netwolves.com) wrote:

 Aaron, haven't you figured it out yet? As far as Lennart is concerned it is 
 his way or the highway!
 
 My $.02 after following all the threads about sysemd/ctl.

This is such a useless comment. In this thread alone I accepted two
suggestions and added them to the TODO list, and there are now even
patches for both of them, and we'll merge them.

You know, we are very open for suggestions and we *listen*. That doesn't
mean we do everything people demand from us. We will always have to
reject a few things people suggest, for various reasons. 

You need to understand that you are not the only user of systemd. That
means we will not implement everything you ask us to. But just because
we said no to one or more of your suggestions doesn't mean it's our
way or the highway.

It's folks like you who really make me wonder why I still bother with
fedora-devel. If fools like you don't get what they want they
automatically assume that nobody gets what what they want. But that's
just bogus and stupid.

Everybody else, please ignore Steve, and continue to constructively make
suggestions what we can improve in systemd, because that's
appreciated. And don't be disappointed if we'll not say Yes to
everything suggested.

Steve, grow up!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-20 Thread Lennart Poettering
On Mon, 20.06.11 06:50, Steve Clark (scl...@netwolves.com) wrote:

 That is the issue. In every discussion I have seen Lennart and all his
 supporters say well if you don't like it use something else. Show me
 on example where it has been otherwise in the last month on this
 mailing list.

You are quite offensive. In this very thread here are at least two mails
where I offered to make changes requested on fedora-devel:

http://lists.fedoraproject.org/pipermail/devel/2011-June/13024.html 
(SYSTEMD_PAGER)

http://lists.fedoraproject.org/pipermail/devel/2011-June/153022.html (support 
for systems with no pager installed)

(and for both these issues we now have patches even, shortly to be
merged. How awesome!)

But anyway, I presume that arguing with you on this is a pointless
excercise, so I'll just take some time off fedora-devel again, and leave
you to your FUD party. Enjoy!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-20 Thread Lennart Poettering
On Mon, 20.06.11 11:12, Michal Hlavinka (mhlav...@redhat.com) wrote:

 I'll add one (small) inconsistency:
 
 # systemctl is-active service
 
 has following output:
   active
 and sets exit code. If you don't wont any output, you need to use --quiet
 
 # systemctl is-enabled service
 just sets exit code.
 
 I'd prefer if the behaviour of is-active and is-enabled is the same: 
 simple output and --quiet option.

I added this to the todo list now. Though I do wonder if we change this
now if people will complain... ;-)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-20 Thread Bill Nottingham
Sam Varshavchik (mr...@courier-mta.com) said: 
 * Make chkconfig know about systemd, so if it gets an on or off for
 a service, it executes systemctl enable/disable instead.

It already does this.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-20 Thread Sam Varshavchik

Bill Nottingham writes:


Sam Varshavchik (mr...@courier-mta.com) said:
 * Make chkconfig know about systemd, so if it gets an on or off for
 a service, it executes systemctl enable/disable instead.

It already does this.


Strange. If I pass the service name in the --initscript argument to  
alternatives, I get some kind of a whine:


# /usr/sbin/alternatives --install /usr/sbin/sendmail mta 
/usr/lib/courier/bin/sendmail 91 \
   --slave /usr/bin/mailq mta-mailq /usr/lib/courier/bin/mailq \
   --slave /usr/bin/rmail mta-rmail /usr/lib/courier/bin/rmail \
   --slave /usr/bin/newaliases mta-newaliases \
/usr/lib/courier/sbin/makealiases \
   --initscript courier
error reading information on service courier: No such file or directory

Yet, chkconfig courier on works, so the breakage is between alternatives  
and chkconfig.




pgpQ41Mjmapsb.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-20 Thread Bill Nottingham
Sam Varshavchik (mr...@courier-mta.com) said: 
 Sam Varshavchik (mr...@courier-mta.com) said:
  * Make chkconfig know about systemd, so if it gets an on or off for
  a service, it executes systemctl enable/disable instead.
 
 It already does this.
 
 Strange. If I pass the service name in the --initscript argument to
 alternatives, I get some kind of a whine:
 
 # /usr/sbin/alternatives --install /usr/sbin/sendmail mta 
 /usr/lib/courier/bin/sendmail 91 \
--slave /usr/bin/mailq mta-mailq /usr/lib/courier/bin/mailq \
--slave /usr/bin/rmail mta-rmail /usr/lib/courier/bin/rmail \
--slave /usr/bin/newaliases mta-newaliases \
 /usr/lib/courier/sbin/makealiases \
--initscript courier
 error reading information on service courier: No such file or directory
 
 Yet, chkconfig courier on works, so the breakage is between
 alternatives and chkconfig.

Please file this - thanks!

Bill



 -- 
 devel mailing list
 devel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/devel

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-19 Thread Aaron Sowry
On Sat, Jun 18, 2011 at 10:25:53PM +0200, Lennart Poettering wrote:
  Yes, but the difference here is that ls does not re-implement something 
  that
  is already available at the command line.
 
 Hmm???

The formatting done by ls is not already available to the user as a command 
that can be piped to.

   And how does that matter for Fedora?
  
  It doesn't I guess, but are you writing systemd for Fedora, or as a general
  replacement for SysV init?
 
 But what's the point of discussing this on fedora-devel then?

Because this seems to be the place where systemd is being developed, tested,
implemented and discussed. If there are other more appropriate channels, please
let me know what they are.

   Yes, absolutely. systemd depends on util-linux for the gettys, for fsck,
   for mount, for umount, for swapoff, for swapon -- all these commands are
   more than just wrappers around kernel functionality and are pretty much
   the Linux API for the respective functionality.
  
  Sure, but as far as I can tell, util-linux is not in the dependency
  list.
 
 The README of systemd lists it pretty explicitly including a version
 number.

Alright, I missed that.


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Martin Dengler
On Sat, Jun 18, 2011 at 10:46:48AM +0200, Aaron Sowry wrote:
 On Fri, Jun 17, 2011 at 04:31:08PM -0700, Jesse Keating wrote:
  The apps that I've seen where they do something special like paging the 
  output by default, will not do that if the output is a non-active tty, 
  such as a pipe.  When you pipe it into something it'll react differently.
 
 Yes, and this is exactly the problem. When I run 'systemctl --all'
 on the tty, I get paging and column headers. When I pipe into
 something, I get no paging and no column headers.

Your point about column headers is taken (explicitly, in my mail) and
bears no more repeating since there's a bug about it.

Your point about paging continues to be that you don't like it for the
purist reason that unix-y tools shouldn't format their output.  Or
format it too much, since many tools do do formatting already.  grep
and git already do something too impure for you and have been doing so
for a long time.  I'm happy this is the default.  If you're not, why
not file a bug?  It's more effective than complaining on a downstream
mailing list.

 /Aaron

Martin





pgpNW91wh3QFL.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Martin Dengler
On Sun, Jun 19, 2011 at 09:46:29AM +0200, Aaron Sowry wrote:
 On Sat, Jun 18, 2011 at 10:25:53PM +0200, Lennart Poettering wrote:
   Yes, but the difference here is that ls does not re-implement something 
   that
   is already available at the command line.
  
  Hmm???
 
 The formatting done by ls is not already available to the user as
 a command that can be piped to.

Of course the formatting done is (already available to the user).
With sed, awk, cut, join, sh, etc. lots of formatting logic is already
technically available.  It's just nobody wants to have to construct
crazy pipe commands all the time and tradeoffs and defaults have been
chosen.

Martin






pgp4aEzvzcrD8.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Aaron Sowry
On Sun, Jun 19, 2011 at 10:03:05AM +0100, Martin Dengler wrote:
 Your point about column headers is taken (explicitly, in my mail) and
 bears no more repeating since there's a bug about it.

I didn't realise there was a bug for this, which is it?

 Your point about paging continues to be that you don't like it for the
 purist reason that unix-y tools shouldn't format their output.

This is not just purism for purism's sake, I think the point is being lost here
somewhere. To clarify, coding applications in this way results in:

- Additional code to deal with output logic in different situations, which like
all code, is potentially buggy. This is especially true when there is
distribution-specific logic in the code.

- Additional flags and corresponding documentation to modify behaviour which has
been imposed on you by the author (--no-pager, adding/removing column headers,
enabling/disabling --full output)

- Output format from a command being non-obvious unless you are intimately 
familiar
with the specific output logic of the command.

- Additional dependencies and potential non-portability to other systems which
may not satisfy these dependencies.

- Increased learning curve, since behaviour differs from most other commonly
used applications.

The list goes on. If you want to call it purism then fine, just don't pretend
there are no valid reasons for it.

 I'm happy this is the default.  If you're not, why
 not file a bug?  It's more effective than complaining on a downstream
 mailing list.

I already did, bug 713567. It was CLOSED WONTFIX within 45 minutes.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Aaron Sowry
On Sun, Jun 19, 2011 at 10:11:15AM +0100, Martin Dengler wrote:
  The formatting done by ls is not already available to the user as
  a command that can be piped to.
 
 Of course the formatting done is (already available to the user).
 With sed, awk, cut, join, sh, etc. lots of formatting logic is already
 technically available.  It's just nobody wants to have to construct
 crazy pipe commands all the time and tradeoffs and defaults have been
 chosen.

If ls forked a bunch of forked processes internally in order to provide the
formatted output, then yes, I would have the same problem with it as I do with
systemctl. If you can justify re-implementing a formatting algorithm in the
program itself, then it's probably too difficult to achieve at the commandline.
If you can't justify writing the code to do this, then it's easy enough to do at
the commandline.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Martin Dengler
On Sun, Jun 19, 2011 at 12:54:38PM +0200, Aaron Sowry wrote:
 On Sun, Jun 19, 2011 at 10:03:05AM +0100, Martin Dengler wrote:
  Your point about column headers is taken (explicitly, in my mail) and
  bears no more repeating since there's a bug about it.
 
 I didn't realise there was a bug for this, which is it?

You alluded to RH #713567 in [1], so I assumed that bug had this point
in it.  Re-reading it, it does.

  Your point about paging continues to be that you don't like it for the
  purist reason that unix-y tools shouldn't format their output.
 
 This is not just purism for purism's sake.

You said tools paging their tty-destined output irked the crap[1]
out of you and didn't otherwise disagree that other tools do this (and
other things) based on tty-ness.  I'm not sure I was wrong to read
that as a purist's lament given the additional code is trivial in
length.

 I think the point is being lost here somewhere.
 [original paging-takes-code point]
 [new points objecting to paging]

The original point and new points you just applied to the irkesome
behaviour are simply not compelling: that 50+ lines of pager-related C
is somehow a fearsome vector for terrible bugs and must be excised or
that the year-old chosen defaults for a new command can be changed
with flags somehow impose a crippling learning curve.  Especially,
given (like I said) the precedents and utility of the defaults (which
you didn't argue with[2]).

 /Aaron

Martin

1. http://lists.fedoraproject.org/pipermail/devel/2011-June/152993.html

2. You said[3] you disputed the utility of paging-by-default, which is
   the behaviour I praised, and that I missed your dispute as to its
   utility in [1], but, no, actually, you gave no reasons why it
   wasn't useful in [1].  You just said it irked you, had a real
   danger of scary bugs, and had a bug when no pager was present,
   none of which are arguments for uselessness.

3. http://lists.fedoraproject.org/pipermail/devel/2011-June/152997.html



pgpBuY6zkL02M.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Aaron Sowry
On Sun, Jun 19, 2011 at 06:43:46PM +0100, Martin Dengler wrote:
 On Sun, Jun 19, 2011 at 12:54:38PM +0200, Aaron Sowry wrote:
  On Sun, Jun 19, 2011 at 10:03:05AM +0100, Martin Dengler wrote:
   Your point about column headers is taken (explicitly, in my mail) and
   bears no more repeating since there's a bug about it.
  
  I didn't realise there was a bug for this, which is it?
 
 You alluded to RH #713567 in [1], so I assumed that bug had this point
 in it.  Re-reading it, it does.

That bug has been closed.

   Your point about paging continues to be that you don't like it for the
   purist reason that unix-y tools shouldn't format their output.
  
  This is not just purism for purism's sake.
 
 You said tools paging their tty-destined output irked the crap[1]
 out of you and didn't otherwise disagree that other tools do this (and
 other things) based on tty-ness.  I'm not sure I was wrong to read
 that as a purist's lament given the additional code is trivial in
 length.

This is not a deposition, and I'm not here to discuss semantics. Whatever you
took irked the crap to mean, the intended meaning was that it bothers me as a
symptom of poor programming convention.

  I think the point is being lost here somewhere.
  [original paging-takes-code point]
  [new points objecting to paging]
 
 The original point and new points you just applied to the irkesome
 behaviour are simply not compelling:

Matter of opinion.

 that 50+ lines of pager-related C
 is somehow a fearsome vector for terrible bugs and must be excised

A blatant exaggeration of what was actually said.

If, however, you really feel that you require concrete
examples, earlier in the thread it was pointed out by Lennart that Implicit
--full when using a pager has been the default since quite some time in
systemd. I'm assuming he meant when not using tty, but whether that's a typo 
or
not, I'm not seeing this behaviour in F15 in either the tty or non-tty case
anyway. Assuming this is a bug and not just a misunderstanding, then this is
exactly the kind of thing I'm talking about when I say that extra logic to try
and be clever *is* indeed a vector for annoying bugs.

 or that the year-old chosen defaults for a new command can be changed
 with flags somehow impose a crippling learning curve.  Especially,
 given (like I said) the precedents and utility of the defaults (which
 you didn't argue with[2]).

Again, an exaggeration, but with a thread of truth to it. alias
systemctl=systemctl --no-pager has been suggested as an acceptable solution to
disable paged output, except then if I pipe through less, as per every
other command I use, I lose column headers. Do I need to add --force-headers
or something to my alias too? Possibly not crippling, but learning to have to do
this to get sensible output is certainly a learning curve.

 2. You said[3] you disputed the utility of paging-by-default, which is
the behaviour I praised, and that I missed your dispute as to its
utility in [1], but, no, actually, you gave no reasons why it
wasn't useful in [1].  You just said it irked you, had a real
danger of scary bugs, and had a bug when no pager was present,
none of which are arguments for uselessness.

If I haven't made the disputes clear enough for you by now, then I'm afraid I'm
not sure what else I can say. Uselessness it probably not the point here 
though, the
point is all of the other downsides associated with such an implementation.
Paging is certainly useful, however |less is not a difficult thing to type.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Reindl Harald


Am 19.06.2011 20:48, schrieb Aaron Sowry:

 If I haven't made the disputes clear enough for you by now, then I'm afraid 
 I'm
 not sure what else I can say. Uselessness it probably not the point here 
 though, the
 point is all of the other downsides associated with such an implementation.
 Paging is certainly useful, however |less is not a difficult thing to type.

i agree with you!

the point is not (only) if |less is easy to type

* one will use less, the other one more, the third his own pager
* pagers are existing
* everybody knows them

the unix-way IS NOT to include such things directly in any application
nobody needs autopaging and the 3 peopole who needs can set an alias
but to need an alias for all the other?

most peopole today are working on a Desktop with a terminal like konsole
or whatelese which understands scrolling - pafing is a uasbility crime
as default here since my mouse-wheel let me better position where i want



signature.asc
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Rich Mattes
On 06/19/2011 03:46 AM, Aaron Sowry wrote:
 And how does that matter for Fedora?
 It doesn't I guess, but are you writing systemd for Fedora, or as a general
 replacement for SysV init?
 But what's the point of discussing this on fedora-devel then?
 Because this seems to be the place where systemd is being developed, tested,
 implemented and discussed. If there are other more appropriate channels, 
 please
 let me know what they are.


The best place to discuss bugs and design decisions for a project is on 
that project's mailing list[1].  fedora-devel is the correct forum if 
there are Fedora related integration issues, but whether or not systemd 
pages output by default is more of a project level issue.

Rich

[1] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-19 Thread Steve Clark

On 06/19/2011 06:54 AM, Aaron Sowry wrote:

On Sun, Jun 19, 2011 at 10:03:05AM +0100, Martin Dengler wrote:

Your point about column headers is taken (explicitly, in my mail) and
bears no more repeating since there's a bug about it.

I didn't realise there was a bug for this, which is it?


Your point about paging continues to be that you don't like it for the
purist reason that unix-y tools shouldn't format their output.

This is not just purism for purism's sake, I think the point is being lost here
somewhere. To clarify, coding applications in this way results in:

- Additional code to deal with output logic in different situations, which like
all code, is potentially buggy. This is especially true when there is
distribution-specific logic in the code.

- Additional flags and corresponding documentation to modify behaviour which has
been imposed on you by the author (--no-pager, adding/removing column headers,
enabling/disabling --full output)

- Output format from a command being non-obvious unless you are intimately 
familiar
with the specific output logic of the command.

- Additional dependencies and potential non-portability to other systems which
may not satisfy these dependencies.

- Increased learning curve, since behaviour differs from most other commonly
used applications.

The list goes on. If you want to call it purism then fine, just don't pretend
there are no valid reasons for it.


I'm happy this is the default.  If you're not, why
not file a bug?  It's more effective than complaining on a downstream
mailing list.

I already did, bug 713567. It was CLOSED WONTFIX within 45 minutes.

/Aaron

Aaron, haven't you figured it out yet? As far as Lennart is concerned it is his 
way or the highway!

My $.02 after following all the threads about sysemd/ctl.

--
Stephen Clark
*NetWolves*
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.cl...@netwolves.com
http://www.netwolves.com
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-19 Thread Rahul Sundaram
On 06/20/2011 04:39 AM, Steve Clark wrote:
 Aaron, haven't you figured it out yet? As far as Lennart is concerned
 it is his way or the highway!

 My $.02 after following all the threads about sysemd/ctl.

This is not a constructive way to participate.  There is valid room for
disagreement but please stick to technical discussions only and avoid
personal attacks. 

Rahul
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-19 Thread Matthew Garrett
On Sun, Jun 19, 2011 at 07:09:14PM -0400, Steve Clark wrote:

Aaron, haven't you figured it out yet? As far as Lennart is concerned it
is his way or the highway!
 
My $.02 after following all the threads about sysemd/ctl.

Steve,

This is a technical mailing list and this kind of response is 
unproductive. If you have significant technical issues with the design 
of systemd then take them up in the appropriate way. Belittling 
contributors because of perceived notions of their behaviour is 
inappropriate.

(For what it's worth, I've never had any trouble getting a useful 
response from Lennart when I've raised a technical issue with him)

-- 
Matthew Garrett | mj...@srcf.ucam.org
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-19 Thread Martin Langhoff
On Sat, Jun 18, 2011 at 11:25 AM, Lennart Poettering
mzerq...@0pointer.de wrote:
 You know, I'd prefer if you take up your beef with ls first. Have you
 ever compared the output of ls and of ls | cat? And that's just the
 most obvious case.

Indeed, ls, grep, git and many many modern cli tools use this convention.

ls and grep have done it for ages, and we're all happier for that.

As many others, I am learning systemd and I have my moments of doubt,
confusion, and argh, too much change under my feet.

But the output formatting on a tty?!

Let's have interesting discussion of systemd -- lots of things that
were familiar are now new and strange. But keep overreactions in
check, and the discussion technical and productive.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-19 Thread Sam Varshavchik

Martin Langhoff writes:


Let's have interesting discussion of systemd -- lots of things that
were familiar are now new and strange. But keep overreactions in
check, and the discussion technical and productive.


Here's something I just stumbled upon.

alternatives has a parameter --initscript that ties in alternatives with an  
initscript. Switching between alternative services results in alternatives  
running chkconfig on/off automatically.


There does not appear to be an analogue for systemd. I think that one of  
three things needs to be done:


* Have alternatives run systemctl enable/disable, for systemd-based  
services, or


* Make chkconfig know about systemd, so if it gets an on or off for a  
service, it executes systemctl enable/disable instead.


* The third solution is even more interesting. Instead of alternatives  
enabling or disabling services, directly or indirectly, have systemd run  
alternatives itself. systemctl enable or disable maps directly into  
alternatives --install and --remove.




pgpkOyst2EoRF.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-18 Thread Aaron Sowry
On Fri, Jun 17, 2011 at 04:31:08PM -0700, Jesse Keating wrote:
 The apps that I've seen where they do something special like paging the 
 output by default, will not do that if the output is a non-active tty, 
 such as a pipe.  When you pipe it into something it'll react differently.

Yes, and this is exactly the problem. When I run 'systemctl --all' on the tty, 
I get paging and column headers. When I pipe into something, I get no paging 
and no column headers. The assumption here is apparently that if the output is 
not going to tty then it is not destined for human eyes, which is an absolutely 
ridiculous assumption to make. If I output to a file so I can look at things 
later, I get no headers, and have no option to force them on non-tty output.

This alone may seem fairly trivial, but the problem is that there are many of 
these trivialities, all of which seem to stem from authors who either don't 
understand UNIX programming, or are actively choosing to ignore convention. 
Seriously, if anybody suggests that the solution to the above problem is to add 
a '--force-headers' flag, I think I'm going to start using Windows. We need to 
start having this discussion before more of this stupid behaviour starts 
finding its way into other core components of Fedora.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-18 Thread Ville Skyttä
On 06/18/2011 01:06 AM, Aaron Sowry wrote:
 n Fri, Jun 17, 2011 at 10:41:14PM +0100, Martin Dengler wrote:
 As you point out, git-log and --help do this too.  It's excellent.
 Make it configurable if you must, but I'd be interested to think why
 you think it's not always the useful thing to do.
 
 The reasons why it's not the useful thing to do were pointed out in my 
 previous email.

I don't appreciate the default paging behavior at all either, but at
least git gives me an easy global way to get rid of it: export
GIT_PAGER=cat in ~/.bash_profile.  systemctl does not seem to offer
anything comparable (remembering to type --no-pager or setting $PAGER
which affects other things do not count), or did I miss something?
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Lennart Poettering
On Fri, 17.06.11 22:16, Aaron Sowry (aaron...@aeneby.se) wrote:

 Hello,

Heya,

 I'd like to discuss the behaviour of systemctl. See RH bug 713567 for 
 context. To summarise:
 
 - 'systemctl --all' pages by default when the output is to tty. This
   consumes 50-60+ lines of potentially bug-prone code, and irks the
   crap out of me as a system administrator. systemctl's jurisdiction
   ends at stdout.

Well, I think in genreal the autopaging behaviour of git and other tools
is very much appreciated. If you hate that behaviour then you are
probably in the minority, and we have to agree to disagree on the
benefits of this behaviour. Setting alias systemctl='systemctl
--no-pager' is not particularly hard though.

 - The same command outputs column headers on tty, and no headers
   otherwise. This is inconsistent. If I am outputting to a file, or
   perhaps a printer, and want headers on my non-tty output, I have to
   add them myself since there is no flag to force them on non-tty
   channels. If I don't want them and they are present, I tail.

I am pretty sure that if you ask us nicely, we'll add an option to
enable headers nonetheless. It's however usually simpler if you pipe
something not to have to use tail/head.

 - Currently, if I run 'systemctl --all' and have no pager (at least no
   pager that systemctl knows of) available, I get an error message and
   no output. This is horribly bad form, and forces me to use
   --no-pager or pipe to cat in order to get output. This issue is
   acknowledged in RH bug 713707.

We generally do not support if people delete arbitrary things from their
installation. /bin/more is part of util-linux, and if you delete that
then you broke your system, so don't complain to us please.

I am not saying we shouldn't make it possible to run without any pager
installed. But does this matter? No, not at all. It doesn't have
priority in any way.

It's probably one of those cases where supplying us with a clean,
minimal patch is the most compelling argument to make your
point. Complaining on mailing lists not so much.

 - Another bright idea (RH bug 713567) is that --full should be applied
   to non-tty output automatically, and not to tty output.

Yes, it actually makes sense and has been requested which is why we
implemented it.

 All of these peculiarities stem from poor UNIX programming
 practise. 

I think all of these peculiarities stem from actually accepting
progress.

 No other Linux/UNIX tools make this assumption (with
 perhaps the exception of git-log et. al.), and if you are wanting
 administrators to feel comfortable with your new soon-to-be-ubiquitous
 tools, then I suggest you try to be consistent with existing
 convention. 

I think you are mixing up administrators with Aaron Sowry.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Lennart Poettering
On Sat, 18.06.11 10:46, Aaron Sowry (aaron...@aeneby.se) wrote:

 On Fri, Jun 17, 2011 at 04:31:08PM -0700, Jesse Keating wrote:
  The apps that I've seen where they do something special like paging the 
  output by default, will not do that if the output is a non-active tty, 
  such as a pipe.  When you pipe it into something it'll react differently.
 
 Yes, and this is exactly the problem. When I run 'systemctl --all' on
 the tty, I get paging and column headers. When I pipe into something,
 I get no paging and no column headers. The assumption here is
 apparently that if the output is not going to tty then it is not
 destined for human eyes, which is an absolutely ridiculous assumption
 to make. If I output to a file so I can look at things later, I get no
 headers, and have no option to force them on non-tty output.
 
 This alone may seem fairly trivial, but the problem is that there are
 many of these trivialities, all of which seem to stem from authors who
 either don't understand UNIX programming, or are actively choosing to
 ignore convention. Seriously, if anybody suggests that the solution to
 the above problem is to add a '--force-headers' flag, I think I'm
 going to start using Windows. We need to start having this discussion
 before more of this stupid behaviour starts finding its way into other
 core components of Fedora.

Supposedly non-UNIXy behaviour on Linux causes you to switch to Windows?
Yeah, that makes sense! Awesome logic!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Lennart Poettering
On Sat, 18.06.11 13:02, Ville Skyttä (ville.sky...@iki.fi) wrote:

 
 On 06/18/2011 01:06 AM, Aaron Sowry wrote:
  n Fri, Jun 17, 2011 at 10:41:14PM +0100, Martin Dengler wrote:
  As you point out, git-log and --help do this too.  It's excellent.
  Make it configurable if you must, but I'd be interested to think why
  you think it's not always the useful thing to do.
  
  The reasons why it's not the useful thing to do were pointed out in my 
  previous email.
 
 I don't appreciate the default paging behavior at all either, but at
 least git gives me an easy global way to get rid of it: export
 GIT_PAGER=cat in ~/.bash_profile.  systemctl does not seem to offer
 anything comparable (remembering to type --no-pager or setting $PAGER
 which affects other things do not count), or did I miss something?

Ask us nicely and we'll add SYSTEMD_PAGER for you, taking precedence
over PAGER.

Even more convincing might be prepping a patch for this.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Miloslav Trmač
On Sat, Jun 18, 2011 at 1:55 PM, Lennart Poettering
mzerq...@0pointer.de wrote:
 I'd like to discuss the behaviour of systemctl. See RH bug 713567 for 
 context. To summarise:

 - 'systemctl --all' pages by default when the output is to tty. This
   consumes 50-60+ lines of potentially bug-prone code, and irks the
   crap out of me as a system administrator. systemctl's jurisdiction
   ends at stdout.

 Well, I think in genreal the autopaging behaviour of git and other tools
 is very much appreciated. If you hate that behaviour then you are
 probably in the minority, and we have to agree to disagree on the
 benefits of this behaviour.

While much of The UNIX way is folklore, some conventions for the
(GNU/)Linux platform actually exist and have been explicitly
documented, and they haven't disappeared only because git happens to
ignore some of them. (info standards 'Program behavior' 'User
Interfaces')
Mirek
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Ville Skyttä
On 06/18/2011 03:02 PM, Lennart Poettering wrote:

 Ask us nicely and we'll add SYSTEMD_PAGER for you, taking precedence
 over PAGER.
 
 Even more convincing might be prepping a patch for this.

https://bugs.freedesktop.org/show_bug.cgi?id=38439
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Aaron Sowry
On Sat, Jun 18, 2011 at 01:55:43PM +0200, Lennart Poettering wrote:
  - 'systemctl --all' pages by default when the output is to tty. This
consumes 50-60+ lines of potentially bug-prone code, and irks the
crap out of me as a system administrator. systemctl's jurisdiction
ends at stdout.
 
 Well, I think in genreal the autopaging behaviour of git and other tools
 is very much appreciated. If you hate that behaviour then you are
 probably in the minority, and we have to agree to disagree on the
 benefits of this behaviour. Setting alias systemctl='systemctl
 --no-pager' is not particularly hard though.

Setting aliases does not remove cruft code, or documentation for flags which
don't need to exist. Flags should be used to enable functionality, not disable
bloat.

  - The same command outputs column headers on tty, and no headers
otherwise. This is inconsistent. If I am outputting to a file, or
perhaps a printer, and want headers on my non-tty output, I have to
add them myself since there is no flag to force them on non-tty
channels. If I don't want them and they are present, I tail.
 
 I am pretty sure that if you ask us nicely, we'll add an option to
 enable headers nonetheless. It's however usually simpler if you pipe
 something not to have to use tail/head.

Yet another flag to work around inconsistent behaviour is the last thing
systemctl needs. Simplicity is not the issue here - you are assuming that output
piped to something other than a tty is not destined for human eyes. I shouldn't
have to convince you that this is nonsense, and will only get worse if --full is
applied automatically to all non-tty output. Shall we add a --no-full flag to
work around this, too?

  - Currently, if I run 'systemctl --all' and have no pager (at least no
pager that systemctl knows of) available, I get an error message and
no output. This is horribly bad form, and forces me to use
--no-pager or pipe to cat in order to get output. This issue is
acknowledged in RH bug 713707.
 
 We generally do not support if people delete arbitrary things from their
 installation. /bin/more is part of util-linux, and if you delete that
 then you broke your system, so don't complain to us please.

It is difficult to concieve where systemd might end up in future. Is util-linux
a systemd dependency?

 I am not saying we shouldn't make it possible to run without any pager
 installed. But does this matter? No, not at all. It doesn't have
 priority in any way.

It may not be a priority, but nor should it even be an issue.

  - Another bright idea (RH bug 713567) is that --full should be applied
to non-tty output automatically, and not to tty output.
 
 Yes, it actually makes sense and has been requested which is why we
 implemented it.

This is being implemented now?

  All of these peculiarities stem from poor UNIX programming
  practise. 
 
 I think all of these peculiarities stem from actually accepting
 progress.

Subjective opinion.

  No other Linux/UNIX tools make this assumption (with
  perhaps the exception of git-log et. al.), and if you are wanting
  administrators to feel comfortable with your new soon-to-be-ubiquitous
  tools, then I suggest you try to be consistent with existing
  convention. 
 
 I think you are mixing up administrators with Aaron Sowry.

Not really. All other administrators use exactly the same tools I do, very few
of which behave like systemctl. Having to deal with command-specific behaviour
only makes it more difficult to learn a new tool.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-18 Thread Lennart Poettering
On Sat, 18.06.11 16:39, Aaron Sowry (aaron...@aeneby.se) wrote:

   - The same command outputs column headers on tty, and no headers
 otherwise. This is inconsistent. If I am outputting to a file, or
 perhaps a printer, and want headers on my non-tty output, I have to
 add them myself since there is no flag to force them on non-tty
 channels. If I don't want them and they are present, I tail.
  
  I am pretty sure that if you ask us nicely, we'll add an option to
  enable headers nonetheless. It's however usually simpler if you pipe
  something not to have to use tail/head.
 
 Yet another flag to work around inconsistent behaviour is the last thing
 systemctl needs. Simplicity is not the issue here - you are assuming that 
 output
 piped to something other than a tty is not destined for human eyes. I 
 shouldn't
 have to convince you that this is nonsense, and will only get worse if --full 
 is
 applied automatically to all non-tty output. Shall we add a --no-full flag to
 work around this, too?

You know, I'd prefer if you take up your beef with ls first. Have you
ever compared the output of ls and of ls | cat? And that's just the
most obvious case.

Generating slightly different output on a tty than when used in another
way is deeply rooted in Linux heritage. Autopaging is just a small step
forward in that area. And a very welcome one. In this regard systemd is
just following the evolution of Linux. We are not revolutionizing in
this area, and we are not pioneering either.

   - Currently, if I run 'systemctl --all' and have no pager (at least no
 pager that systemctl knows of) available, I get an error message and
 no output. This is horribly bad form, and forces me to use
 --no-pager or pipe to cat in order to get output. This issue is
 acknowledged in RH bug 713707.
  
  We generally do not support if people delete arbitrary things from their
  installation. /bin/more is part of util-linux, and if you delete that
  then you broke your system, so don't complain to us please.
 
 It is difficult to concieve where systemd might end up in future. 

And how does that matter for Fedora?

 Is util-linux a systemd dependency?

Yes, absolutely. systemd depends on util-linux for the gettys, for fsck,
for mount, for umount, for swapoff, for swapon -- all these commands are
more than just wrappers around kernel functionality and are pretty much
the Linux API for the respective functionality.

   - Another bright idea (RH bug 713567) is that --full should be applied
 to non-tty output automatically, and not to tty output.
  
  Yes, it actually makes sense and has been requested which is why we
  implemented it.
 
 This is being implemented now?

Hmm? Implicit --full when using a pager has been the default since quite
some time in systemd.

   No other Linux/UNIX tools make this assumption (with
   perhaps the exception of git-log et. al.), and if you are wanting
   administrators to feel comfortable with your new soon-to-be-ubiquitous
   tools, then I suggest you try to be consistent with existing
   convention. 
  
  I think you are mixing up administrators with Aaron Sowry.
 
 Not really. All other administrators use exactly the same tools I do, very few
 of which behave like systemctl. Having to deal with command-specific behaviour
 only makes it more difficult to learn a new tool.

Yupp, as I see it it eases an administrator's life.

I guess we just have to agree to disagree on this, and leave it at
this. Sorry if that is disappointing.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Ralf Ertzinger
Hi.

On Sat, 18 Jun 2011 17:25:36 +0200, Lennart Poettering wrote

 another way is deeply rooted in Linux heritage. Autopaging is just a
 small step forward in that area. And a very welcome one.

Do you have anything to back that claim up?
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-18 Thread Aaron Sowry
On Sat, Jun 18, 2011 at 05:25:36PM +0200, Lennart Poettering wrote:
 You know, I'd prefer if you take up your beef with ls first. Have you
 ever compared the output of ls and of ls | cat? And that's just the
 most obvious case.

Yes, but the difference here is that ls does not re-implement something that
is already available at the command line.

 Generating slightly different output on a tty than when used in another
 way is deeply rooted in Linux heritage. Autopaging is just a small step
 forward in that area.

Not sure I agree, but okay.

 And how does that matter for Fedora?

It doesn't I guess, but are you writing systemd for Fedora, or as a general
replacement for SysV init?

  Is util-linux a systemd dependency?
 
 Yes, absolutely. systemd depends on util-linux for the gettys, for fsck,
 for mount, for umount, for swapoff, for swapon -- all these commands are
 more than just wrappers around kernel functionality and are pretty much
 the Linux API for the respective functionality.

Sure, but as far as I can tell, util-linux is not in the dependency list.

 Hmm? Implicit --full when using a pager has been the default since quite
 some time in systemd.

Strange - I'm not seeing it in systemd-units-26-3.fc15.x86_64.

  Not really. All other administrators use exactly the same tools I do, very 
  few
  of which behave like systemctl. Having to deal with command-specific 
  behaviour
  only makes it more difficult to learn a new tool.
 
 Yupp, as I see it it eases an administrator's life.
 
 I guess we just have to agree to disagree on this, and leave it at
 this. Sorry if that is disappointing.

It is disappointing. Specifics aside, my general point is that administrators
don't need hand-holding and understand that there are pagers available for use
outside of the program itself. Imposing behaviour on users only results in the
problems I've pointed out previously - inconsistent output, inconsistent
behaviour, additional code, additional dependencies, unnecessary flags, learning
curve, non-portability, and so on ad nauseum. I'd love to see it change, I'd
even submit a patch but I'm afraid it would fall on deaf ears. Thanks for taking
the time to respond, anyway.

/Aaron


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-18 Thread Lennart Poettering
On Sat, 18.06.11 21:52, Aaron Sowry (aaron...@aeneby.se) wrote:

 On Sat, Jun 18, 2011 at 05:25:36PM +0200, Lennart Poettering wrote:
  You know, I'd prefer if you take up your beef with ls first. Have you
  ever compared the output of ls and of ls | cat? And that's just the
  most obvious case.
 
 Yes, but the difference here is that ls does not re-implement something that
 is already available at the command line.

Hmm???

  And how does that matter for Fedora?
 
 It doesn't I guess, but are you writing systemd for Fedora, or as a general
 replacement for SysV init?

But what's the point of discussing this on fedora-devel then?

  Yes, absolutely. systemd depends on util-linux for the gettys, for fsck,
  for mount, for umount, for swapoff, for swapon -- all these commands are
  more than just wrappers around kernel functionality and are pretty much
  the Linux API for the respective functionality.
 
 Sure, but as far as I can tell, util-linux is not in the dependency
 list.

The README of systemd lists it pretty explicitly including a version
number.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: The behaviour of systemctl.

2011-06-17 Thread Martin Dengler
On Fri, Jun 17, 2011 at 10:16:35PM +0200, Aaron Sowry wrote:
 Hello,
 
 I'd like to discuss the behaviour of systemctl. See RH bug 713567
 for context. To summarise:
 
 - 'systemctl --all' pages by default when the output is to tty. This
  consumes 50-60+ lines of potentially bug-prone code, and irks the
  crap out of me as a system administrator. systemctl's jurisdiction
  ends at stdout.

As you point out, git-log and --help do this too.  It's excellent.
Make it configurable if you must, but I'd be interested to think why
you think it's not always the useful thing to do.

 All of these peculiarities stem from poor UNIX programming
 practise. Do not try to make decisions for me as a user (especially
 not based on output channels), about how I want my output formatted.

grep has had --color=auto for almost ten years[1].

 No other Linux/UNIX tools make this assumption (with perhaps the
 exception of git-log et. al.)

git and grep alone are a pretty significant set of tools, and I bet
there are others.

I agree with the rest of your objections about inconsistencies and
mistaken error handling.  But the ship has sailed on stdout-is-tty
being an acceptable default driver of different output formatting.

Martin

1. 
http://cvs.savannah.gnu.org/viewvc/grep/grep/src/grep.c?view=diffr1=1.69r2=1.70






pgp23YCGYSlNz.pgp
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-17 Thread Aaron Sowry
n Fri, Jun 17, 2011 at 10:41:14PM +0100, Martin Dengler wrote:
 As you point out, git-log and --help do this too.  It's excellent.
 Make it configurable if you must, but I'd be interested to think why
 you think it's not always the useful thing to do.

The reasons why it's not the useful thing to do were pointed out in my previous 
email.

 grep has had --color=auto for almost ten years[1].

Indeed - so why not use it, instead of, at least in the case of git-log, 
'--decorate'? At least then I can use grep with every output which needs 
'decorating'.

 But the ship has sailed on stdout-is-tty
 being an acceptable default driver of different output formatting.

No ship has sailed anywhere, because there are plenty of places output can be 
sent en route to tty - 'watch' and 'egrep' are two examples. Also, tty is not 
the only place people want to send user-friendly input. What about files and 
printers?


signature.asc
Description: Digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: The behaviour of systemctl.

2011-06-17 Thread Jesse Keating
On 6/17/11 3:06 PM, Aaron Sowry wrote:
 No ship has sailed anywhere, because there are plenty of places
 output can be sent en route to tty - 'watch' and 'egrep' are two
 examples. Also, tty is not the only place people want to send
 user-friendly input. What about files and printers?

The apps that I've seen where they do something special like paging the 
output by default, will not do that if the output is a non-active tty, 
such as a pipe.  When you pipe it into something it'll react differently.

-- 
Jesse Keating RHCE  (http://jkeating.livejournal.com)
Fedora Project  (http://fedoraproject.org/wiki/JesseKeating)
GPG Public Key  (geek.j2solutions.net/jkeating.j2solutions.pub)
identi.ca   (http://identi.ca/jkeating)
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel