Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287887 - How to remove GLEP 42 news items?
Summary: How to remove GLEP 42 news items?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 11:54 UTC by Ulrich Müller
Modified: 2009-10-09 12:07 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2009-10-06 11:54:08 UTC
GLEP 42 says about "News Item Removal":
"News items can be removed (by removing the news file from the main tree) when they are no longer relevant, if they are made obsolete by a future news item or after a long period of time. This is the same as the method used for updates entries."

However, removal of the file from metadata/news/ is not sufficient. The news-${repoid}.{unread,read,skip} files must also be updated. Unfortunately the GLEP doesn't say if this is the duty of the package manager or the newsreading client.
Comment 1 Ciaran McCreesh 2009-10-06 13:50:10 UTC
How does it hurt if old news items are left in read or skip?
Comment 2 Ulrich Müller gentoo-dev 2009-10-06 15:26:47 UTC
(In reply to comment #1)
> How does it hurt if old news items are left in read or skip?

skip doesn't hurt, but if there's a non-existing item in read (or unread), the following happens:

With eselect-1.1.3 and eselect-news-20080320:
$ eselect news read all
2009-10-06-test-removed
/usr/share/eselect/modules/news.eselect: line 92: /usr/portage/metadata/news/2009-10-06-test-removed/2009-10-06-test-removed.en.txt: No such file or directory
/usr/share/eselect/modules/news.eselect: line 99: /usr/portage/metadata/news/2009-10-06-test-removed/2009-10-06-test-removed.en.txt: No such file or directory

With eselect-1.2.3:
$ eselect news read all
2009-10-06-test-removed
!!! Error: Error reading item "2009-10-06-test-removed"

I think that we shouldn't throw such error messages at users, but I also don't see what could be done about it in the eselect module. There's no good way to distinguish between a removed item and a real error condition.
Comment 3 Ciaran McCreesh 2009-10-06 15:40:12 UTC
What happens if an overlay supplies news items, and the user then removes that overlay?
Comment 4 Ulrich Müller gentoo-dev 2009-10-06 16:18:24 UTC
So what do you suggest? Silently ignore items that are in {read,unread} but have no corresponding file in metadata/news/?
Comment 5 Ciaran McCreesh 2009-10-06 16:23:54 UTC
I don't think the overlay case leaves us with a reasonable alternative.
Comment 6 Zac Medico gentoo-dev 2009-10-06 18:35:49 UTC
(In reply to comment #2)
> With eselect-1.2.3:
> $ eselect news read all
> 2009-10-06-test-removed
> !!! Error: Error reading item "2009-10-06-test-removed"

Maybe if we just change this to say "this item no longer exists" instead of screaming "!!! Error", so it won't scare the user so much.
Comment 7 Ciaran McCreesh 2009-10-06 18:39:03 UTC
(In reply to comment #6)
> Maybe if we just change this to say "this item no longer exists" instead of
> screaming "!!! Error", so it won't scare the user so much.

Yeah, that'd probably work. Would need to give the user a way to purge such items too.
Comment 8 Ulrich Müller gentoo-dev 2009-10-06 20:27:25 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Maybe if we just change this to say "this item no longer exists" instead of
> > screaming "!!! Error", so it won't scare the user so much.

Right, I'll downgrade the error to a warning then:
    write_warning_msg "News item \"${item}\" no longer exists"

> Yeah, that'd probably work. Would need to give the user a way to purge such
> items too.

It's moved from "unread" to "read" when it's encountered, and "purge" works the normal way. I don't think that we need anything more complicated here.
Comment 9 Ulrich Müller gentoo-dev 2009-10-09 12:07:29 UTC
Considering this as fixed, as the news module of eselect-1.2.4 (released today) displays a warning only.

Reopen (and attach a patch ;-) if you think that this is still unsatisfactory.