From owner-freebsd-libh Wed Jan 30 7:55:48 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 7F37537B405 for ; Wed, 30 Jan 2002 07:55:46 -0800 (PST) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g0UFtjH47845 for libh@FreeBSD.org; Wed, 30 Jan 2002 09:55:45 -0600 (CST) (envelope-from antoine) Message-Id: <200201301555.g0UFtjH47845@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 30 Jan 2002 09:55:45 -0600 (CST) To: libh@FreeBSD.org Subject: cvs commit: libh Makefile Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG antoine 2002/01/30 09:55:45 CST Modified files: . Makefile Log: reverse order of "none" and "text+graphics" build the reasoning behind that is that the fullbuild now starts with the simpler builds (none) to finish with the most complex (text+graphics). Revision Changes Path 1.7 +6 -6 libh/Makefile To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Jan 30 13:47: 7 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts12-srv.bellnexxia.net (tomts12.bellnexxia.net [209.226.175.56]) by hub.freebsd.org (Postfix) with ESMTP id 610F537B400 for ; Wed, 30 Jan 2002 13:47:03 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.186.7]) by tomts12-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20020130214702.NZPF9396.tomts12-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Wed, 30 Jan 2002 16:47:02 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 934FB189F; Wed, 30 Jan 2002 16:46:55 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 8840E20ACA; Wed, 30 Jan 2002 16:46:56 -0500 (EST) Date: Wed, 30 Jan 2002 16:46:55 -0500 From: The Anarcat To: Libh , Alexander Langer Subject: making Database::create the "default" Database tclh command and Exceptions Message-ID: <20020130214652.GA441@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh , Alexander Langer Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline User-Agent: Mutt/1.3.25i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I'm currently working to start looking around the packaging code, and i have something I think could be implemented and be quite helpful. I've been able to implement the default directory thing without big problems. In the making, I noticed that the Database::open and Database::create are just stubs to the Database() constructor. I think it could be a good idea to have the tcl "Database" command (defined in lib/sysinstall/Database.cd.cc) call Database::create instead of Database::open. Both functions perform almost the same tasks, except that Database::create allows creation of the database if missing. That would allow pkg tools to avoid handling cases where the database is not created. It would imply some modifications to the code, of course, but not only to the .cd.cc file. The Database() constructor needs to know that the database indeed exist. The best way to do this, IMHO, is to use exceptions. I hesitate to assume that a runtime_exception coming out of Database::create().=20 Also, exceptions is a proper way to handle many conditions in C++ and nothing keeps us from making extra exception namespaces for libh. Anyways, here's the patches to deal with this. Right now, it doesn't implement extra exception namespaces, but this is not too hard. --- Database.cc 2002/01/21 21:44:52 1.4 +++ Database.cc 2002/01/30 21:42:51 @@ -83,7 +83,11 @@ addSYSTEMpackage &=3D mOpenFlag =3D=3D ofCreate; if ( mOpenFlag =3D=3D ofCreate ) { mOpenFlag =3D ofReadWrite; - create(); + try { + create(); + } catch (...) { + =20 + } } =20 engine().lock(); --- Database.cd.cc 2002/01/21 21:44:52 1.6 +++ Database.cd.cc 2002/01/30 21:45:28 @@ -55,7 +55,7 @@ "Configuration::instance()->dbPath()", "base_dir")), =20 - MethodDescription("Database", "open", + MethodDescription("Database", "create", LanguageInterface::Object::MethodDescription::fStatic, "Opens existing Database", MethodDescription::Value(MethodDescription::vtObject, A. --UlVJffcvxoiEqYs2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxYacsACgkQttcWHAnWiGcIdgCfdPugMzBAmxYnvtFyZwyyeEYl hcMAn1AK1uGNY2EAemBywSWw4yJYbxjy =UXmZ -----END PGP SIGNATURE----- --UlVJffcvxoiEqYs2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Jan 30 13:58:25 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id A348437B405 for ; Wed, 30 Jan 2002 13:58:23 -0800 (PST) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g0ULwML48185 for libh@FreeBSD.org; Wed, 30 Jan 2002 15:58:22 -0600 (CST) (envelope-from antoine) Message-Id: <200201302158.g0ULwML48185@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 30 Jan 2002 15:58:22 -0600 (CST) To: libh@FreeBSD.org Subject: cvs commit: libh/include/sysinstall Database.hh libh/lib/sysinstall Database.cd.cc Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG antoine 2002/01/30 15:58:22 CST Modified files: include/sysinstall Database.hh lib/sysinstall Database.cd.cc Log: Implement Database::dbPath() WARNING: this might create some build problems since the build system doesn't seem to register all dependencies. Removing compile/*/Database.* fixed the problem here. Revision Changes Path 1.5 +3 -1 libh/include/sysinstall/Database.hh 1.7 +10 -1 libh/lib/sysinstall/Database.cd.cc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Jan 30 14:27: 5 2002 Delivered-To: freebsd-libh@freebsd.org Received: from r220-1.rz.RWTH-Aachen.DE (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by hub.freebsd.org (Postfix) with ESMTP id 7487A37B402 for ; Wed, 30 Jan 2002 14:27:01 -0800 (PST) Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1]) by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id g0UMQxL01757; Wed, 30 Jan 2002 23:26:59 +0100 (MET) Received: from kawoserv.kawo2.rwth-aachen.de (root@kawoserv.kawo2.RWTH-Aachen.DE [134.130.180.1]) by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with ESMTP id g0UMQwu01753; Wed, 30 Jan 2002 23:26:58 +0100 (MET) Received: from fump.kawo2.rwth-aachen.de (fump.kawo2.rwth-aachen.de [134.130.181.148]) by kawoserv.kawo2.rwth-aachen.de (8.9.3/8.9.3) with ESMTP id XAA04325; Wed, 30 Jan 2002 23:26:59 +0100 Received: (from alex@localhost) by fump.kawo2.rwth-aachen.de (8.11.6/8.11.6) id g0UMRJQ61757; Wed, 30 Jan 2002 23:27:19 +0100 (CET) (envelope-from alex) Date: Wed, 30 Jan 2002 23:27:18 +0100 From: Alexander Langer To: The Anarcat , Libh Subject: Re: making Database::create the "default" Database tclh command and Exceptions Message-ID: <20020130232718.E60912@fump.kawo2.rwth-aachen.de> References: <20020130214652.GA441@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020130214652.GA441@shall.anarcat.dyndns.org>; from anarcat@anarcat.dyndns.org on Wed, Jan 30, 2002 at 04:46:55PM -0500 X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! Makes sense to me. However, you should be able to turn the auto-create behaviour off somehow, possibly by calling it with an extra parameter. Alex --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Weitere Infos: siehe http://www.gnupg.org iQEVAwUBPFhzRbRIIUSeqRcRAQH1IAgAhnDtWSki5dKcTZx86odoph2XLfY81Alr 3vQw6YDrxVTO4Q3e81hGZFwIfv5ouXyjFAZP8e6gtTE3QeTKhL1FlPRzhxgrFo1h NNwd8JS8BBKhomHu6TYfglqD0q3eMWBM4DAV7BXCeX+XYXxaQ1PZPHMJnyjKlq9A iyviuqZJ2hV5/pMmABjWM2Z6bDUyokbkn30RXQcR09tTG4HSkGrVNjE+jE4jY+yK zlu2VEu1kdr2fJNOY4OitqW7Ost351lOHCRGp1AKgfuE8VmeQ1eVBnjBbdTYAASF QAa/Kny95j6ve36XurdqGA8zC4ukeOByy+tjL8dMp2W4Xa1M3IkTtw== =0RGW -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Jan 30 14:35:35 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts17-srv.bellnexxia.net (tomts17.bellnexxia.net [209.226.175.71]) by hub.freebsd.org (Postfix) with ESMTP id D41DB37B402 for ; Wed, 30 Jan 2002 14:35:26 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.186.7]) by tomts17-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20020130223525.QRPG16289.tomts17-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Wed, 30 Jan 2002 17:35:25 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 62B0E18E9; Wed, 30 Jan 2002 17:35:22 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id DF36920ACA; Wed, 30 Jan 2002 17:35:27 -0500 (EST) Date: Wed, 30 Jan 2002 17:35:27 -0500 From: The Anarcat To: Alexander Langer Cc: Libh Subject: Re: making Database::create the "default" Database tclh command and Exceptions Message-ID: <20020130223527.GA712@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Alexander Langer , Libh References: <20020130214652.GA441@shall.anarcat.dyndns.org> <20020130232718.E60912@fump.kawo2.rwth-aachen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20020130232718.E60912@fump.kawo2.rwth-aachen.de> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed Jan 30, 2002 at 11:27:18PM +0100, Alexander Langer wrote: > Hi! >=20 > Makes sense to me. However, you should be able to turn the auto-create > behaviour off somehow, possibly by calling it with an extra parameter. Hmmm... Tricky. If we make the Database tcl command an alias to create(), then the code to handle that would end up in create(). Not good. I guess the proper way to do it would be to hack open() instead and give it the possibility to override the behavior there. On the top of my head: --- Database.hh 2002/01/30 21:58:22 1.5 +++ Database.hh 2002/01/30 22:32:00 @@ -74,7 +74,7 @@ Database( OpenFlag aOpenFlag, bool addSYSTEMpackage, const string& aBasedir ); virtual ~Database(); =20 - static Pointer open( const string& /* aBasedir */ ); + static Pointer open( bool, /* create */ , const string& /* = aBasedir */ ); static Pointer create( const string& /* aBasedir */ ); static Pointer import_db( const string& aBasedir, const str= ing& aFilename ) { Pointer db =3D new Database( ofCreate, false, = aBasedir ); db->import_db( aFilename ); return db; } =20 --- Database.cc 2002/01/21 21:44:52 1.4 +++ Database.cc 2002/01/30 22:32:29 @@ -83,7 +83,11 @@ addSYSTEMpackage &=3D mOpenFlag =3D=3D ofCreate; if ( mOpenFlag =3D=3D ofCreate ) { mOpenFlag =3D ofReadWrite; - create(); + try { + create(); + } catch (...) { + // db already created + } } =20 engine().lock(); @@ -109,10 +113,11 @@ =20 //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Pointer Database::open( const string& aBasedir =3D +Pointer Database::open( bool create, const string& aBasedir =3D Configuration::instance()->dbPath() ) { - return new Database( ofReadWrite, false, aBasedir ); + return new Database( (create ? ofCreate : ofReadWrite ), + create, aBasedir ); } =20 Pointer Database::create( const string& aBasedir =3D But this would be yet another change in the Database interface, not sure this is a good idea. If we choose this, we might as well get rid of create(string), since it is the same as open(true, string). I have to think this over. A. --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxYdS0ACgkQttcWHAnWiGfWJQCfYE9pHr8q8FyYC30fecf5haj2 8EoAn0n+ph//8xsQ0zhaCYTWHCib8jTS =2xv9 -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Jan 31 9:12: 7 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts9-srv.bellnexxia.net (tomts9.bellnexxia.net [209.226.175.53]) by hub.freebsd.org (Postfix) with ESMTP id 2DA5837B417 for ; Thu, 31 Jan 2002 09:11:57 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.186.7]) by tomts9-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20020131171156.GMQB23714.tomts9-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Thu, 31 Jan 2002 12:11:56 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id BB3651942; Thu, 31 Jan 2002 12:11:53 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 4AE2820ACC; Thu, 31 Jan 2002 12:12:01 -0500 (EST) Date: Thu, 31 Jan 2002 12:12:01 -0500 From: The Anarcat To: Libh , Alexander Langer Subject: (fwd) tee versionning in npkg (Re: Adding support for a global src tree serial number) Message-ID: <20020131171200.GB295@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh , Alexander Langer Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XMCwj5IQnwKtuyBG" Content-Disposition: inline User-Agent: Mutt/1.3.25i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --XMCwj5IQnwKtuyBG Content-Type: multipart/mixed; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline --ftEhullJWpWg/VHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I forgot to CC this to libh, so here it goes. A. --ftEhullJWpWg/VHq Content-Type: message/rfc822 Content-Disposition: inline Return-Path: Delivered-To: anarcat@anarcat.dyndns.org Received: from mx2.freebsd.org (mx2.FreeBSD.org [216.136.204.119]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 22DBF1942 for ; Thu, 31 Jan 2002 12:10:53 -0500 (EST) Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 69ECA55ADC; Thu, 31 Jan 2002 09:08:22 -0800 (PST) (envelope-from owner-freebsd-arch@FreeBSD.ORG) Received: by hub.freebsd.org (Postfix, from userid 538) id 21F2137B400; Thu, 31 Jan 2002 09:10:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 10A982E8003; Thu, 31 Jan 2002 09:10:48 -0800 (PST) Received: by hub.freebsd.org (bulk_mailer v1.12); Thu, 31 Jan 2002 09:10:47 -0800 Delivered-To: freebsd-arch@freebsd.org Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 7A2EE37B402 for ; Thu, 31 Jan 2002 09:10:43 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.186.7]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20020131171042.HGAM29652.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Thu, 31 Jan 2002 12:10:42 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 3D432189F; Thu, 31 Jan 2002 12:10:37 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 51B1D20ACC; Thu, 31 Jan 2002 12:10:36 -0500 (EST) Date: Thu, 31 Jan 2002 12:10:36 -0500 From: The Anarcat To: "Jacques A. Vidrine" Cc: Sheldon Hearn , arch@FreeBSD.org Subject: tee versionning in npkg (Re: Adding support for a global src tree serial number) Message-ID: <20020131171036.GA295@shall.anarcat.dyndns.org> References: <79300.1012474898@axl.seasidesoftware.co.za> <20020131131714.GA87780@madman.nectar.cc> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <20020131131714.GA87780@madman.nectar.cc> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-arch@FreeBSD.ORG List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Precedence: bulk --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu Jan 31, 2002 at 07:17:15AM -0600, Jacques A. Vidrine wrote: > On Thu, Jan 31, 2002 at 01:01:38PM +0200, Sheldon Hearn wrote: > > I'd like to propose the addition of a global src tree serial number that > > uniquely identifies an imaginary snapshot of the src tree. >=20 > This is attractive to me, since we already do something like this for > the `security' branches (RELENG_4_3 et al). We manually bump $BRANCH > in newvers.sh. I imagine it would also be attractive to people on > freebsd-binup. [with my libh developper hat on] I can't talk in the name of the binup project, since i'm not particularly involved in his developpment, but as for the next-generation package system and installation tools (libh), my idea of it is that it will be more modular than a single package with a single version number for the whole tree. The libh package system still needs some work, but when it is ready, I will start the packaging of /usr/src. I hope the tendency will not to package it as a single package, and I even hope to package it as finer-grained package than current "distributions" (bin, doc, contrib, etc). Something more like: fileutils, binutils, gnu-binutils, openssh, openssl, etc. These packages will all have independant package numbers. These will have to be maintained, somehow, and this is the main problem of the packaging of /usr/src: it is not made for that yet. No support is engineered in /usr/src to allow distribution and versionning of packages. Serial number is one thing, and it might be a good idea, but we could also consider more "classic" version numbers for sub-trees, as openssh-2001013109910000008 is not really a "user-friendly" package name. :) A. --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxZeosACgkQttcWHAnWiGe5mQCfUPIWxhNyOT6kIe7EwuTjxLiw OmEAn22DFcSq6Q0bpAv0toVSwMWkOPrt =bhe2 -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message --ftEhullJWpWg/VHq-- --XMCwj5IQnwKtuyBG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxZeuAACgkQttcWHAnWiGda7wCfavwkPQY0EeJC+plwO6aLHAuA MCIAnj7gO1hR7c4pGc6UWy1ClUVMhWPe =efIG -----END PGP SIGNATURE----- --XMCwj5IQnwKtuyBG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Jan 31 11:38:31 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 012DD37B417 for ; Thu, 31 Jan 2002 11:38:29 -0800 (PST) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g0VJcSY49631 for libh@FreeBSD.org; Thu, 31 Jan 2002 13:38:28 -0600 (CST) (envelope-from antoine) Message-Id: <200201311938.g0VJcSY49631@usw4.freebsd.org> From: Antoine Beaupré Date: Thu, 31 Jan 2002 13:38:28 -0600 (CST) To: libh@FreeBSD.org Subject: cvs commit: libh/include/sysinstall Database.hh libh/lib/sysinstall Database.cc Database.cd.cc Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG antoine 2002/01/31 13:38:28 CST Modified files: include/sysinstall Database.hh lib/sysinstall Database.cc Database.cd.cc Log: Implement auto database creation in Database TCL command This modifies the Database::open() command to add a flag which toggle database creation. Database::create(string) is now deprecated since open() has the same functionality. This commit doesn't remove it though. Revision Changes Path 1.6 +2 -2 libh/include/sysinstall/Database.hh 1.5 +11 -6 libh/lib/sysinstall/Database.cc 1.8 +9 -2 libh/lib/sysinstall/Database.cd.cc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Jan 31 11:50:32 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts12-srv.bellnexxia.net (tomts12.bellnexxia.net [209.226.175.56]) by hub.freebsd.org (Postfix) with ESMTP id 9879537B400 for ; Thu, 31 Jan 2002 11:50:25 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.186.7]) by tomts12-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20020131195024.XTPA9396.tomts12-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Thu, 31 Jan 2002 14:50:24 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 0C026195D; Thu, 31 Jan 2002 14:50:20 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 78E7620ACC; Thu, 31 Jan 2002 14:50:27 -0500 (EST) Date: Thu, 31 Jan 2002 14:50:26 -0500 From: The Anarcat To: libh@FreeBSD.org Cc: Alexander Langer Subject: Re: cvs commit: libh/include/sysinstall Database.hh libh/lib/sysinstall Database.cc Database.cd.cc Message-ID: <20020131195026.GC295@shall.anarcat.dyndns.org> References: <200201311938.g0VJcSY49631@usw4.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3Pql8miugIZX0722" Content-Disposition: inline In-Reply-To: <200201311938.g0VJcSY49631@usw4.freebsd.org> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --3Pql8miugIZX0722 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alex, I send this to you just to drop a note that I committed the thing as per your request (make the behavior overridable with a flag). On Thu Jan 31, 2002 at 01:38:28PM -0600, Antoine Beaupr=E9 wrote: > antoine 2002/01/31 13:38:28 CST >=20 > Modified files: > include/sysinstall Database.hh=20 > lib/sysinstall Database.cc Database.cd.cc=20 > Log: > Implement auto database creation in Database TCL command > =20 > This modifies the Database::open() command to add a flag which toggle > database creation. > =20 > Database::create(string) is now deprecated since open() has the same > functionality. This commit doesn't remove it though. Example use for dummies: [starting with no package database] % Database 0 Cannot open database file /var/db/npkg/Packages-Name: No such file or direc= tory [opening with no create flag fails, as old behavior] % Database 1 0x836d0c8_8Database [db now created in default package dir] % Database 0 ./npkg Database lock failed: unable to open/create lock file ./npkg/lock: No such = file or directory=20 [db not available in ./npkg] % Database 1 ./npkg 0x836d048_8Database [db created in ./npkg] Pretty simple. Works fine. There's still the exception issue. The constructor, right now, will interpret any runtime_error issued from Database::create() as a "database missing" message. An exception could be created in LanguageInterface.hh to handle exceptions particular to libh, since a runtime_error can be generated from other parts and might not necessarly mean that the db is missing. Ignoring the error in the Database contructor would then be an error. A. --3Pql8miugIZX0722 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjxZoAEACgkQttcWHAnWiGeESgCgnDC4D1tffjXzCZ2Pm5j4ClLg QLAAn2llulwmd1x7I+reTPTgywCrXct5 =vuTN -----END PGP SIGNATURE----- --3Pql8miugIZX0722-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message