Suggestion for 'pkg_add -r'
Rui Paulo
rpaulo at freebsd.org
Thu Aug 7 12:43:46 UTC 2008
On 7 Aug 2008, at 11:53, Anders Nore wrote:
> Hi,
>
> In my pkg_improved GSoC project I've added a nice feature for
> 'pkg_add -r' which displays the size of the file being downloaded as
> well as progress status in % and bytes/kb/mb/... and download speed.
> If someone could test it and comment it would be perfect, below you
> can find the patches for RELENG_7 and -CURRENT. (As for now pkg_add
> does not have a -q/Q option (quiet), but this could perhaps be used
> to deprecate the output?).
>
> RELENG_7:
> http://home.no.net/andenore/patches/pkg_install_2008-08-06_RELENG_7.diff
>
> CURRENT:
> http://home.no.net/andenore/patches/
> pkg_install_2008-08-06_CURRENT.diff
Some comments:
* I think you have reversed the patch. :-)
* Build errors:
cc1: warnings being treated as errors
file.c:433: warning: no previous prototype for 'power'
file.c:452: warning: no previous prototype for 'human_readable'
file.c:474: warning: no previous prototype for 'printHumanReadable'
file.c: In function 'printHumanReadable':
file.c:482: warning: comparison between signed and unsigned
parallels# ./pkg_add -r joe
Fetching 321.2 kB from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-current/Latest/joe.tbz
...
Downloading: 100% 321.2 kB at
214.8 kB/
s
Done
Fetching 2.4 MB from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-current/All/gettext-0.17_1.tbz
...
Done
Fetching 2.2 MB from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-current/All/aspell-0.60.6_2.tbz
...
Downloading: 201% 4.5 MB at
149.5 kB/s
Something's wrong :-)
Also, may I suggest that you make your output similar to fetch(1) ?
Keep up the good work,
--
Rui Paulo
More information about the freebsd-hackers
mailing list