Re: svn revision stable/9

看板FB_stable作者時間12年前 (2013/04/27 13:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/9 (看更多)
On Mon, 22 Apr 2013 17:38:10 -0700 =A0Jeremy Chadwick <jdc@koitsu.org> wrote: > On Mon, Apr 22, 2013 at 08:06:02PM -0400, Glen Barber = >wrote: >> On Mon, Apr 22, 2013 at 05:00:04PM -0700, Jeremy = >>Chadwick wrote: >> > I'm not sure where this comes from during buildkernel, = >>however.=A0=A0"svn >> > info" is the way I know of to get that value, but I = >>don't know where in >> > the build framework it obtains this number. >> > = >> = >> svnversion is called in sys/conf/newvers.sh to get the = >>revision. >> = >> > The reason I mention that: possibly the build = >>framework uses the "svn" >> > command to get the information, and since "svnup" is = >>not "svn", it can't >> > get it, thus there's nothing to print. >> > = >> = >> svnversion is the specific binary that is required, but = >>svnup does not >> pull in metadata. > = > As always, thanks for the insights Glen -- that was the = >piece I was > looking for.=A0=A0:-) > = > John Mehr might be able to comment on this, but here's = >an idea (stated > with zero knowledge of, well, pretty much anything!): > = > Depending on what all goes on within svnup (and what the = >SVN protocol > offers), is it possible for svnup to pull down a = >revision number and > store it somewhere (ex. /var/db/svnup-revision would = >contain rXXXXXX), > then as part of the svnup package/suite, have a shell = >script called > "svnversion" that simply provides the content of that = >file? > = > That looks like it'd be compatible with = >sys/conf/newvers.sh, which > does: > = > 91 for dir in /bin /usr/bin /usr/local/bin; do > 92=A0=A0=A0=A0=A0=A0=A0=A0 if [ -x "${dir}/svnversion" ] ; then > 93=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 svnversion=3D${dir}/sv= nversion > 94=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break > 95=A0=A0=A0=A0=A0=A0=A0=A0 fi > 96 done > ... > 106 if [ -n "$svnversion" ] ; then > 107=A0=A0=A0=A0=A0=A0=A0=A0 echo "$svnversion" > 108=A0=A0=A0=A0=A0=A0=A0=A0 svn=3D`cd ${SYSDIR} && $svnversion` > 109=A0=A0=A0=A0=A0=A0=A0=A0 case "$svn" in > 110=A0=A0=A0=A0=A0=A0=A0=A0 [0-9]*) svn=3D" r${svn}" ;; > 111=A0=A0=A0=A0=A0=A0=A0=A0 *)=A0=A0=A0=A0=A0=A0unset svn ;; > 112=A0=A0=A0=A0=A0=A0=A0=A0 esac > 113 fi > = > Naturally the svnup port would need to have a CONFLICTS = >line added, > since having both svnup and subversion installed on the = >same machine > would result in a /usr/local/bin/svnversion conflict. > = > -- = > | Jeremy Chadwick = >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0jdc@koitsu.org | > | UNIX Systems Administrator = >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 http://jdc.koitsu.org/ | > | Mountain View, CA, US = >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | > | Making life hard for others since 1977. = >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0PGP 4BD6C0CB | > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = >"freebsd-stable-unsubscribe@freebsd.org" > = Hello, svnup stores "known file" information in /tmp/svnup for = each of the defined sections (current, stable, ports, = etc.) and in the next update, it will be including the = revision number in these files so that something like: # svnup stable -n would return the stable branch's last downloaded revision = number and then exit. Because the current, stable and releng branches all use = /usr/src by default, implementing a custom svnversion to = inform newvers.sh of which revision exists in /usr/src = would be problematic without leaving a small bread crumb = there for newvers.sh to use.=A0 If this is ok to do, I can = include this in the next revision (which should be ready = to go in the next couple of days). _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
文章代碼(AID): #1HUsCVyi (FB_stable)
討論串 (同標題文章)
文章代碼(AID): #1HUsCVyi (FB_stable)