From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FJWqC-0004jz-CK for garchives@archives.gentoo.org; Wed, 15 Mar 2006 14:19:08 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5.20060308/8.13.5) with SMTP id k2FEIQdp001496; Wed, 15 Mar 2006 14:18:26 GMT Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.192]) by robin.gentoo.org (8.13.5.20060308/8.13.5) with ESMTP id k2FEIPcb001593 for ; Wed, 15 Mar 2006 14:18:26 GMT Received: by nproxy.gmail.com with SMTP id a25so82577nfc for ; Wed, 15 Mar 2006 06:18:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=R6tPdr3K5t8CeNnVd92kP37iCW9PPEdC8Apwc3vTHlN9U06acqWSxG4dwOTmAbWfTVKoqWW0WaDN4hfzJlz/VhQGOUQTIm+xq8Cr6CMMFEMueP1W8JLvWMmmLAxNA4MKUrgr97ySFmDHyB60vxnB30d5M9TOVMj3+L6IHJ01KgY= Received: by 10.48.30.4 with SMTP id d4mr325406nfd; Wed, 15 Mar 2006 06:18:25 -0800 (PST) Received: by 10.49.29.4 with HTTP; Wed, 15 Mar 2006 06:18:25 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 16:18:25 +0200 From: tvali To: gentoo-portage-dev@lists.gentoo.org Subject: Re: sync suggestions [was Re: [gentoo-portage-dev] Few things, which imho would make portage better] In-Reply-To: <20060315003730.GF10744@nightcrawler.had1.or.comcast.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <4416A4C1.6090903@gentoo.org> <20060315003730.GF10744@nightcrawler.had1.or.comcast.net> X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id k2FEIPcb001593 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k2FEIQf9001496 X-Archives-Salt: 783dd9fb-4dac-4a3b-9197-fb740d0afd1a X-Archives-Hash: 79a56ce37d1e97ef45951f12c37c8494 But if any user-side changes are assumed to be separated? I mean if there is a boolean field "user", which is triggered for user-changed tables. Or, to be simpler, i use 2 tables in my example. Lets assume that user wants to change description of dev-lang/php -- so that user has to change "dev-lang/php" in table "user-tree", but leave the same in table "portage-tree" unchanged. Of course, current example would make queries into portage-db more complex than they should be, so more optimized version should be found -- but, anyway, there are ways to make things work. -------------------------------------------------------------------------= --------------- Imagine that (i take only ebuild files into consideration here): * Portage tree is kept in SQL base, which contains the following fields: ** Id ** LongName (dev-db/mysql-4.1.14) ** Name (dev-db/mysql) ** ShortName (mysql) ** Slot ** Server -- which server or server group contains that ebuild (if same ebuild is in several server, it should be repeated in SQL). If empty, then this ebuild is created by user ** ServerStatus -- false if deleted from server (only used if UserInfo is not NULL) ** Status -- if false, this row will not be used ** Current -- if this ebuild is what should be installed if emerge mysql is written on this system ** Description ** /.../ -- other fields parsed from ebuild ** ServerInfo -- ebuild file from server ** UserInfo -- user additions to that file * Dependency tree ** Will be updated from prev. table Now, updates in server should be in the following form: * Id * ServerInfo * Action -- add/delete/update All other fields will be parsed out from "Action" in user's computer. Any changes to portage tree will be then done via portage commands, not directly to SQL. 2006/3/15, Brian Harring : > On Tue, Mar 14, 2006 at 03:50:18PM +0200, tvali wrote: > > Another question now is about sync. > > > > I did read somewhere, that this is not good user behavior to sync mor= e > > than once per day. I understand that as if this is a huge download > > even if there is nothing changed. > > > > Isnt it nice idea to have this database just optimized? > > > > I mean (assuming portage using SQL now) -- that would be really simpl= e > > to log every change in portage tree as series of SQL queries, which > > would reproduce this change. > > Pushing the delta (what you're suggesting) is only usable if it can be > guranteed the user hasn't modified their tree at all (thus resulting > in cache db differing from upstreams). > > That right there is the brass tacks of it; You wouldn't be able to > push just the changes, you would have to regenerate the _whole_ db > (slow, >20k inserts assuming only one table). > > Sidenote... please post seperate threads for seperate > ideas/discussions, else it's damn hard to look back and pull the > specific thread were something was discussed. > ~harring > > > > -- tvali (e-mail: "qtvali@gmail.com"; msn: "qtvali@gmail.com"; icq: "317-492-912") =DChe eesti internetifirma lehel kohtasin tsitaati: If you don't do it excellently, dont do it at all. Because if it's not excellent, it won't be profitable or fun, and if you're not in business for fun or profit, what the hell are you doing here? Robert Townsend --=20 gentoo-portage-dev@gentoo.org mailing list