From owner-cvs-all@FreeBSD.ORG Tue May 27 05:10:54 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92D84106566B; Tue, 27 May 2008 05:10:54 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7FD138FC17; Tue, 27 May 2008 05:10:54 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4R5AsFZ044555; Tue, 27 May 2008 05:10:54 GMT (envelope-from keramida@repoman.freebsd.org) Received: (from keramida@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4R5Asbd044554; Tue, 27 May 2008 05:10:54 GMT (envelope-from keramida) Message-Id: <200805270510.m4R5Asbd044554@repoman.freebsd.org> From: Giorgos Keramidas Date: Tue, 27 May 2008 05:10:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.sbin/pkg_install/create create.h main.c perform.c pkg_create.1 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 05:10:54 -0000 keramida 2008-05-27 05:10:54 UTC FreeBSD src repository (doc committer) Modified files: usr.sbin/pkg_install/create create.h main.c perform.c pkg_create.1 Log: Add a -n option to pkg_create(1), to inhibit duplicate work. When run without this option, multiple runs of `pkg_create -Rb' will recreate common packages multiple times. This can take a lot of time for large packages. With the -n option `pkg_create -b' checks with stat(2) and skips packages that already exist. Note that this may *not* be safe of the existing output file is not really a package, or if it has been corrupted, modified or otherwise tinkered with between subsequent pkg_create runs. For this and POLA reasons, the default behavior is to *rebuild* the packages, and the -n option can be used when we know it is `safe' to run in no-regenerate mode. Inspired by: A post to freebsd-questions by Matthias Apitz < matthias.apitz at oclc.org > Reviewed by: marcus, flz Approved by: marcus MFC after: 2 weeks Revision Changes Path 1.27 +1 -0 src/usr.sbin/pkg_install/create/create.h 1.42 +7 -2 src/usr.sbin/pkg_install/create/main.c 1.83 +13 -0 src/usr.sbin/pkg_install/create/perform.c 1.73 +21 -3 src/usr.sbin/pkg_install/create/pkg_create.1