From owner-freebsd-pkg@freebsd.org Wed Sep 23 21:50:30 2015 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 411E1A07B68 for ; Wed, 23 Sep 2015 21:50:30 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C552A15CB for ; Wed, 23 Sep 2015 21:50:29 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so3431549wic.0 for ; Wed, 23 Sep 2015 14:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=z2ZAFauU97KPVsdrO0x1DH7Y7swXrCX32QVhq67uObA=; b=DFZ/TRDNQNnYSlXBdsCLmq1lXOn1mS2U5yJQ8Fg8s/LrMzkb1fNoPK4DFNn6ZEH+wT uBPGrzNbXiBLr4h8BKIxk6Zm3PNHF5f7hjjWY2mbYKT6XSF1heea9uN6gvjxGJwESKzS OierGJ3EFezQQiLTOsNq+VNBcOhEHthqDcJdzZORMUSLE4D4yjuWOiv3AQ+5odVq4IEd eYdNXIOgPt9PQSdHmUPhCqAugyTv/iW0Lgl/To6UxT90becUEJ3ftya2++MpgYNTlqAK mQDvxEY8o7uEgnoaS6nRMsppIPdykowAt9uy8ErLeWr53AY7hvulkimMIbsRuAqVxBmn Arlw== X-Received: by 10.194.48.81 with SMTP id j17mr37121574wjn.81.1443045027836; Wed, 23 Sep 2015 14:50:27 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id pk7sm9271187wjb.2.2015.09.23.14.50.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 14:50:27 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 23 Sep 2015 23:50:25 +0200 From: Baptiste Daroussin To: mfv Cc: Arto Pekkanen , freebsd-pkg@freebsd.org Subject: Re: Suggestion to add build/revision number to "pkg stats" Message-ID: <20150923215025.GM16800@ivaldir.etoilebsd.net> References: <20150916165829.46ba52f6@gecko4> <55FC6977.6010704@gmx.net> <20150922220600.GE16800@ivaldir.etoilebsd.net> <56027399.8040101@kapsi.fi> <20150923163731.70398452@gecko4> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Cqq5NadOW2RfLMJ/" Content-Disposition: inline In-Reply-To: <20150923163731.70398452@gecko4> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 21:50:30 -0000 --Cqq5NadOW2RfLMJ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 23, 2015 at 04:37:31PM -0400, mfv wrote: > > On Wed, 2015-09-23 at 12:40 Arto Pekkanen wrote: > > > >I have a better solution: just expose the start date of repository > >build in pkg stats. > > > >Something like this: > >Local package database: > > Installed packages: 780 > > Disk space occupied: 6 GiB > > > >Remote package database(s): > > Number of repositories: 1 > > Packages available: 24561 > > Unique packages: 24561 > > Total size of packages: 44 GiB > > Repository build started at: 20150923T000000Z > > > >All of the methods (svn, git, etc) afaik support checking out the > >closest revision by date. I know not many people use this, but still. > > > >See here: > >http://svnbook.red-bean.com/en/1.6/svn.tour.revs.specifiers.html > > > >With this information I could simply pkg update, then see if > >repository was updated (by grepping pkg update output OR by checking > >pkg database checksum) AND if so, just do 'svn checkout -r >build date from pkg stats> ...' on the branch the repository is based > >on. After this the ports tree would be in sync with the repository. > > > >Sometime ago I asked if it would be possible to determine the start > >date of repository build, but afaik this question was never answered. > > > >If this feature was implemented, I could finally finish my software > >project. I am trying to create an alternative to poudriere, which does > >ONLY builds those packages which have custom build options, and would > >merge in packages (that do not need to be built) from base repository. > >The goal of my project is to save tremendous amounts of time when > >building a custom repository. Currently I've decided to halt the > >development, since I cannot programmatically guarantee that I can get > >ports in sync with the base repository, which would mean that my > >software would end up botching the repository build every now and then. > > > >On 23.9.2015 1:06, Baptiste Daroussin wrote: > >> On Fri, Sep 18, 2015 at 09:43:51PM +0200, Simon Wright wrote: > >>> On 16/09/2015 22:58, mfv wrote: > >>> > >>> snipped > >>> > >>>> The build number is only available when the build begins, but the > >>>> package upgrade is not possible until the build process ends many > >>>> hours later. Moreover, it is also possible to update the port > >>>> tree to > >>> > >>> snipped > >>> > >>>> A simple solution would be to have the build number available as > >>>> part of a port upgrade and made available in "pkg stats". Its > >>>> output could look like this: > >>>> > >>>> Local package database: > >>> > >>> snipped > >>> > >>>> Even better would be an argument to "pkg stats" that would only > >>>> output the revision number, say "pkg stats -n" > >>>> > >>>> After running "pkg upgrade", it would then be an easy to extract > >>>> the build number of that particular upgrade and then sync the > >>>> ports tree to that number using subversion or, my favourite, svnup. > >>> > >>> +1, this information would be very useful for me. It might be=20 > >>> necessary to be able to specify a specific repository as well as > >>> the local/remote switch; I have two remotes configured, my one > >>> built by poudriere and also the "latest" freebsd.org repo. > >>> > >>> Simon. > >>=20 > >> This is a bit more complexe than that as the ports tree can be > >> checked out from portsnap, svn, git etc (aka different id). > >>=20 > >> The right way would be to package the ports tree itself along with > >> other packages so if you need to build something: pkg install ports > >> and you are always 100% sure to be on good ports tree. > >>=20 > >> But we are not there yet :( > >>=20 > >> Best regards, > >> Bapt > >>=20 > > >=20 > Hello Bapt and Arto, >=20 > I read your messages with interest. I did not realize there is not a > uniform numbering system among the different systems that update the > ports tree and had assumed that the subversion number was THE number. =20 > Could the the output of pkg stats identify the revision number for > the different systems? Say, >=20 > Git revision number: 123456 > Subversion number : 654321 Well I cannot get both revision when building. But I do like the suggestion= of the date. >=20 > Concerning the use of subversion and svnup, I adapted a script found on > the web that was able to extract the subversion/svnup number from the > most current build: >=20 > https://gist.github.com/reedacartwright/8622973baf89b263a6d7 >=20 > The only significant problem is the long time gap between the start of > the build (at which time the number is available) and the completion of > the build. There have been many occasions when my local ports tree was > updated to a particular revision number BEFORE the package build was > completed. Because of the time gap it is possible to update the local > repository against a particular revision and to update the ports tree to > a newer revision. >=20 > The following website may provide an answer to Arto's question as to > when a build begins. >=20 > https://pkg-status.freebsd.org/ >=20 > I've tried to sync the ports tree and packages based on a date but have > not been able to identify one. However, between a date and a build > number my guilt feeling is that the latter is the safer option. Not if I take the date of the last commit of the revision we use except tha= t it won't work with portsnap but maybe we can find a trick there too. >=20 > From past observations there is a 3 to 4 hour gap between the > completion of a build and the availability of its package update. I've > always wondered why. The time for everything to sync over the mirrors :) Best regards, Bapt --Cqq5NadOW2RfLMJ/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYDHqEACgkQ8kTtMUmk6ExQNACfUl/bahUvEUQRScTZSHZEidbO CxgAn2kmmM44rBUK4A+Z2ISR/7NKjiyi =GxvZ -----END PGP SIGNATURE----- --Cqq5NadOW2RfLMJ/--