Date: Wed, 22 Jul 2020 17:05:02 -0400 From: "Dan Langille" <dan@langille.org> To: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= <uqs@freebsd.org> Cc: freebsd-git@freebsd.org Subject: Re: FreshPorts status update 2020.07.21 Message-ID: <33a7ddfa-224e-4834-af59-f0794e6232d7@www.fastmail.com> In-Reply-To: <20200722171717.GG16439@acme.spoerlein.net> References: <3c7b8854-f5e8-4c72-acb3-f1147eae9df3@www.fastmail.com> <20200722171717.GG16439@acme.spoerlein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 22, 2020, at 1:17 PM, Ulrich Sp=C3=B6rlein wrote: > On Tue, 2020-07-21 at 20:02:48 -0400, Dan Langille wrote: > > Hello, > >=20 > > At present, devgit.FreshPorts.org is keeping up with all port commit= s. =20 > >=20 > > Processing is initiated manually. I run a script to set some flags. = This could be run by a commit-hook pulling a URL. FreshPorts can do the= rest. I welcome discussion on how to do this. > >=20 > > I'd rather keep the URL private, for less abuse-potential. We could= add in some auth or ACL. Invoking the URL will get FreshPorts to query= the FreeBSD repo. > >=20 > >=20 > > I've posted the following issue at https://github.com/FreshPorts/git= _proc_commit/issues/23 > >=20 > > ### > > I am having trouble detecting a port delete or copy. Under subversio= n, as seen at https://svnweb.freebsd.org/ports?view=3Drevision&revision=3D= 542761, you get a deleted notice. > >=20 > > In the email (https://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D132696= 0+0+current/svn-ports-head) this turns up as: head/net/kdav/ under Delet= ed. > >=20 > > In git, it does not, from what I can tell. I can find: > >=20 > > $ grep net/kda 2020.07.21.17.15.38.000000.d016c9140a6e4b7627d2648592= 6a659f2686185d.xml > > - net/kdav became a framework and was therefore moved to net/kf5-kda= v. > > <FILE Action=3D"Delete" Path=3D"net/kdav/distinfo"/> > > <FILE Action=3D"Rename" Path=3D"net/kdav/Makefile" Destination= =3D"net/kf5-kdav/Makefile"/> > > <FILE Action=3D"Rename" Path=3D"net/kdav/pkg-plist" Destinatio= n=3D"net/kf5-kdav/pkg-plist"/> > >=20 > > (Sorry, the above is the XML generated by https://github.com/FreshPo= rts/git_proc_commit/blob/master/git-to-freshports/git-to-freshports-xml.= py) > >=20 > > Knowing that a file has been deleted within a commit is vital. Detec= ting it from within the commit log is the optimal approach. Does anythin= g have a suggestion here? > >=20 > > I can see that the Makefile & pkg-plist have been renamed, and disti= nfo has been deleted. Perhaps it's just a matter of changing my approach= . However, this does not yet sound like a solid plan. > >=20 > > I welcome suggestions for something I have missed in the git interfa= ce please. >=20 > I don't know how stable these interfaces and outputs are in git over > time, but you can get the full diff with git log -p or git show -p and= > could feed that through, say diffstat. >=20 > A better approach might be to use --compact-summary (see the git log > manpage for some possible outputs and variants of it). >=20 > (I'm using --format here to suppress printing of the commit message, > which might mess up parsing the output we're actually interested in) >=20 > $ git show --compact-summary --format=3D%h=20 > 44b2876caf1f56d6e940a329a2f8e06724fd621f > 44b2876caf1f >=20 > MOVED | 1 + > devel/Makefile | 1 - > devel/py-trio/Makefile (gone) | 38 ---------------------------------= ----- > devel/py-trio/distinfo (gone) | 3 --- > devel/py-trio/pkg-descr (gone) | 13 ------------- > 5 files changed, 1 insertion(+), 55 deletions(-) >=20 > Probably even better is this: > $ git show --summary --format=3D%h 44b2876caf1f56d6e940a329a2f8e06724f= d621f > 44b2876caf1f >=20 > delete mode 100644 devel/py-trio/Makefile > delete mode 100644 devel/py-trio/distinfo > delete mode 100644 devel/py-trio/pkg-descr >=20 > (why does this drop the changes to MOVED and devel/Makefile though? Th= e=20 > manpage entry is cryptic enough: > Output a condensed summary of extended header information such as=20= > creations, renames and mode changes. > ) I think the rule so far is: * if cat/port/Makefile is deleted or renamed, that port has been deleted= I could reproduce what you did here, with the beta repo: [dan@pro02:~/src/freebsd-ports-beta] $ git show --summary --format=3D%h = 44b2876caf1f56d6e940a329a2f8e06724fd621f 44b2876caf1f delete mode 100644 devel/py-trio/Makefile delete mode 100644 devel/py-trio/distinfo delete mode 100644 devel/py-trio/pkg-descr [dan@pro02:~/src/freebsd-ports-beta] $=20 Now, moving over to Github repo with the comment I mentioned above: [dan@pro02:~/src/freebsd-ports] $ git show --summary --format=3D%h d016c= 9140a6e4b7627d26485926a659f2686185d d016c9140a6e delete mode 100644 devel/kf5-kcrash/files/patch-src_kcrash.cpp delete mode 100644 devel/kf5-solid/files/patch-CMakeLists.txt delete mode 100644 net/kdav/distinfo rename net/{kdav =3D> kf5-kdav}/Makefile (82%) create mode 100644 net/kf5-kdav/distinfo rename net/{kdav =3D> kf5-kdav}/pkg-plist (92%) [dan@pro02:~/src/freebsd-ports] $=20 That is very similar to what Adriaan de Groot showed me via https://docs= .freebsd.org/cgi/getmsg.cgi?fetch=3D2171670+0+current/svn-ports-head ### git tells me: delete mode 100644 net/kdav/distinfo rename net/{kdav =3D> kf5-kdav}/Makefile (82%) create mode 100644 net/kf5-kdav/distinfo rename net/{kdav =3D> kf5-kdav}/pkg-plist (92%) ### That output 'rename net/{kdav =3D> kf5-kdav}/Makefile' may proof non-tri= vial to parse. I think so far the above rule is the best option. Thank you. --=20 Dan Langille dan@langille.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33a7ddfa-224e-4834-af59-f0794e6232d7>