🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #623

Bug#1150291: apt: sqv method passes an invalid --policy-as-of date on 29 February

#623
From: Julian Andres Klode
Date: Mon, 12 Oct 2026 19:20
51 lines
4246 bytes
On Thu, Oct 08, 2026 at 09:14:23AM +0200, David Kalnischkies wrote:
> Hi,
> 
> that is an interesting find!
> (And some sad code)
> 
> Am Wed, Oct 07, 2026 at 11:47:19PM -0600, schrieb Christian Noé Ramos López:
> > Two things would avoid it: computing the date with a calendar, or
> > passing "+1y", which sqv accepts as an offset (--policy-as-of +1y
> > exits 0 here).
> 
> The former should be relatively easy (as far as dates are concerned)
> with what is available via <chrono> in C++20 and above (nowadays).
> 
> 
> The second option seems (at least for now) to be a usage error itself
> as the documentation (sqv manpage) for --policy-as-of says
> | The time is expressed as an ISO 8601 formatted timestamp.
> 
> And earlier it expressed in general:
> | The TIMESTAMPs must be given in ISO 8601 format
> 
> I presume that +1y works stems from --time which says:
> | Set the reference time as an ISO 8601 formatted timestamp or
> | relative offset. […] This time is also used as the default
> | value for --not-after and --policy-as-of […]
> 
> "relative offset" does not seem defined through.
> 
> Aside: I /suppose/ "PY1" would be a valid ISO 8601 (duration),
> but I haven't dared to try how sqv would react.
> 
> 
> Maybe its just me, but I would prefer the former (even if documentation
> of sqv is changed) as the wording --policy-as-of highly suggests an
> exact date for me… even if I realize as of 5 seconds later that this
> might be a valid way of speaking, too.

Yes we actually want to use midnight here. I'm not sure if the best
approach is to the the 1 year from now or to truncate the day field
until it produces a valid date, such that 02-29 truncates to 02-28
rather than extends to 03-01 (semantically preserving the end of
month).

I guess it's easier though to do the chrono change and perhaps
that's what we should do yeah.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en
Technical Details
Message-ID: <NNtIZ-57Yt-7@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-15@gated-at.bofh.it> <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-15@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Julian Andres Klode <jak@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1150291: apt: sqv method passes an invalid --policy-as-of date on 29 February
Date: Mon, 12 Oct 2026 21:20:01 +0200
Message-ID: <NNtIZ-57Yt-7@gated-at.bofh.it>
References: <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-15@gated-at.bofh.it> <NLQJH-4eax-17@gated-at.bofh.it> <NLQJH-4eax-15@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Oct 12 19:17:11 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.9
Reply-To: Julian Andres Klode <jak@debian.org>, 1150291@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: deity@lists.debian.org
X-Debian-Pr-Message: followup 1150291
X-Debian-Pr-Package: apt
X-Debian-Pr-Source: apt
Accept-Language: de-DE, de, en-GB, en-US, en
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996452
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 51
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Christian Noé Ramos López <chris@nortesoftware.dev>
X-Original-Date: Mon, 12 Oct 2026 21:15:23 +0200
X-Original-Message-ID: <20261012210920.GA2184130@debian.org>
X-Original-References: <CAHGSfbZiV=jCcvjAJjwF+xjkVK88cwVfWL7ihgG9Pqf5tpAaHQ@mail.gmail.com> <CAHGSfbZiV=jCcvjAJjwF+xjkVK88cwVfWL7ihgG9Pqf5tpAaHQ@mail.gmail.com> <asc3V9Ac2XeCAKo_@crossbow> <CAHGSfbZiV=jCcvjAJjwF+xjkVK88cwVfWL7ihgG9Pqf5tpAaHQ@mail.gmail.com> <asc3V9Ac2XeCAKo_@crossbow>