From owner-p4-projects@FreeBSD.ORG Sun Jul 18 23:18:58 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6F0701065674; Sun, 18 Jul 2010 23:18:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32EB5106566B; Sun, 18 Jul 2010 23:18:58 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id DD13E8FC08; Sun, 18 Jul 2010 23:18:57 +0000 (UTC) Received: by iwn35 with SMTP id 35so5034634iwn.13 for ; Sun, 18 Jul 2010 16:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=grh7m0Cx3VntigKP1PhpgY0cXAXOFZAdQIqARxuDzTo=; b=AfJq/ljyCRs/OXz5+7J3KJUqXF1r+Ry+wg5xO5US6Mfu4xvJra8VZSTfDyBQqQDM0b ZIcJRZP/Kzha/oRRadmPyG2x5xyewL9ujDeftnTLy9vhZ0azxmPQYLONB3P2bPGByA5E i6ZxnDIbnaD9tMgwcIEOPKTJ1BCgBj8/JLLuY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=njADnnECzbY20b7I5YbGJ2gudEoMqLh0jGmoR9AwCILa2Ct0JhRon+QHmTk51do2Xh pfJy0zb306d+UXxABrlIsOXLZu6DorDHHOTukuB+W9NBh7aD1iXYfS8l0EmfmHv58Adl 2zfSOPt/627r2tAdDrpU2jZmvWa6KVw1n6rFs= MIME-Version: 1.0 Received: by 10.231.145.1 with SMTP id b1mr4850690ibv.69.1279495137035; Sun, 18 Jul 2010 16:18:57 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.169.18 with HTTP; Sun, 18 Jul 2010 16:18:56 -0700 (PDT) In-Reply-To: <201007182159.o6ILxBSq023260@repoman.freebsd.org> References: <201007182159.o6ILxBSq023260@repoman.freebsd.org> Date: Sun, 18 Jul 2010 16:18:56 -0700 X-Google-Sender-Auth: 7o3-qj1RnvOm4x87Wgitv6fq_Z4 Message-ID: From: Garrett Cooper To: Julien Laffaye Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Perforce Change Reviews Subject: Re: PERFORCE change 181154 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 23:18:58 -0000 On Sun, Jul 18, 2010 at 2:59 PM, Julien Laffaye wrot= e: > http://p4web.freebsd.org/@@181154?ac=3D10 > > Change 181154 by jlaffaye@jlaffaye-chulak on 2010/07/18 21:58:13 > > =A0 =A0 =A0 =A0Work In Progress!! > =A0 =A0 =A0 =A0First step using libarchive(3) instead of tar(1). > =A0 =A0 =A0 =A0The code needs to be more tested, especially with flags su= ch as Fake. > > =A0 =A0 =A0 =A0TODO: > =A0 =A0 =A0 =A0 - Download the file in pkg_do() if it is an url > =A0 =A0 =A0 =A0 - Read from stdin if the name is "-" in pkg_do() > =A0 =A0 =A0 =A0 - Re-implement cleanup() > =A0 =A0 =A0 =A0 - Find packages for dependencies in extract_package() > =A0 =A0 =A0 =A0 - Add complete package support in pkg_do() > =A0 =A0 =A0 =A0 - Slave/Master mode?! in pkg_do() Wouldn't it make more sense for extract_package to be in libpkg, because it's basically a utility function that would be used by pkg_add and pkg_complete? Also, Tim and I discussed initializing the decompressor only once because it would greatly simplify the code in libpkg today, and would eliminate wasted CPU cycles used when initializing the decompressor each time a metadata file is extracted from the archive object. Sorry to be a wanker on this too, but considering that all of the code moved over from extract.c is basically `new code', could it be cleaned up for style(9)? Thanks, -Garrett