Package: vim-runtime
Version: 2:8.0.1766-1
Severity: normal
Tags: patch

Dear Maintainer,

when show syntax of debcontrol file, it shows,

```
debcontrolArchitecture xxx contained any-sh3eb any-sh3eb kfreebsd-any any-sparc 
any-sparc any-ppc64 any-ppc64 any hurd-i386 kopensolaris-any
                   contained any-mips64el any-mips64el any-avr32 any-avr32 
any-x32 any-x32 all any-i386 any-i386 kopensolaris-i386 any-mipsel
                   contained any-mipsel netbsd-alpha any-lpia any-lpia 
any-powerpc any-powerpc any-armeb any-armeb kfreebsd-amd64 any-armel
                   contained any-armel any-alpha any-alpha any-ia64 any-ia64 
any-m68k any-m68k netbsd-any any-m32r any-m32r any-armhf any-armhf
                   contained any-sparc64 any-sparc64 any-hppa any-hppa 
linux-any any-sh any-sh any-powerpcspe any-powerpcspe any-arm64 any-arm64
                   contained knetbsd-i386 any-s390 any-s390 any-s390x any-s390x 
kfreebsd-i386 any-mips any-mips hurd-any knetbsd-any any-sh4eb
                   contained any-sh4eb any-sh3 any-sh3 any-sh4 any-sh4 
any-ppc64el any-ppc64el netbsd-i386 any-amd64 any-amd64
                   links to Normal
```

As you can see, there're duplicated any-amd64, but no amd64.

Patch is attached, generated upon
https://salsa.debian.org/vim-team/vim-debian repo.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim-nox [vim]  2:8.0.1766-1

vim-runtime suggests no packages.

-- no debconf information
From 6d49735f68d38013e1df439ca96ec53082cacad8 Mon Sep 17 00:00:00 2001
From: Shengjing Zhu <[email protected]>
Date: Thu, 31 May 2018 17:23:45 +0800
Subject: [PATCH] fix debcontrolArchitecture keyword

after map(s:archs, xxx), s:archs has changed. so the keyword
never contains original s:archs.

move the join(s:archs) above the map function. To make the code
more tidy, also move the join(s:kernels) line.

Signed-off-by: Shengjing Zhu <[email protected]>
---
 syntax/debcontrol.vim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/syntax/debcontrol.vim b/syntax/debcontrol.vim
index 3504780..da19a1c 100644
--- a/syntax/debcontrol.vim
+++ b/syntax/debcontrol.vim
@@ -40,10 +40,10 @@ let s:pairs = [
 
 " Define some common expressions we can use later on
 syn keyword debcontrolArchitecture contained all any
-exe 'syn keyword debcontrolArchitecture contained '. join(map(s:kernels, {k,v -> v .'-any'}))
-exe 'syn keyword debcontrolArchitecture contained '. join(map(s:archs, {k,v -> 'any-'.v}))
 exe 'syn keyword debcontrolArchitecture contained '. join(s:archs)
 exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs)
+exe 'syn keyword debcontrolArchitecture contained '. join(map(s:kernels, {k,v -> v .'-any'}))
+exe 'syn keyword debcontrolArchitecture contained '. join(map(s:archs, {k,v -> 'any-'.v}))
 
 unlet s:kernels s:archs s:pairs
 
-- 
2.17.0

Attachment: signature.asc
Description: PGP signature

Reply via email to