Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 687252 Details for
Bug 771075
app-admin/eselect: news module should be able to list only unread news
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
eselect-news.patch
eselect-news.patch (text/plain), 1.40 KB, created by
Ulrich Müller
on 2021-02-17 12:13:26 UTC
(
hide
)
Description:
eselect-news.patch
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2021-02-17 12:13:26 UTC
Size:
1.40 KB
patch
obsolete
>diff --git a/modules/news.eselect b/modules/news.eselect >index f941a8c..5125431 100644 >--- a/modules/news.eselect >+++ b/modules/news.eselect >@@ -1,5 +1,5 @@ > # -*-eselect-*- vim: ft=eselect >-# Copyright 2005-2020 Gentoo Authors >+# Copyright 2005-2021 Gentoo Authors > # Distributed under the terms of the GNU GPL version 2 or later > > inherit package-manager >@@ -171,16 +171,30 @@ describe_list() { > echo "List news items" > } > >+describe_list_options() { >+ echo "new : List unread news items" >+ echo "all : List all news items (default)" >+} >+ > do_list() { >- local item stat repo dir header line format title posted i=1 >+ local item stat repo dir header line format title posted unread i=0 n=0 > local cols=${COLUMNS:-80} ifs_save=${IFS} > local -a repos dirs > >+ case $1 in >+ new) unread=1 ;; >+ all|"") ;; >+ *) write_warning_msg "Bad option: $1" ;; >+ esac >+ > set -- $(find_items unread read) > write_list_start "News items:" > for item; do >+ (( i++ )) > stat=${item%%/*}; item=${item#*/} > repo=${item%%/*}; item=${item#*/} >+ [[ ! ${unread} || ${stat} = unread ]] || continue >+ (( n++ )) > find_repo_dir "${repo}" > title="(${item} - no title)" > posted=${item:0:10} >@@ -215,9 +229,8 @@ do_list() { > else > write_numbered_list_entry ${i} " ${line}" > fi >- (( i++ )) > done >- [[ $# -eq 0 ]] && ! is_output_mode brief \ >+ [[ ${n} -eq 0 ]] && ! is_output_mode brief \ > && write_kv_list_entry "(none found)" "" > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 771075
: 687252