Mailinglist Archive: opensuse-features (25 mails)

< Previous Next >
[openFATE 318203] Let's drop commandline support from Yast
Feature changed by: Robert Klein (kleinrob)
Feature #318203, revision 21
Title: Let's drop commandline support from Yast

Info Provider: Damian Ivanov (damianator)
Requested by: Lukas Ocilka (locilka)
Partner organization: openSUSE.org

Description:
Yast provides some kind of a commandline interface which is based on
the same functions provided by standard Yast application (Qt, ncurses).
Comandline could be used for scripting, but there are already tools
that do it better: AutoYast, Chef, Puppet, SUSE Manager, sed (just to
name some).
Yast commadline has several drawbacks:
* not used, not tested, not maintained, too much of obsolete code - too
much maintenance for nothing
* architecturally wrong - commandline interface to an app that uses
commandline tools (e.g., commandline for Services Manager? This is
obviously systemctl)
* implemented as kind of a hack
What do we lose if we remove it?
* Possbility for scripting, but as Yast only builds on other cmdline
tools or files, there are replacements
Another possibility would be to replace commandline with a static
information advicing user which tools to use to configure a particular
service manually.
Just a side note: this is neither about text-based Yast nor graphical
Yast. This is about command-line interface - you have to write commands
manually in some kind of a terminal.

Business case (Partner benefit):
openSUSE.org: Less unused code to maintain == more time to do something
that really matters

Discussion:
#1: Damian Ivanov (damianator) (2014-11-27 13:44:17)
-1 if we are to to do that, retire YaST altogether instead. I always
liked the cmd version of YaST since often the GUI version crashed if
the wrong qt/gtk lib is installed or you fucked up X server. I think
though more and more parts of YaST should be retired and replaced by
other tools but not specifically the ncurses version.

#2: Lukas Ocilka (locilka) (2014-11-27 13:54:53) (reply to #1)
Then please summarize what you use Yast commandline for. I personally
don't see any reason for keeping it. BTW, we do not want to drop zypper
- cmdline tool for software management.

#3: Stakanov Schufter (stakanov) (2014-11-28 18:56:59)
I have to say I did use it quite successful in the past to repair to
errors with nvidia video drivers that did not allow to start any GUI
any more. (Speaking of yast from the CLI). As it turned out that for
somebody that you have to assist on distance after a crash on the
phone, it is far more easy to make yourself understand to that person
because of the similarity of what they see with the command line
version than to have to tell them correct syntax with zypper,
especially when they have to tell you an search what they do have
installed. That is not a very "professional" situation, but, for what I
see, a far more common case in real life than one may think. I do not
say however it is often that I used it. But when I had to use it, it
was, IMO, helpful. The more advanced a user will be, the less s(he)
will need it, of course. YMMV.

#4: Mustafa Muhammad (mustafa_muhammad) (2014-11-29 08:18:35) (reply to
#3)
Maybe you talking about the ncurses interface, running from the commandline
but acts as GUI:
http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.0/userguide-9.0/ch03s10.html
I think this is not about it, it is about the commandline without
ncurses.

#5: Stakanov Schufter (stakanov) (2014-11-29 10:30:21) (reply to #4)
Yes, this is correct. So the ncurses interface would work the same if I
understand you well.
CLI would then mean the isolated modules on the CLI (#yast -l)? If not
how would I call yast from the CLI other then with yast -h If this is
going to be a pure desktop edition than that would make sense. However
I should rather avoid to look from a perspective of a "stand alone
user", shouldn't I?
IMO, one of the strengths of a distribution (free as free beer) like
opensuse is that it brings everything for both CLI administration and
GUI.
My question would now be: the OP then claims that nobody uses yast CLI
and that it has no competitive advantage compared to the set-up of
comparable distributions in a comparable use-case? If it has no
competitive advantage you would take it off. If it has but nobody uses
it: one would have to think about why is this (often lack of visibility
/ documentation, isn't it).
To be honest, the reason why I am writing this is that I recall the
"good idea" to take off SAX at the time, which was then described as a
"belly feeling decision" but as the argument went, it was not supported
any more and nobody wanted to maintain the code. Given the fun than one
had for at least two releases (at least), to get the video set-up run
correctly, I would rather advice to be damn sure that nobody uses it
and needs it and that it has perfect substitutes.
Another question I would have, for the OP but not only, in this regard:
given that opensuse did call for people to write new modules for the
CLI, would this mean that these are going to be isolated from the CLI
function anyway (as this would anyway obsolete the CLI function very
swiftly in case the call for modules will be a success)? It would also
mean that you are sure nobody is coming up with a module that would be
useful also (or especially) to access through the CLI.

#6: Martin Pluskal (pluskalm) (2014-11-29 13:24:26) (reply to #5)
Ncurses (text based interface) and CLI are different things, example of
yast CLI usage would be "yast2 ntp-client enable" - and I dare to
assume that it is actually first time you hear about such
functionality. Possibility of abandoning CLI interface does not mean
that you would not be able to call yast or yast modules from command
line. > given that opensuse did call for people to write new modules
for the CLI "new modules for CLI"- I am not sure I understand what you
mean by this.
To avoid further confusion:
https://en.wikipedia.org/wiki/Command-line_interface vs.
https://en.wikipedia.org/wiki/Text-based_user_interface

#9: Stakanov Schufter (stakanov) (2014-11-29 15:52:33) (reply to #6)
Well, no confusion, just a stupid typo, reads GUI (and not the
textbased ncurses one). So: "Another question I would have, for the OP
but not only, in this regard: given that opensuse did call for people
to write new modules for the GUI (we are speaking of Yast), would this
mean that these are going to be isolated from the CLI function anyway
(as this would anyway obsolete the CLI functions very swiftly in case
the call for modules will be a success as they would not be updated as
well)? It would also mean that you are sure nobody is coming up with a
module for the qt-based, recently rewritten in ruby Yast, that would be
useful also (or especially) to access through the CLI function (and
here I am speaking about the CLI and not textbase).
You are right. Every 50% or more I try to find manuals or explanations
on opensuse, I do find a) the original page with a reference to
opensuse 11.4 or so and an advice that this page is outdated, to click
"here" when you do that you find: this page is currently under
construction or has not been written, with a kind advice that I could
do that...but I needed the info in the first place. I tried to google,
the only available indication for Yast CLI options are for opensuse
10.2 (Max Plank Institute) and 11.4 from some Linux info site. No newer
documentation is available, not even at novell it seems. Novell
documentation refers to 10.3 opensuse.
Besides, it seems that yast CLI is not loved and quite "secret" as I do
not find any documentation easily. Would you expect people to use
things that are not known? Fingerprint reader module in yast was taken
out for example because it was claimed (do not know on what bases) that
nobody used it. I think it was taken out because nobody did find it in
the first place. So on this point I agree with Graham Davis: only
because people do not know about it, that does not mean that it is not
useful.
Ncurses interface (textbase) is IMO useful, I "have heard about it" it
and I use it nearly every time when there is a video driver problem, to
be able to roll back.

#10: Martin Pluskal (pluskalm) (2014-11-29 16:58:10) (reply to #9)
What you mean by "isolated from the CLI function anyway" - I must admit
that I don't follow you here.
"is coming up with a module for the qt-based," - yast modules are afaik
not qt, gtk or ncurses specific, I fail to see how removal of cmdline
yast interface would affect new yast modules.

#15: Lukas Ocilka (locilka) (2014-12-02 13:30:59) (reply to #9)
Maybe I should tell a bit about the Yast architecture ... but linke
might be better:
http://yastgithubio.readthedocs.org/en/latest/architecture/
Yast as you probably use it shares the very same code within ncurses,
Qt (and GTK) interface. It even has the very same definition of
dailogs, only the library that actually shows UI (widgets) differs.
Commandline interface is a pure what-you-write-is-what-you-get such as
`ls`, `grep`, etc. This shares the code with UI interface only partly
and sometimes not at all.

#7: Damian Ivanov (damianator) (2014-11-29 13:48:28)
Just to clarify you want to drop Ncurses interface right? I have not
even heard of a cli interface. If there is a cli interface - ok drop
it.

#8: Graham Davis (cloddy) (2014-11-29 14:26:52) (reply to #7)
Up until this year, I'd not heard of the Ncurses interface either but
then, due to the YaST gui collapse, I found it vital. So, because of
that, I'm a wee bit wary about dropping something because I haven't
heard of it.

#11: Martin Pluskal (pluskalm) (2014-11-29 17:01:43) (reply to #8)
Well original question was if somebody is using cli interface or has
some potential uses for it - and so far all comments provided same
answer to both questions.

#16: Lukas Ocilka (locilka) (2014-12-02 13:32:06) (reply to #7)
No, we definitely want to keep ncurses and Qt.

#12: Neil Rickert (nrickert) (2014-12-01 04:48:27)
Keep the "ncurses" interface. It is valuable to recover from problems
or with ssh access.
If there's another CLI interface other than "ncurses", then I don't use
it and I don't see much point in having it. People who prefer
exclusively CLI administration would probably prefer to do that without
yast.

#13: Martin Pluskal (pluskalm) (2014-12-02 12:45:53)
Well apparently there are some people using yast -i (see
http://www.reddit.com/r/openSUSE/comments/2nxj3s/error_when_installing_apache_2_libula_52_required/
)

#14: Lukas Ocilka (locilka) (2014-12-02 13:23:18) (reply to #13)
Yes, looks like we need to educate users to use zypper. `zypper in
apache2` does the very same as yast -i apache2, but better.

+ #17: Robert Klein (kleinrob) (2015-11-20 11:48:15)
+ I actually use the command line interface of yast in my scripts, e.g.
+ * yast proxy disable
+ * yast2 proxy set http="...."
+ another script
+ * yast2 lan list
+ * yast2 lan show id=$id
+ * yast2 lan edit id=${id} bootproto=static ip=${ip_addr}
+ prefix=${prefix}
+ * yast2 firewall services add zone=EXT service=service:apache2
+ other scripts (not all in the same script)
+ * ast2 nis disable
+ * yast2 groups add groupname=$GROUP gid=$GID type=local
+ * yast2 users add username=$USERNAME uid=$UID cn="USER NAME
+ * yast dns-server zones add name=bubaben.example.com masterserver=192.
+ 168.100.10 zonetype=master
+ and so on. Documentation is almost not existing though.




--
openSUSE Feature:
https://features.opensuse.org/318203

< Previous Next >
This Thread
  • No further messages