Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package aerc for openSUSE:Factory checked in 
at 2023-05-11 14:13:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aerc (Old)
 and      /work/SRC/openSUSE:Factory/.aerc.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "aerc"

Thu May 11 14:13:53 2023 rev:3 rq:1086343 version:0.15.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/aerc/aerc.changes        2023-04-29 
17:28:31.358638151 +0200
+++ /work/SRC/openSUSE:Factory/.aerc.new.1533/aerc.changes      2023-05-11 
14:13:54.425486002 +0200
@@ -1,0 +2,7 @@
+Thu May 11 09:19:32 UTC 2023 - Hannes Braun <[email protected]> - 0.15.2
+
+- Update to upstream version 0.15.2
+  * Extra messages disappearing when deleting on maildir.
+  * "colorize" and "wrap" filters option parsing on ARM.
+
+-------------------------------------------------------------------

Old:
----
  aerc-0.15.1.tar.gz

New:
----
  aerc-0.15.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ aerc.spec ++++++
--- /var/tmp/diff_new_pack.nkzTRc/_old  2023-05-11 14:13:55.381490714 +0200
+++ /var/tmp/diff_new_pack.nkzTRc/_new  2023-05-11 14:13:55.385490733 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           aerc
-Version:        0.15.1
+Version:        0.15.2
 Release:        0
 Summary:        An email client for your terminal
 License:        MIT

++++++ aerc-0.15.1.tar.gz -> aerc-0.15.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/.builds/alpine-edge.yml 
new/aerc-0.15.2/.builds/alpine-edge.yml
--- old/aerc-0.15.1/.builds/alpine-edge.yml     2023-04-28 21:06:33.000000000 
+0200
+++ new/aerc-0.15.2/.builds/alpine-edge.yml     2023-05-11 11:12:35.000000000 
+0200
@@ -12,7 +12,7 @@
   DESTDIR: ./out
   GOFLAGS: "-tags=notmuch"
   CC: gcc
-  CFLAGS: -O2 -g -Wall -Wextra -Werror -Wformat-security -Wstack-protector 
-fstack-protector-strong -fanalyzer
+  CFLAGS: -O2 -g -Wall -Wextra -Wconversion -Warith-conversion -Werror 
-Wformat-security -Wstack-protector -fstack-protector-strong -fanalyzer
   FILTERS_TEST_PREFIX: valgrind --leak-check=full --error-exitcode=1
 tasks:
   - lint: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/CHANGELOG.md new/aerc-0.15.2/CHANGELOG.md
--- old/aerc-0.15.1/CHANGELOG.md        2023-04-28 21:06:33.000000000 +0200
+++ new/aerc-0.15.2/CHANGELOG.md        2023-05-11 11:12:35.000000000 +0200
@@ -5,6 +5,13 @@
 
 ## [Unreleased](https://git.sr.ht/~rjarry/aerc/log/master)
 
+## [0.15.2](https://git.sr.ht/~rjarry/aerc/refs/0.15.2) - 2023-05-11
+
+### Fixed
+
+- Extra messages disappearing when deleting on maildir.
+- `colorize` and `wrap` filters option parsing on ARM.
+
 ## [0.15.1](https://git.sr.ht/~rjarry/aerc/refs/0.15.1) - 2023-04-28
 
 ### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/Makefile new/aerc-0.15.2/Makefile
--- old/aerc-0.15.1/Makefile    2023-04-28 21:06:33.000000000 +0200
+++ new/aerc-0.15.2/Makefile    2023-05-11 11:12:35.000000000 +0200
@@ -2,7 +2,7 @@
 .SUFFIXES:
 .SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd
 
-VERSION?=`git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 
0.15.1`
+VERSION?=`git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 
0.15.2`
 VPATH=doc
 PREFIX?=/usr/local
 BINDIR?=$(PREFIX)/bin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/filters/colorize.c 
new/aerc-0.15.2/filters/colorize.c
--- old/aerc-0.15.1/filters/colorize.c  2023-04-28 21:06:33.000000000 +0200
+++ new/aerc-0.15.2/filters/colorize.c  2023-05-11 11:12:35.000000000 +0200
@@ -472,8 +472,8 @@
        bool trim;
 
        while (!regexec(&url_re, in, 3, groups, 0)) {
-               in += print_notabs(in, groups[0].rm_so);
-               len = groups[0].rm_eo - groups[0].rm_so;
+               in += print_notabs(in, (size_t)groups[0].rm_so);
+               len = (size_t)groups[0].rm_eo - (size_t)groups[0].rm_so;
 
                if (groups[1].rm_so != -1) {
                        /* Standard URL (i.e. not mailto: nor email address).
@@ -565,7 +565,7 @@
 
        if (!regexec(&header_re, in, 1, groups, 0)) {
                print(seq(&styles.header));
-               in += print_notabs(in, groups[0].rm_eo);
+               in += print_notabs(in, (size_t)groups[0].rm_eo);
                print(RESET);
        }
        urls(in, NULL);
@@ -580,7 +580,7 @@
 {
        regmatch_t groups[8];
        struct style *s;
-       int q, level;
+       size_t q, level;
 
        q = level = 0;
        while (in[q] == '>') {
@@ -704,7 +704,7 @@
 int parse_args(int argc, char **argv)
 {
        const char *filename = NULL;
-       char c;
+       int c;
 
        styleset = getenv("AERC_STYLESET");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/filters/wrap.c 
new/aerc-0.15.2/filters/wrap.c
--- old/aerc-0.15.1/filters/wrap.c      2023-04-28 21:06:33.000000000 +0200
+++ new/aerc-0.15.2/filters/wrap.c      2023-05-11 11:12:35.000000000 +0200
@@ -29,14 +29,15 @@
 }
 
 static size_t margin = 80;
-static long prose_ratio = 50;
+static size_t prose_ratio = 50;
 static bool reflow;
 static FILE *in_file;
 
 int parse_args(int argc, char **argv)
 {
        const char *filename = NULL;
-       char c;
+       long value;
+       int c;
 
        while ((c = getopt(argc, argv, "hrw:l:f:")) != -1) {
                errno = 0;
@@ -45,26 +46,28 @@
                        reflow = true;
                        break;
                case 'l':
-                       prose_ratio = strtol(optarg, NULL, 10);
+                       value = strtol(optarg, NULL, 10);
                        if (errno) {
                                perror("error: invalid ratio value");
                                return 1;
                        }
-                       if (prose_ratio <= 0 || prose_ratio >= 100) {
+                       if (value <= 0 || value >= 100) {
                                fprintf(stderr, "error: ratio must be 
]0,100[\n");
                                return 1;
                        }
+                       prose_ratio = (size_t)value;
                        break;
                case 'w':
-                       margin = strtol(optarg, NULL, 10);
+                       value = strtol(optarg, NULL, 10);
                        if (errno) {
                                perror("error: invalid width value");
                                return 1;
                        }
-                       if (margin < 1) {
+                       if (value < 1) {
                                fprintf(stderr, "error: width must be 
positive\n");
                                return 1;
                        }
+                       margin = (size_t)value;
                        break;
                case 'f':
                        filename = optarg;
@@ -95,7 +98,7 @@
 static bool is_empty(const wchar_t *s)
 {
        while (*s != L'\0') {
-               if (!iswspace(*s++))
+               if (!iswspace((wint_t)*s++))
                        return false;
        }
        return true;
@@ -131,7 +134,7 @@
        /* actual text of this paragraph */
        wchar_t *text;
        /* percentage of letters in text */
-       int prose_ratio;
+       size_t prose_ratio;
        /* text ends with a space */
        bool flowed;
        /* paragraph is a list item */
@@ -164,27 +167,27 @@
        if (buf[i] == L'-' || buf[i] == '*' || buf[i] == '.') {
                /* bullet list */
                i++;
-       } else if (iswdigit(buf[i])) {
+       } else if (iswdigit((wint_t)buf[i])) {
                /* numbered list */
                i++;
-               if (iswdigit(buf[i])) {
+               if (iswdigit((wint_t)buf[i])) {
                        i++;
                }
-       } else if (iswalpha(buf[i])) {
+       } else if (iswalpha((wint_t)buf[i])) {
                /* lettered list */
-               c = towlower(buf[i]);
+               c = (wchar_t)towlower((wint_t)buf[i]);
                i++;
                if (c == L'i' || c == L'v') {
                        /* roman i. ii. iii. iv. ... */
-                       c = towlower(buf[i]);
+                       c = (wchar_t)towlower((wint_t)buf[i]);
                        while (i < 4 && (c == L'i' || c == L'v')) {
-                               c = towlower(buf[++i]);
+                               c = (wchar_t)towlower((wint_t)buf[++i]);
                        }
                }
        } else {
                return 0;
        }
-       if (iswdigit(buf[0]) || iswalpha(buf[0])) {
+       if (iswdigit((wint_t)buf[0]) || iswalpha((wint_t)buf[0])) {
                if (buf[i] == L')' || buf[i] == L'/' || buf[i] == L'.') {
                        i++;
                } else {
@@ -228,13 +231,13 @@
        }
        /* detect list item prefix & indent */
        t = q;
-       while (iswspace(buf[t])) {
+       while (iswspace((wint_t)buf[t])) {
                t++;
        }
        i = list_item_offset(&buf[t]);
        list_item = i != 0;
        t += i;
-       while (iswspace(buf[t])) {
+       while (iswspace((wint_t)buf[t])) {
                t++;
        }
        indent_len = t - q;
@@ -242,14 +245,14 @@
        e = t;
        letters = 0;
        while (buf[e] != L'\0') {
-               if (iswalpha(buf[e++])) {
+               if (iswalpha((wint_t)buf[e++])) {
                        letters++;
                }
        }
        /* strip trailing whitespace unless it is a signature delimiter */
        flowed = false;
        if (wcscmp(&buf[q], L"-- ") != 0) {
-               while (e > q && iswspace(buf[e - 1])) {
+               while (e > q && iswspace((wint_t)buf[e - 1])) {
                        e--;
                        flowed = true;
                }
@@ -311,7 +314,7 @@
        wchar_t *text;
 
        /* trim leading whitespace of the next paragraph before joining */
-       while (*append != L'\0' && iswspace(*append))
+       while (*append != L'\0' && iswspace((wint_t)*append))
                append++;
 
        len = wcslen(p->text);
@@ -342,8 +345,8 @@
  */
 static void write_paragraph(struct paragraph *p)
 {
-       size_t quotes_width = wcswidth(p->quotes, wcslen(p->quotes));
-       size_t remain = wcswidth(p->text, wcslen(p->text));
+       size_t quotes_width = (size_t)wcswidth(p->quotes, wcslen(p->quotes));
+       size_t remain = (size_t)wcswidth(p->text, wcslen(p->text));
        const wchar_t *indent = L"";
        wchar_t *text = p->text;
        bool more = true;
@@ -351,7 +354,7 @@
        size_t width;
 
        while (more) {
-               width = quotes_width + wcswidth(indent, wcslen(indent));
+               width = quotes_width + (size_t)wcswidth(indent, wcslen(indent));
 
                if (width + remain <= margin || p->prose_ratio < prose_ratio) {
                        /* whole paragraph fits on a single line */
@@ -359,18 +362,18 @@
                        more = false;
                } else {
                        /* find split point, preferably before margin */
-                       int split = -1;
-                       int w = 0;
-                       for (int i = 0; text[i] != L'\0'; i++) {
-                               w += wcwidth(text[i]);
-                               if (width + w > margin && split != -1) {
+                       size_t split = -1U;
+                       size_t w = 0;
+                       for (size_t i = 0; text[i] != L'\0'; i++) {
+                               w += (size_t)wcwidth(text[i]);
+                               if (width + w > margin && split != -1U) {
                                        break;
                                }
-                               if (iswspace(text[i])) {
+                               if (iswspace((wint_t)text[i])) {
                                        split = i;
                                }
                        }
-                       if (split == -1) {
+                       if (split == -1U) {
                                /* no space found to split, print a long line */
                                line = text;
                                more = false;
@@ -379,7 +382,7 @@
                                line = text;
                                split++;
                                /* find start of next word */
-                               while (iswspace(text[split])) {
+                               while (iswspace((wint_t)text[split])) {
                                        split++;
                                }
                                if (text[split] != L'\0') {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/lib/msgstore.go 
new/aerc-0.15.2/lib/msgstore.go
--- old/aerc-0.15.1/lib/msgstore.go     2023-04-28 21:06:33.000000000 +0200
+++ new/aerc-0.15.2/lib/msgstore.go     2023-05-11 11:12:35.000000000 +0200
@@ -298,13 +298,12 @@
                        delete(store.Messages, uid)
                        delete(store.Deleted, uid)
                }
-               uids := make([]uint32, len(store.uids)-len(msg.Uids))
-               j := 0
+               uids := make([]uint32, 0, len(store.uids)-len(msg.Uids))
                for _, uid := range store.uids {
-                       if _, deleted := toDelete[uid]; !deleted && j < 
len(uids) {
-                               uids[j] = uid
-                               j += 1
+                       if _, deleted := toDelete[uid]; deleted {
+                               continue
                        }
+                       uids = append(uids, uid)
                }
                store.uids = uids
                if len(uids) == 0 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aerc-0.15.1/worker/maildir/worker.go 
new/aerc-0.15.2/worker/maildir/worker.go
--- old/aerc-0.15.1/worker/maildir/worker.go    2023-04-28 21:06:33.000000000 
+0200
+++ new/aerc-0.15.2/worker/maildir/worker.go    2023-05-11 11:12:35.000000000 
+0200
@@ -14,6 +14,7 @@
        "sort"
        "strings"
        "sync"
+       "time"
 
        "github.com/emersion/go-maildir"
 
@@ -41,6 +42,8 @@
        selectedInfo        *models.DirectoryInfo
        worker              *types.Worker
        watcher             types.FSWatcher
+       watcherDebounce     *time.Timer
+       fsEvents            chan struct{}
        currentSortCriteria []*types.SortCriterion
        maildirpp           bool // whether to use Maildir++ directory layout
        capabilities        *models.Capabilities
@@ -57,8 +60,9 @@
                        Sort:   true,
                        Thread: true,
                },
-               worker:  worker,
-               watcher: watch,
+               worker:   worker,
+               watcher:  watch,
+               fsEvents: make(chan struct{}),
        }, nil
 }
 
@@ -85,8 +89,17 @@
                select {
                case action := <-w.worker.Actions:
                        w.handleAction(action)
-               case ev := <-w.watcher.Events():
-                       w.handleFSEvent(ev)
+               case <-w.watcher.Events():
+                       if w.watcherDebounce != nil {
+                               w.watcherDebounce.Stop()
+                       }
+                       // Debounce FS changes
+                       w.watcherDebounce = time.AfterFunc(50*time.Millisecond, 
func() {
+                               defer log.PanicHandler()
+                               w.fsEvents <- struct{}{}
+                       })
+               case <-w.fsEvents:
+                       w.handleFSEvent()
                }
        }
 }
@@ -121,7 +134,7 @@
        }
 }
 
-func (w *Worker) handleFSEvent(ev *types.FSEvent) {
+func (w *Worker) handleFSEvent() {
        // if there's not a selected directory to rescan, ignore
        if w.selected == nil {
                return
@@ -133,41 +146,10 @@
        }
 
        w.selectedInfo = w.getDirectoryInfo(w.selectedName)
-       dirInfoMsg := &types.DirectoryInfo{
-               Info: w.selectedInfo,
-       }
-
-       base := filepath.Base(ev.Path)
-       parts := strings.SplitN(base, ":", 2)
-       if len(parts) != 2 {
-               log.Errorf("Couldn't parse key from file: %s", ev.Path)
-               return
-       }
-       msg := w.c.MessageFromKey(*w.selected, parts[0])
-
-       switch ev.Operation {
-       case types.FSCreate:
-               // TODO for FSCreate we should send a new message type that
-               // creates the message in the UI, does a binary search based on
-               // current sort criteria and inserts message at proper index
-               // For now, we just refetch the list.
-               dirInfoMsg.Refetch = true
-       case types.FSRename:
-               msgInfo, err := msg.MessageInfo()
-               if err != nil {
-                       log.Errorf(err.Error())
-                       return
-               }
-               w.worker.PostMessage(&types.MessageInfo{
-                       Info: msgInfo,
-               }, nil)
-       case types.FSRemove:
-               w.worker.PostMessage(&types.MessagesDeleted{
-                       Uids: []uint32{msg.uid},
-               }, nil)
-       }
-
-       w.worker.PostMessage(dirInfoMsg, nil)
+       w.worker.PostMessage(&types.DirectoryInfo{
+               Info:    w.selectedInfo,
+               Refetch: true,
+       }, nil)
 }
 
 func (w *Worker) done(msg types.WorkerMessage) {

Reply via email to