From owner-freebsd-pkg@freebsd.org Wed Sep 23 09:40:54 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 1B421A06F43 for ; Wed, 23 Sep 2015 09:40:54 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mail.kapsi.fi (mx1.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF67519D3 for ; Wed, 23 Sep 2015 09:40:53 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from 91-159-15-56.elisa-laajakaista.fi ([91.159.15.56] helo=[192.168.255.112]) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZegXg-0006Of-JA for freebsd-pkg@freebsd.org; Wed, 23 Sep 2015 12:40:48 +0300 Subject: Re: Suggestion to add build/revision number to "pkg stats" To: freebsd-pkg@freebsd.org References: <20150916165829.46ba52f6@gecko4> <55FC6977.6010704@gmx.net> <20150922220600.GE16800@ivaldir.etoilebsd.net> From: Arto Pekkanen X-Enigmail-Draft-Status: N1110 Message-ID: <56027399.8040101@kapsi.fi> Date: Wed, 23 Sep 2015 12:40:41 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150922220600.GE16800@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4UQwqbl7b1TnMurOvDloqK6tnHiPPE18T" X-SA-Exim-Connect-IP: 91.159.15.56 X-SA-Exim-Mail-From: isoa@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false 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 09:40:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4UQwqbl7b1TnMurOvDloqK6tnHiPPE18T Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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.htm= l With this information I could simply pkg update, then see if repository w= as updated (by grepping pkg update output OR by checking pkg database che= cksum) AND if so, just do 'svn checkout -r ...' on the branch the repository is based on. After this the po= rts 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 proje= ct. I am trying to create an alternative to poudriere, which does ONLY bu= ilds those packages which have custom build options, and would merge in p= ackages (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 r= epository. Currently I've decided to halt the development, since I cannot= programmatically guarantee that I can get ports in sync with the base re= pository, which would mean that my software would end up botching the rep= ository 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 t= o >> >> 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 outpu= t >>> 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=20 >> local/remote switch; I have two remotes configured, my one built by=20 >> 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 othe= r > packages so if you need to build something: pkg install ports and you a= re always > 100% sure to be on good ports tree. >=20 > But we are not there yet :( >=20 > Best regards, > Bapt >=20 --4UQwqbl7b1TnMurOvDloqK6tnHiPPE18T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (MingW32) iF4EAREIAAYFAlYCc50ACgkQTBivhqtJa27OeAD/a1luKXZfbSMpIJPv//n3xbhR VNhF30e3cdJ/A4KKjNwA/jT8TjSkplQY82xQfh4L4MmtAJ3Bxxol/JF3sgnl0t2+ =eOc7 -----END PGP SIGNATURE----- --4UQwqbl7b1TnMurOvDloqK6tnHiPPE18T--