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

dselect improvement -- step #2



Well, the short message is:

After the folding I had implemented in fall, full-searching is
implemented now as well.  I think the two biggest dselect problems are
gone with these modifications now.  I'll be glad if these changes are
included into the dpkg package sometimes.

See http://www.debian.org/~pdm/dselect/.  There is one folding-related
bug I'm aware of, try to find it. :-) I hope you find more such bugs and
report them soon, because I'm going to present dselect as a great tool
on Saturday at some CZLUG meeting and would like to avoid delicate
situations. :-)

The long message:

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

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

The first step, to do something actually, was done in fall 1999:

  - 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.


The second step is revision for dpkg 1.6.13 and addition of some new code to
the first patches.  The following things are done:

  - Cursor is switched off on startup, so the funny square jumping across your
    terminal is no longer available (though it's not completely true, I had
    some problems with search and have to solve them with a hack).

  - Search improvements:
    . The search prompt can be aborted now.
    . "Full search" implemented, which is search through the Package, Source,
      Maintainer, and Description fields together.  See the `s' and `S' keys.


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.
Requests I've heard so far are included as well, so this should be quite
complete.

Note I'm rather busy with another free software project and thanks to apt I use
dselect only occasionally, so don't expect any of these things soon from me if
at all.  And if I do anything of them, it'll be only because I'll reimplement
dselect in a high level programming language (this intent is quite serious).

Nevertheless, I think the very worst problems of dselect arising of the package
amount are gone now and I believe I'm not the only Debian developer interested
in dselect.

To do:

 1. dselect is still not working in Emacs properly.  There is a bug either in
    dselect or in Emacs.

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

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

 4. Sorting by installed size.

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

 6. 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.

 7. Documentation.
    Should be improved and updated.

 8. Clean up of the new code.

 9. 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.

10. More colors.

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

Milan Zamazal

-- 
"Having GNU Emacs is like having a dragon's cave of treasures."
                                                Robert J. Chassell



Reply to: