From owner-p4-projects@FreeBSD.ORG Sun Jul 18 23:40:44 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2AF98106567A; Sun, 18 Jul 2010 23:40:44 +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 E2694106566C for ; Sun, 18 Jul 2010 23:40:43 +0000 (UTC) (envelope-from julien.laffaye@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 432448FC1D for ; Sun, 18 Jul 2010 23:40:42 +0000 (UTC) Received: by bwz12 with SMTP id 12so2348445bwz.13 for ; Sun, 18 Jul 2010 16:40:42 -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; bh=5B3sTETGsdsiblqqy1F6XPvmeKo/BoWgTZs5VZQG2xQ=; b=mlNIRCkMJzoFdbjNZP9Jz5Opa/bXCnkiCFw4AdnA1ntwpHoPHR4br/pJUuHoMi7fMV kuCXFwsQb9ad3lr/FMmaB5FM5ApBvi8nxJDSbFngs3XXShybw+tM049SrrPC7J6vV3oZ vmvxbwDxRXsYhFV8x8ekYlXFZ8j5qbFCNyxiI= 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; b=JJ7hCiDUbU7M4fGoafTRYdAqoSjlkKMf7rSNRn5vHVDC18S9Srzcq752lxqxc/kV1S o6Vi42+c5sdXJodOIiaJgbkzCTXJx4rEJimAcxN/DvxinggPSfjF6eLGzRd2/wHYyhYm 2+BxFSXL6AiPCxx8fRtl9bop5OiHaYrdfgd+E= MIME-Version: 1.0 Received: by 10.204.161.205 with SMTP id s13mr155094bkx.148.1279496440878; Sun, 18 Jul 2010 16:40:40 -0700 (PDT) Sender: julien.laffaye@gmail.com Received: by 10.204.62.75 with HTTP; Sun, 18 Jul 2010 16:40:40 -0700 (PDT) In-Reply-To: References: <201007182159.o6ILxBSq023260@repoman.freebsd.org> Date: Mon, 19 Jul 2010 01:40:40 +0200 X-Google-Sender-Auth: M8l9n4UfRXWNsmo-Ih9yfi1PyYA Message-ID: From: Julien LAFFAYE To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 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:40:44 -0000 On Mon, Jul 19, 2010 at 1:18 AM, Garrett Cooper wrote: > 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? pkg_add will deal with both regular and complete packages. pkg_complete is only for the creation of complete packages. But it wont hurt to move this function into libpkg I suppose. > > 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. Totally agree. Which line(s) of code are you referring to? Because I'm not aware of re-initializing it every time (maybe a high level libarchive function?) > > 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)? Yeah, I tried to fix the code while moving it but I must admit that it wasn't the first goal. Wanted to check if the whole function worked, eww :p Again, any particular rules of style(9) in mind ? > > Thanks, > -Garrett >