Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
/bin/ftp pkg and caching
2005-11-12, 05:55 AM
Post: #1
/bin/ftp pkg and caching
What about minor improvements of pkg_add/pkg_update
itilities?
I think it may useful feature to organize a cache
of downloaded files like this

/bin/ftp:
#!/bin/sh

if test "_$1" = "_-V" -a "_$2" = "_-o" -a "_$3" = "_-" -a "$#" = 4; then
cd /var/cache/pkg || exit 10
wget -v -c "$4" || exit 11
cat `echo $4 | sed 's,^.*/,,'` || exit 12
rm -f list
else
/bin/ftp.real "$@"
fi

This is just an example, not a complete solution.
I personally prefer wget, but it may also be good
to have ability to use alternative downloaders
like FreeBSD (AFAIK) does.
Find all posts by this user
Quote this message in a reply
2005-11-12, 09:20 AM
Post: #2
RE: /bin/ftp pkg and caching
When you use pkg_update it downloads the list that has all of the most recent package
versions and the date of last update and caches it for doing checks already.
It does this by the '-L' option with ftp.

You are welcome to create your own similar alternative. You can use the "-l" (ell) option
with pkg_update to indicate your own location (aka cache). There are others who do
this with a ruby script. I had someone else write me just yesterday about another
set of tools he is using. The central theme in all of them should be the "list" file on
the ftp site that eliminates the guessing for what's updated, when, etc.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)