[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dselect improvement -- step #1



DSELECT IMPROVEMENT
===================

Motto: No more poor women!
(http://master.debian.org/~branden/99-10-16=09:45:04.html)

Seriously, there are multiple package manager front ends in Debian now and this
is good, because different users like different UIs.  From what I've seen, my
personal favourite is still dselect -- it's UI is simple but well arranged,
runs on console, resolves dependencies immediately, etc.  The problem with
dselect is that it's unmaintained while Debian grows and handling huge number
of packages in the current selection screen is becoming a big pain.  IMHO this
fact doesn't meen dselect is totally bad and I think few small changes to it
can make it very useful tool again even with big Debian.

If you're interested, read on and let me know what you think about it.


WHAT IS DONE
------------

The first step, to do something actually, was done:

  - Internal package list is prepared for package visibility selections
    now.  This allows hiding uninteresting packages.
  - Selection can't be quit with Return, use `q' now.  The resolution
    screen quit key is still Return, not `q'.  This eliminates the
    "double Return press" in resolution screen, with unintended
    selection escape.  (Maybe better solution would be detecting the double
    press itself?  I don't know, `q' seems to be safer generally.)
  - The following new command line options are available:
     --hiding-level <non-negative number>
       ... hide all package listings below headings at the given
	   level (level=0 means do not hide anything)
     --sort <section|priority|none>
       ... initial section/priority sorting
     --status-sort <status|availability|none>
       ... initial status/availability sorting
  - The following new key commands are available:
    . Return (on heading): Hide/expand the package list under heading.
    . `M-n', `M-p': Go to the next/previous heading at the same heading
		    level.
    . `M-u': Go to the nearest previous heading at an upper level.
    . `M-a': Show everything under the current heading.
    . `M-d': Hide everything under the current heading according to the
	     hiding level.

To better understand what the new keys and options do I recommend you to try
something like

  dselect --sort section --status-sort none --hiding-level 2 select

Browse the listing a little and try pressing Enter, Meta-n, and Meta-p on
headings.  Then go to the top line ("All packages") and press Meta-A and then
Meta-D.  Do not forget, you escape the listing with the `q' key now.

The behavior (and bugs:-) you'll see is no way final, I'd like to hear opinions
on it.


WHERE TO FIND THE RESULT
------------------------

Currently only a source package is available.  This is to avoid random curious
users to fiddle with the modified dselect.  I don't want to be blamed for
catastrophes caused by my changes.  If you compile it on your own, you surely
know what you are doing -- you build an experimental package manager front end.

You can find it at http://www.debian.org/~pdm/dselect/ .

The code is not clean yet, it should be rather considered as a proof of concept
now.  All my changes are enclosed in ifdefs on PDM_AT_DEBIAN_ORG.


FUTURE PLANS
------------

Here is my to-do list for further dselect improvements ordered by time line.
Note I don't promise to do anything mentioned here.  Requests I've heard so far
are included, I can add other items to the list if you want.

 1. Searching.
    a. Aborting search prompt.
    b. Searching in visible packages only.
    c. Searching in all package items (especially descriptions).

 2. Cursor.
    I don't like the cursor jumping around, the best thing what to do with it
    is to switch it off.  However I don't know how to do it *correctly* --
    could some curses expert give me advice?

 3. "Run-time" setting of hiding level with some key.

 4. Package filtering.
    a. Show only packages containing a given string in their name or
       description.
    b. Maybe add some other filtering criteria. 

 5. Sorting by installed size.

 6. goto-section command (with "minibuffer" completion).

 7. Dependency resolution.
    a. New option for telling dselect not to do final dependency resolving if
       no update and no status changed was performed in the session (this
       shouldn't be a default behavior, though).
    b. It should be invented some better way of dealing with dependencies user
       wants to override permanently.

 8. Terminal (I know now, why "curses" have their name...).
    a. dselect should really, really not crash on resize.
    b. dselect should really, really run under the Emacs terminal.
    c. Better behavior in xterm not to set to reverse video.

 9. Documentation.
    Should be improved and updated.

10. Clean up of the new code.

11. Memory.
    The 11 MB big dselect with potato packages is something too huge to be run
    in any way on the old 8 MB 486 machines.  Memory requirements should be
    reduced, but it can be non-trivial.

12. More colors.

13. Showing disk space consumed/freed if the requested installation and removal
    was performed.


Reply to: