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

ftp method v2



Well now I am back here is a new set of files for ftp method for
dselect.  The only change is that it parses the Filename: field in the
Packages file to get the .deb filename (but dosn't use the whole path
just the filename).

eg, if:
Filename: development/binary/text/a2gs-1.0-4.deb 
looks for "a2gs-1.0-4.deb" in the ls -lR listing (it will probably
find it in "text/" !).

If it cannot find a Filename field it falls back on using
pkgname-ver[-rev].deb.

WHAT TO DO:

To install, untar the attached file and copy into
/usr/lib/dpkg/methods/ftp

Compile the dvercmp.c file, and put the executable some where in the
default path (/usr/local/bin)

Create a directory /var/lib/dpkg/methods/ftp

Use dselect and select ftp from the access method.  You will then be
prompted for a ftp site and directory.  The directory should be a
debian binary distribution (ie contain a Packages.gz file, along with
.deb files in base/, net/ etc.)  

What the methods do:

Setup:

Prompts for site/dir.  Gets a listing of the directory and checks
there is a file beginning with Packages.  

Update:

Uses ftp to get Packages.gz and a ls -lR listing of the directory and
then merges using dpkg --merge-avail.

Install:

Checks the ftp/binary directory for short or corrupted .deb files and
remove them.

Munges status and Packages file to find the names of packages to get,
looks them up in the listing and uses ftp to get them in
/var/lib/dpkg/methods/ftp/binary if they don't already exist.

Checks the .deb files again and then installs them.
[  you can interrupt the ftp session and it will continue with the
   rest of the script after deleting any half got files (useful eh?) ]

Prompts if you want to remove the binary directory (and therefore all
the .deb files).

WARNING:

Although I have tested this and it works for me, it may do anything
including but not limited to deleting everything on your harddisk,
sending nasty email to Bill Clinton or actual work as planned.

To interface to ftp program it creates a .netrc file (there is no way
to use an alternate .netrc file from ftp -- arrggghhh), it tries to
keep your current .netrc intact and not leave a .netrc lying around at
the end - but it may.

NOTE to FTP site maintainers:

The things this assumes is:
under a directory is a Packages.gz file and the .deb files (possibly
in sub dirs), that it can do an ls -lR and the last part of the
Filename: field in the Packages file is the correct name of the .deb
file.  All of these seem reasonable and the current practice.

NOTE to Ian:

I havn't changed the default .deb filename to include two hyphens, it
is a trival change but not really necessary now I use the Filename:
field.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