From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 7 12:43:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BE5F106564A for ; Thu, 7 Aug 2008 12:43:46 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 304A78FC14 for ; Thu, 7 Aug 2008 12:43:46 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so238663ywe.13 for ; Thu, 07 Aug 2008 05:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=4drlkFXoKT29D5zNc2vkY14VBEFzLgOI1UT6n9HXMLA=; b=Dyr8A0mEvwmjftVGMNSygILLnZnl0/qbiSm1dh7p0KreREt+XnKpSkrH8vxF8jIHiU s8/QTZVo1S2kVA4iv9OCwLPsPrrK+RxO0K32QenlOwQS2kBh7BEACkJ98rOTEtaieijk /ktTuXT4qf4sBCGm0EYX+yRZx1rMc3130GzGk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=sX0DFOSOsKyhTWmBwSCbv7tPuMKyu6cHa//vad/akuABLif/Ftl/HhotunfzZ6R/Fo YPJlYtQD2UvtSwBcHIeOBPjMn5EECEgq8S7yA+Z/KjZzVpLHGHTTPoBx8LUO8NRC60J4 fnrouWGloKHv5ZP3P2aWRPfUg6O8L45a9yYrM= Received: by 10.151.141.16 with SMTP id t16mr2458674ybn.65.1218113025407; Thu, 07 Aug 2008 05:43:45 -0700 (PDT) Received: from ?10.0.0.14? ( [83.144.140.228]) by mx.google.com with ESMTPS id z26sm395019ele.7.2008.08.07.05.43.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 07 Aug 2008 05:43:44 -0700 (PDT) Message-Id: <1234BBCE-6698-4EF9-8B48-4F291AD78547@freebsd.org> From: Rui Paulo To: Anders Nore In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Thu, 7 Aug 2008 13:43:36 +0100 References: X-Mailer: Apple Mail (2.926) Sender: Rui Paulo Cc: "freebsd-hackers@freebsd.org" Subject: Re: Suggestion for 'pkg_add -r' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 12:43:46 -0000 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