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

The web based package tree and dpkg, and GIT

Note: If you have no interest in the package tree but use GIT, 
      or are interested in a file system centered interface to dpkg,
      you may want to skip to the end of this message.

What I am about to describe is not feasible for initial installations or
system upgrades...  but if you are checking out individual packages or
software functions, and would like to climb up the learning curve a bit
- read on.

The advantage to programs like dselect is that they take most of the
drudge work out of installing software onto your system; but in doing so
you sometimes don't get to see what is going on, or where it is going
on.  The loss of that information hampers your ability to understand how
the system works, and as such your ability to recognize exactly what the
problem is when a problem does arise.  This results in a tendency to
blame everything on dselect, and potential confusion when your question
about dselect gets answered with, let's say, something about symlinks in
the ftp mirror site.

You could learn more and gain control over problems by working `closer
to the machine', but if you think dselect has a lot of packages to list
through to find what you are looking for, then you will not like an ftp
directory any better.  One way to avoid being overwhelmed by the
cornucopia of packages is to use the web based package tree[1] and dpkg,
instead of dselect.  Of course there is nothing stopping you from using
the web based tree in conjunction with dselect (just point dselect to
the directory containing the downloaded packages and tell it to
install), but it adds an unnecessary layer of complexity to the whole

The disadvantages are that it is not as simple as having dselect fetch
and install packages for you, it takes more time online, you don't see
quite as much detail about each package, and you are limited to the
stable, frozen, and unstable distributions on primary ftp sites. [2]

The advantages include: a simple and intuitive view of the package tree;
a better chance of knowing when and where a problem originates; and the
ability to jump to the same position in a different distribution,
returning to exactly where you before you went off on a tangent (good
for examining the evolution of a package if you are not sure which
version you want)[3].

This is how it works:  point your browser at the package tree, download
what you want, then feed the packages into dpkg.  I'll admit that this
can be a pretty messy procedure, if you approach it in a haphazard
manner.  Try doing it this way...  Empty out your download directory and
get online.  When you get to the first page of a package you want, give
it `the once over' just to see what other packages are in the dependency
list, then go back to the top of the page and work your way towards the
"Download Page" link at the bottom.  Follow all links to packages that
you need or want[4], *in the order you come across them*.  When you hit
a link to a download page, download the file, then backup one level and
continue.  When you backup into the index you will have downloaded all
the files for the package you are after, in the order that they should
be installed.

A       cd /the/download/directory; dpkg -i `ls -fA *.deb`

command will install everything; and if you followed the procedure
described, all dependencies will be met on the first pass because 
`ls -fA` ensures that dpkg processes the files in the order you
downloaded them, skipping over "."  and "..".

If you like to snoop around the system after a new installation, or
unpack a package, check it out, then configure it, you may want to use
a file browser like GIT and setup some key bindings to cut down on the
typing.  For example, putting...

	^Ci = DPKG-install; dpkg -i `ls -fA *.deb`

into a .gitrc.TERM file will result in dpkg trying to install every 
.deb in the current directory whenever the <CTRL-c, i> sequence is
used (it will also overwrite the RPM install command which is bound
to that mapping by default ;).

I have a set of GIT key-bindings for DPKG.
Almost everything that dpkg can do is supported, along with
backgrounding stuff and some interactive selection (via iSelect).
I find it very useful to be able to tour around the file system with the
utility of dpkg just a few keystrokes away. If anyone is interested let
me know and I'll email them to you. If enough people are interested I'll
extend the set, do some docs, and put them on the web.


[1] http://www.ca.debian.org/Packages.html
    where "ca" gets replaced with the country code for the server
    nearest to you (ca, de, us).

[2] The last three can be fixed by adding a web method to dselect's
    update function, and a little more information to the html based
    package tree.

[3] This is a browser function; with Lynx 2.8.1 you use <E> to edit
    the current selected URL and change the distribution element of the
    path (stable, frozen or unstable - it  sounds  worse  than  it  is),
    you get back via the left arrow or the history list.

[4] This presupposes that you have armed yourself with a copy of what
    you have installed, get it with "dpkg -l"; either a printout,
    listed on a virtual console, or in a separate window.

Reply to: