Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 253929 Details for
Bug 344655
eselect news module: Sort news items by their (reverse?) date
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for news.eselect
news.eselect.diff (text/plain), 1.29 KB, created by
Ulrich Müller
on 2010-11-10 23:05:43 UTC
(
hide
)
Description:
patch for news.eselect
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2010-11-10 23:05:43 UTC
Size:
1.29 KB
patch
obsolete
>--- news.eselect (revision 777) >+++ news.eselect (working copy) >@@ -15,18 +15,30 @@ > # read list of news items > # list of parameters may contain "unread" or "read" > # returns one item per line: status/repository/name >-# sort order: 1. "unread" before "read", 2. by repository >+# sort order: by item name > find_items() { >- local stat repos=$(get_repositories) repo item >+ local -a items repos=$(get_repositories) >+ local stat repo item key i >+ > for stat in "$@"; do > for repo in ${repos}; do > file="${ROOT}${NEWS_DIR}/news-${repo}.${stat}" > [[ -f ${file} ]] || continue > for item in $(<"${file}"); do >- echo "${stat}/${repo}/${item}" >+ # sort by item name. straight insertion sort. >+ for ((i=${#items[@]}; i>0; i--)); do >+ key=${items[i-1]#*/} >+ [[ ${item} < ${key#*/} ]] || break >+ items[i]=${items[i-1]} >+ done >+ items[i]=${stat}/${repo}/${item} > done > done > done >+ >+ for item in "${items[@]}"; do >+ echo "${item}" >+ done > } > > # write list of items to file >@@ -256,7 +268,7 @@ > # expand special values "new" and "all" > if [[ $# -eq 0 || $1 = new || $1 = all ]]; then > for (( i = 1; i <= n; i++ )); do >- [[ $1 = all || ${items[i-1]%%/*} = unread ]] || break >+ [[ $1 = all || ${items[i-1]%%/*} = unread ]] || continue > seq="${seq} ${i}" > done > set -- ${seq}
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 344655
:
253929
|
253955