tech-pkg archive

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

pkg_add/pkgin URL interpretation



I recently tried to use pkg_add and pkgin with a remote repository for
the first time.  Being very familiar with using full URLs with ftp, I
interpreted the man pages for setting up these programs to mean that
the URLs specified to them would be equivalent to those specified to
ftp for downloading the same file.  This of course did not work
because of the following:

- ftp interprets paths relative to the default login directory.

- pkg_add/pkgin use libfetch which precedes accesses with CDUP
  commands to reach the root; therefore, paths are relative to the
  root of the ftp server.

In my case, these were not the same place, so while ftp worked fine
the other commands did not.  Needless to say, this was confusing.

Is there something about the documentation somewhere that I should
have known about to avoid this problem?

In any case, I would suggest an addition to the pkg_add man page.
Something along the lines of the second sentence below (the first is
from the man page) might have helped me avoid some confusion.

     One or more pkg-name arguments may be specified, each being
     either a file containing the package (these usually ending with
     the ``.tgz'' suffix) or a URL pointing at a file available on an
     ftp or web site.  In the latter case, URLs will be resolved
     relative to the root of the server filesystem not the login
     directory.

Please improve this if it is technically incorrect or incomplete
(e.g., if http behaves differently), but this does appear to be the
behavior I have observed with ftp.

Cheers,
Brook


Home | Main Index | Thread Index | Old Index