From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 17 Apr 2020 16:54:20 +0300 From: "Dmitry V. Levin" To: devel@lists.altlinux.org Message-ID: <20200417135419.GA24862@altlinux.org> References: <20200410231044.1436970-1-vseleznv@altlinux.org> <20200410231044.1436970-3-vseleznv@altlinux.org> <20200414164244.GC618226@portlab> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [devel] [PATCH 2/2] gb: optimize rebuilt srpm if its identity is equal to identity of srpm in the repo X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 13:54:20 -0000 Archived-At: List-Archive: List-Post: On Fri, Apr 17, 2020 at 12:51:51AM +0300, Alexey Tourbin wrote: [...] > So what's the right set of tags for a binary package, and what is its > identity? (I'm not sure identity is the right word, I would rather > call it ID. Identity is who you are and what you believe in, for > example a black person who votes for Obama.) I've already hinted that > identity can be defined via substitution: if you replace a package > with a different package but the same identity, there should be no > functional difference, and furthermore no difference "for all intents > and purposes", except for a few observable differences which we deem > immaterial and permit explicitly, such as FileMtimes. So obviously you > need to hash at least FileDigests and > Requires/Provides/Obsoletes/Conflicts. This should satisfy the > definition of ID for rpm (the dependencies are satisfied in the same > way, and file conflicts are the resolved in the same way, so rpm can't > tell the difference if we make a substitution.) What about various types of scripts? $ rpmquery --querytags | grep 'PROG$' PREINPROG POSTINPROG PREUNPROG POSTUNPROG VERIFYSCRIPTPROG TRIGGERSCRIPTPROG > It isn't clear whether you should hash informational sections such as > %description. It can be argued that under the same NEVR, the > description shouldn't change anyway. Is it possible that nothing > changes in a package but the description? Would we still want to > update/replace the package then? > > Finally, your identity hash need not to be fixed once and forever. It > is used only for internal bookkeeping, so once in a while you are > allowed to change the hash and rebuild the identity-addressable > storage. You should have a script for that in girar/admin. It may take > an hour or so to complete, but that's not too bad. -- ldv