Date: Sat, 25 Jan 2025 11:24:41 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 245667] ports-mgmt/pkg: Determine ports branch of active pkg repo Message-ID: <bug-245667-32340-I6MyUL6T0U@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-245667-32340@https.bugs.freebsd.org/bugzilla/> References: <bug-245667-32340@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245667 --- Comment #8 from Jason W. Bacon <jwb@freebsd.org> --- (In reply to Jason W. Bacon from comment #7) Use of the meta.txz timestamp in auto-pkg-branch broke, as I suspected it m= ight someday, due to changes in package building. I'm now using the following hack, which works most of the time, but will definitely fail for platforms that don't have regular package builds. # Branch may not happen immediately at midnight of Jan, April, # Jul, Oct 1, so check for existence of the ports branch and # back up 1 quarter if it's not there yet. # Note: This assumes that the new quarterly package repo is created # at the same moment as the ports branch. This is not reliable. while ! git ls-remote --branches https://git.freebsd.org/ports.git \ |grep -q "/$branch$"; do if [ $quarter =3D 1 ]; then year=3D$(($year - 1)) quarter=3D4 else quarter=3D$(($quarter - 1)) fi branch=3D${year}Q$quarter done --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245667-32340-I6MyUL6T0U>