From owner-freebsd-hackers@FreeBSD.ORG Sun May 11 13:37:28 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 AE94F1065780 for ; Sun, 11 May 2008 13:37:28 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2A18FC12 for ; Sun, 11 May 2008 13:37:28 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so2510086wah.3 for ; Sun, 11 May 2008 06:37:28 -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; bh=9Man8vqgZWjftz+lYkt7CiI9vVvuCnxfpMFE1fEP2sM=; b=khAo95uT/6MCM7vwRhJqzRW5ZykWu3WYnuyVeF1xhwxribC5FTPAXEF0b+txDI+mQLMHypiLUt6z0wFx8RgV0xlseAoOT1+HdixLH9SUlbj3eb64jcqZf8Zlwv7MEiISVfsX92bouqg2hmSoCf6pDLP3/KlM78uL/968hiHSEa0= 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; b=plUBybi7qkSHy4k6DEfUBwEzVsS/jqO1q6hViF3dpR1wrv+aVgFbH7EKapNR8ARSpoTu605urBuH96Gl4qpcESRdiRRBIbm9o1g1D2l8iuCQ6DqBUVmNI5g0xOZzOaB0VE2oY2SOUHRJfJEN+7wWTNVwN/pXTH9etH/mhxKmROc= Received: by 10.114.194.1 with SMTP id r1mr6385299waf.205.1210513048033; Sun, 11 May 2008 06:37:28 -0700 (PDT) Received: from ?192.168.10.42? ( [99.155.199.64]) by mx.google.com with ESMTPS id k37sm12163601waf.31.2008.05.11.06.37.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 May 2008 06:37:20 -0700 (PDT) Message-Id: <9FC19AC2-DAD8-418C-8B9C-F129DEC58CEF@gmail.com> From: Garrett Cooper To: Joerg Sonnenberger In-Reply-To: <20080509124308.GA596@britannica.bec.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 11 May 2008 06:38:25 -0700 References: <20080509124308.GA596@britannica.bec.de> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org Subject: Re: Adding .db support to pkg_tools 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: Sun, 11 May 2008 13:37:28 -0000 On May 9, 2008, at 5:43 AM, Joerg Sonnenberger wrote: > On Fri, May 09, 2008 at 01:52:46PM +0200, Anders Nore wrote: >> I'm working on adding .db support to the pkg_tools( i.e. pkg_add, >> pkg_info, >> etc. ) as part of SoC 2008. The database api used is BerkeleyDB >> that comes >> with the base system (/usr/src/include/db.h). BerkeleyDB is not >> you're >> typical relational db, and can only save key/value pairs. The way I'm >> thinking of storing information to the .db is to name the keys as the >> directory names in /var/db/pkg. And save the +* files in the >> directories to >> the value element in the db, separated with a special character or >> similar. > > As one of the persons hacking on pkg_install in pkgsrc/NetBSD, I would > *strongly* advisy you against storing the files only in a bdb file. > The change of major and complete corruption with bdb185 is high, > consider pulling the plug in the middle of a long update. +1. BDB is quite easy to corrupt... -Garrett