Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Deleting old news items
Date: Sat, 06 Jan 2018 16:25:46
Message-Id: 20180106162536.43951d3a@snowtea
In Reply to: Re: [gentoo-dev] Re: Deleting old news items by kuzetsa
1 On Sat, 6 Jan 2018 08:18:19 -0500
2 kuzetsa <kuzetsa@×××××.com> wrote:
3 > On 01/06/2018 05:05 AM, Ulrich Mueller wrote:
4 > >>>>>> On Sat, 6 Jan 2018, Duncan wrote:
5 > >> $ equery b news.eselect
6 > >> app-admin/eselect-1.4.10 (/usr/share/eselect/modules/news.eselect)
7 > >> So in that case it's not the PM, but eselect.
8 > > In fact, it is the PM that would do the filtering, before filling
9 > > the list of unread news items
10 > > in /var/lib/gentoo/news/news-gentoo.read.
11 > >
12 > > Filtering in eselect news would be problematic: Obtaining the list
13 > > of items with "eselect news list" and e.g. reading them with
14 > > "eselect news read" are issued as separate commands, which requires
15 > > that the list of valid items does not change. However, time-based
16 > > filtering could cause a race condition, like an item expiring
17 > > between execution of the two commands.
18 >
19 > The race condition could be addressed by issuing a warning
20 > at or around the time when expirations occur (midnight),
21 > with or without detecting specific expirations which may
22 > have occurred:
23
24 How accurate is "around"? Obviously we'd need to introduce a user
25 configuration option so different users could set appropriate values
26 for their needs.
27
28 Seriously though, all this complexity is just highlighting that dates
29 are a really bad way of deciding when a news item should expire, and
30 that if we need anything, it's more Display-If conditions.
31
32 --
33 Ciaran McCreesh

Replies

Subject Author
Re: [gentoo-dev] Re: Deleting old news items Alec Warner <antarus@g.o>