LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   console/terminal frontend for yum? (https://www.linuxquestions.org/questions/linux-general-1/console-terminal-frontend-for-yum-711036/)

Juvecu 03-12-2009 07:59 AM

console/terminal frontend for yum?
 
I seldomly have X installed on any of the servers I setup and I'm looking for a frontend to yum that will work from the terminal. I'm sure I'm not the only one finding the yum CLI a tad annoying. An interface similar to the 'pirut' one is what I have in mind, but just ncurses based or something.

I've been searching around for something like this to make life a little easier, but I've had no luck in finding anything useful. Does anyone know if anything like this even exists?

openSauce 03-12-2009 10:27 AM

Don't know of one I'm afraid. However I only use CLI yum and I don't find it annoying. One thing that helps is keeping this file handy:
Code:

yum list all > all-yum.log
so you can quickly grep it for installed and available packages. If you really wanted to you could also make a file with the output of yum info [package] for all packages - it'd be quick to write the script, take a while to run, but then you've got all the info and it would be quicker to grep that than to use pirut.

Juvecu 03-12-2009 10:53 AM

The whole idea is to not have to sift through package lists and such by hand, but to have it in a more graphical presentation.

jamescondron 03-12-2009 11:32 AM

Like a curses interface? Well, if it doesn't exist, write it.

Juvecu 03-12-2009 11:57 AM

Yeps, curses interface would be super. I'm no programmer though, I just recently started playing around with Python to see if I can get started on programming, but I'm teaching myself and it is going extremely slow. I have no clue about writing anything like that.

Just assuming that something like this doesn't exist and then telling someone to write it himself doesn't answer the original question.

openSauce 03-12-2009 01:02 PM

I've been thinking of writing this for a while, so now's as good a time as any.

Code:

yum list all > all-yum.txt # create list of all available and installed packages


# write results of yum info [package name] to yum-info.txt, for all packages.
# NR>13 at the beginning of this line is because all-yum.txt has 13 lines at the top
# which don't begin with package names.  Yours may vary - edit the number to suit.
yum info $(gawk 'NR > 13 && (! /Available Packages/) {match($1, "^[^.]+", A); print A[0]}' all-yum.txt | uniq) | gawk '! (/^Loaded plugins:/ || /^No Presto metadata/ || /^Excluding Packages in/ || /^Finished/ || /^Setting up and reading/)' > yum-info.txt


Want to search for video-related packages? It's as easy as
Code:

grep -iC20 video yum-info.txt | less
Output (more or less):
Code:

Installed Packages
Name      : RealPlayer
Arch      : i586
Version    : 10.1.0.914
Release    : 20050511
Size      : 11 M
Repo      : installed
Summary    : RealPlayer
URL        : http://www.real.com/
License    : RPSL, EULA
Description: RealPlayer is a media player with the aim of providing solid media
          : playback locally and via streaming. It plays RealAudio, RealVideo,
          : MP3, 3GPP Video, Flash, SMIL 2.0, JPEG, GIF, PNG, RealPix and
          : RealText and more. The RealPlayer 10 for Linux builds on top of the
          : popular open-source Helix Player.

I think that's exactly the same description you'd see from Pirut, and I happen to think it's far preferable to using either pirut or a hypothetical ncurses repo browser (it's much quicker), but maybe I'm a bit of a CLI junkie!

Edit: actually a better way to search the file is with this function
Code:

search-yum-info () {
    gawk 'BEGIN {RS="\n\n"; IGNORECASE=1} /'$1'/ {print $0 "\n"}' ~/yum-info.txt
}

$ search-yum-info video
Installed Packages
Name      : RealPlayer
Arch      : i586
Version    : 10.1.0.914
Release    : 20050511
Size      : 11 M
Repo      : installed
Summary    : RealPlayer
URL        : http://www.real.com/
License    : RPSL, EULA
Description: RealPlayer is a media player with the aim of providing solid media
          : playback locally and via streaming. It plays RealAudio, RealVideo,
          : MP3, 3GPP Video, Flash, SMIL 2.0, JPEG, GIF, PNG, RealPix and
          : RealText and more. The RealPlayer 10 for Linux builds on top of the
          : popular open-source Helix Player.

Installed Packages
Name      : ekiga
Arch      : x86_64
Version    : 2.0.11
Release    : 2.fc8
Size      : 13 M
Repo      : installed
Summary    : A Gnome based SIP/H323 teleconferencing application
URL        : http://www.ekiga.org/
License    : GPLv2+
Description: Ekiga is a tool to communicate with video and audio over the
          : internet. It uses the standard SIP and H323 protocols.

Installed Packages
Name      : fbset
Arch      : x86_64
Version    : 2.1
Release    : 24.fc7
Size      : 60 k
Repo      : installed
Summary    : Tools for managing a frame buffer's video mode properties
URL        : http://users.telenet.be/geertu/Linux/fbdev/
License    : GPL
Description: Fbset is a utility for maintaining frame buffer resolutions.  Fbset
          : can change the video mode properties of a frame buffer device, and
          : is usually used to change the current video mode.  Install fbset if
          : you need to manage frame buffer resolutions.
...

All the flexibility of a gui and more, in a few easy lines. You can tell I've got work I'm avoiding...

Juvecu 03-16-2009 04:45 AM

I'm fairly familiar with how to do all this from the CLI by now. The reason I am asking if anyone knows about a text based frontend for yum is because I want to avoid having to spend time on piping output to files and parsing them for whatever. People familiar with text based installers should know what the screens for package selection look like. Those are the pictures coming to mind when I think about a text based frontend for yum.

So in essence I'm looking for a text based frontend for yum where:
(1) you can see at a glance which packages are already installed,
(2) you can view a group in more detail (in the text installer you press F2 and you can see the group's packages),
(3) you can easily select/deselect packages for installation/removal (in the text installer you press spacebar to add/remove an asterix between two square brackets, something like this:[*]),
(4) a search function would be handy (though I can do without this), and
(5) if possible, see a package's description somehow (though I can do without this too.)

Basically "pirut" for the terminal. If anyone knows about something like this I'd appreciate it if you can let me know. (I'm not looking for instructions on how to do it from the CLI.)


All times are GMT -5. The time now is 11:18 AM.