Your message dated Wed, 08 Aug 2018 03:49:06 +0000
with message-id <[email protected]>
and subject line Bug#756417: fixed in vim-scripts 20180807
has caused the Debian Bug report #756417,
regarding vim-scripts: deb.vim support for new control.tar members
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
756417: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756417
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vim-scripts
Version: 20130814
Severity: wishlist
Tags: patch

Hi!

While trying to improve the state of the deb support [D] in several
programs and tools, I came across vim-scripts, which is currently
missing support for control.tar.xz and control.tar. Here's a patch
updating the current one (and the entire patch), although I was
unable to properly test it because I could not seem to even get the
original code to work, I'm assuming that I was doing something wrong,
so I just wanted to post it here so that it does not get lost.

 [D] <https://wiki.debian.org/Teams/Dpkg/DebSupport>

Thanks,
Guillem
diff --git a/debian/patches/deb.vim-xz.diff b/debian/patches/deb.vim-xz.diff
index b329564..d67e774 100644
--- a/debian/patches/deb.vim-xz.diff
+++ b/debian/patches/deb.vim-xz.diff
@@ -2,10 +2,20 @@ Subject: Add support for xz-compressed debs
 Author: Jakub Wilk <[email protected]>
 Bug-Debian: http://bugs.debian.org/644172
 
-diff --git a/autoload/deb.vim b/autoload/deb.vim
+---
+ autoload/deb.vim |   41 +++++++++++++++++++++++++++++++++++------
+ 1 file changed, 35 insertions(+), 6 deletions(-)
+
 --- a/autoload/deb.vim
 +++ b/autoload/deb.vim
-@@ -32,6 +32,8 @@
+@@ -26,12 +26,14 @@ fun! deb#read(debfile, member)
+ 
+     let l:archmember = s:dataFileName(a:debfile) " default archive member to extract
+     if l:archmember == ""
+-        echohl WarningMsg | echo "***error*** (deb#read) no valid data file found in debian archive"
++        echohl WarningMsg | echo "***error*** (deb#read) no valid data member found in debian archive"
+         return
+     elseif l:archmember == "data.tar.gz"
          let l:unpcmp = "tar zxfO "
      elseif l:archmember == "data.tar.bz2"
          let l:unpcmp = "tar jxfO "
@@ -14,12 +24,70 @@ diff --git a/autoload/deb.vim b/autoload/deb.vim
      elseif l:archmember == "data.tar.lzma"
          if !s:hascmd("lzma")
              return
-@@ -230,7 +232,7 @@
+@@ -42,9 +44,18 @@ fun! deb#read(debfile, member)
+     endif
+ 
+     if a:member =~ '^\* ' " information control file
+-        let l:archmember = "control.tar.gz"
+         let l:target = substitute(l:target, "^\* ", "", "")
+-        let l:unpcmp = "tar zxfO "
++        let l:archmember = s:controlFileName(a:debfile)
++        if l:archmember == ""
++            echohl WarningMsg | echo "***error*** (deb#read) no valid control member found in debian archive"
++            return
++        elseif l:archmember == "control.tar.gz"
++            let l:unpcmp = "tar zxfO "
++        elseif l:archmember == "control.tar.xz"
++            let l:unpcmp = "tar JxfO "
++        elseif l:archmember == "control.tar"
++            let l:unpcmp = "tar xfO "
++        endif
+     elseif a:member =~ ' -> ' " symbolic link
+         let l:target = split(a:member,' -> ')[0]
+         let l:linkname = split(a:member,' -> ')[1]
+@@ -151,7 +162,13 @@ fun! deb#browse(file)
+ 
+     " display information control files
+     let l:infopos = line(".")
+-    exe "silent read! ar p " . s:QuoteFile(a:file) . " control.tar.gz | tar zt"
++    let l:ctrlmember = s:controlFileName(a:file)
++    if l:ctrlmember == ""
++       echohl WarningMsg | echo "***error*** (deb#Browser) no valid control member found in debian archive"
++       return
++    endif
++
++    exe "silent read! ar p " . s:QuoteFile(a:file) . " " . l:ctrlmember . " | tar zt"
+ 
+     $put=''
+ 
+@@ -227,16 +244,28 @@ fun! s:DebBrowseSelect()
+ 
+ endfun
+ 
++" return control file name for debian package. This can be either control.tar,
++" control.tar.gz or control.tar.xz
++fun s:controlFileName(deb)
++    return s:findFileName(a:deb, ["control.tar.gz", "control.tar.xz", "control.tar"])
++endfun
++
  " return data file name for debian package. This can be either data.tar.gz,
  " data.tar.bz2 or data.tar.lzma
  fun s:dataFileName(deb)
 -    for fn in ["data.tar.gz", "data.tar.bz2", "data.tar.lzma", "data.tar"]
-+    for fn in ["data.tar.gz", "data.tar.bz2", "data.tar.lzma", "data.tar.xz", "data.tar"]
++    return s:findFileName(a:deb, ["data.tar.gz", "data.tar.bz2", "data.tar.lzma", "data.tar.xz", "data.tar"])
++endfun
++
++" return a file name for debian package. This will be the first match from
++" the files passed as arguments.
++fun s:findFileName(deb, list)
++    for fn in a:list
          " [0:-2] is to remove trailing null character from command output
          if (system("ar t " . "'" . a:deb . "'" . " " . fn))[0:-2] == fn
              return fn
+         endif
+     endfor
+-    return "" " no debian data format in this archive
++    return "" " cannot find file in this debian archive
+ endfun
+ 
+ fun s:QuoteFile(file)
Subject: Add support for xz-compressed debs
Author: Jakub Wilk <[email protected]>
Bug-Debian: http://bugs.debian.org/644172

---
 autoload/deb.vim |   41 +++++++++++++++++++++++++++++++++++------
 1 file changed, 35 insertions(+), 6 deletions(-)

--- a/autoload/deb.vim
+++ b/autoload/deb.vim
@@ -26,12 +26,14 @@ fun! deb#read(debfile, member)
 
     let l:archmember = s:dataFileName(a:debfile) " default archive member to extract
     if l:archmember == ""
-        echohl WarningMsg | echo "***error*** (deb#read) no valid data file found in debian archive"
+        echohl WarningMsg | echo "***error*** (deb#read) no valid data member found in debian archive"
         return
     elseif l:archmember == "data.tar.gz"
         let l:unpcmp = "tar zxfO "
     elseif l:archmember == "data.tar.bz2"
         let l:unpcmp = "tar jxfO "
+    elseif l:archmember == "data.tar.xz"
+	let l:unpcmp = "tar JxfO "
     elseif l:archmember == "data.tar.lzma"
         if !s:hascmd("lzma")
             return
@@ -42,9 +44,18 @@ fun! deb#read(debfile, member)
     endif
 
     if a:member =~ '^\* ' " information control file
-        let l:archmember = "control.tar.gz"
         let l:target = substitute(l:target, "^\* ", "", "")
-        let l:unpcmp = "tar zxfO "
+        let l:archmember = s:controlFileName(a:debfile)
+        if l:archmember == ""
+            echohl WarningMsg | echo "***error*** (deb#read) no valid control member found in debian archive"
+            return
+        elseif l:archmember == "control.tar.gz"
+            let l:unpcmp = "tar zxfO "
+        elseif l:archmember == "control.tar.xz"
+            let l:unpcmp = "tar JxfO "
+        elseif l:archmember == "control.tar"
+            let l:unpcmp = "tar xfO "
+        endif
     elseif a:member =~ ' -> ' " symbolic link
         let l:target = split(a:member,' -> ')[0]
         let l:linkname = split(a:member,' -> ')[1]
@@ -151,7 +162,13 @@ fun! deb#browse(file)
 
     " display information control files
     let l:infopos = line(".")
-    exe "silent read! ar p " . s:QuoteFile(a:file) . " control.tar.gz | tar zt"
+    let l:ctrlmember = s:controlFileName(a:file)
+    if l:ctrlmember == ""
+       echohl WarningMsg | echo "***error*** (deb#Browser) no valid control member found in debian archive"
+       return
+    endif
+
+    exe "silent read! ar p " . s:QuoteFile(a:file) . " " . l:ctrlmember . " | tar zt"
 
     $put=''
 
@@ -227,16 +244,28 @@ fun! s:DebBrowseSelect()
 
 endfun
 
+" return control file name for debian package. This can be either control.tar,
+" control.tar.gz or control.tar.xz
+fun s:controlFileName(deb)
+    return s:findFileName(a:deb, ["control.tar.gz", "control.tar.xz", "control.tar"])
+endfun
+
 " return data file name for debian package. This can be either data.tar.gz,
 " data.tar.bz2 or data.tar.lzma
 fun s:dataFileName(deb)
-    for fn in ["data.tar.gz", "data.tar.bz2", "data.tar.lzma", "data.tar"]
+    return s:findFileName(a:deb, ["data.tar.gz", "data.tar.bz2", "data.tar.lzma", "data.tar.xz", "data.tar"])
+endfun
+
+" return a file name for debian package. This will be the first match from
+" the files passed as arguments.
+fun s:findFileName(deb, list)
+    for fn in a:list
         " [0:-2] is to remove trailing null character from command output
         if (system("ar t " . "'" . a:deb . "'" . " " . fn))[0:-2] == fn
             return fn
         endif
     endfor
-    return "" " no debian data format in this archive
+    return "" " cannot find file in this debian archive
 endfun
 
 fun s:QuoteFile(file)

--- End Message ---
--- Begin Message ---
Source: vim-scripts
Source-Version: 20180807

We believe that the bug you reported is fixed in the latest version of
vim-scripts, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
James McCoy <[email protected]> (supplier of updated vim-scripts package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 07 Aug 2018 23:30:42 -0400
Source: vim-scripts
Binary: vim-scripts
Architecture: source
Version: 20180807
Distribution: unstable
Urgency: medium
Maintainer: Debian Vim Maintainers <[email protected]>
Changed-By: James McCoy <[email protected]>
Description:
 vim-scripts - plugins for vim, adding bells and whistles
Closes: 756417 765651 769884
Changes:
 vim-scripts (20180807) unstable; urgency=medium
 .
   * Updated addons:
     - surround: Updated to 2.1
     - supertab: Updated to 2.1
     - tetris: Update to 0.53
     - bufexplorer: Update to 7.4.19
     - gnupg: Update to 2.6.1
   * Correct documentation of license for taglist.  (Closes: #765651)
   * control:
     + Change maintainer email to [email protected]
     + Change Vcs-* URLs to salsa.debian.org
     + Add ctags to Suggests since the taglist plugin uses it.  (Closes:
       #769884)
     + Remove Michael Piefel from Maintainers.  Thanks for all the help!
   * Bump debhelper compat to 10 (since cdbs isn't compatible with 11 yet)
   * Add support for control.tar.xz and control.tar to debPlugin.  Based on a
     patch from Guillem Jover.  (Closes: #756417)
   * control:
     + Set Rules-Requires-Root: no
     + Declare compliance with Policy 4.2.0
Checksums-Sha1:
 90d4f532b835abd682d88628fa988a90b5e21db2 1826 vim-scripts_20180807.dsc
 bc98dd1d2acda2bd0055b87349f2725c0ad7a9fd 790041 vim-scripts_20180807.tar.gz
 666b4eac4a9ad99da89cff71a9548b8179005abd 5921 
vim-scripts_20180807_amd64.buildinfo
Checksums-Sha256:
 989f17ef1f5ab296f885495d7d2a915695a603921646b73cb3bd7ae164f791b4 1826 
vim-scripts_20180807.dsc
 73161e6895e4a6f6f9355ab6d470957ecb051d2bcaf49eda6179b6c9acc3ae52 790041 
vim-scripts_20180807.tar.gz
 7b9945a830163c38ebfb71518dc4fe230e5288c1d5d13ea486edeb57398a56d9 5921 
vim-scripts_20180807_amd64.buildinfo
Files:
 a66d1365f0e23af9e653789b5d6bdb31 1826 editors optional vim-scripts_20180807.dsc
 c64f9afe4925d1c24c4a348b70f36292 790041 editors optional 
vim-scripts_20180807.tar.gz
 c82a56241db912fe011b588e92d7fa66 5921 editors optional 
vim-scripts_20180807_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEkb+/TWlWvV33ty0j3+aRrjMbo9sFAltqZHBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDkx
QkZCRjRENjk1NkJENURGN0I3MkQyM0RGRTY5MUFFMzMxQkEzREIACgkQ3+aRrjMb
o9tOexAAyqegTMqqHESyv7ieGlkCi8/3Wq5s2rWx6sYgdMbRZW3dJRQqRtNCL46t
q5wf+ZpDFhBLmuguo3rrUadBckTfGWpG/TCtTzesN8s5UEYrRBVMedU26RxxcmRB
qYs7tZCeH1qghDqP3onaHCpSvi8UUVxFDyXja3HMmij9JRMwuhCl/CFzNh/C3Ooq
PjckOwV2oYjYezOAN+BQ14KR+IOw7hUu0MLmSUJTGT4VmXKaPH6Zx4ji21Zm4FDo
oCov1OuUbRwHugScBa5mtTYK24z6/p9gVRdxs+zTH9FNSXfx1kLurNf3G6e9gk9S
qg2PBPjmakBE8qh1+9DvCR02vorIL4YFHAJkU/RiOrvEw5WO6aKBAZ1m33pVYH93
fm0otZTXEzOAbH9Eom6sHoPiMB+kG2Nho3SaQJ+27Hwi7wUPST8PT85iBHEB/gJs
erFBC+utNaU+YXJIuWbrR9YN0ChKJbyI+PN32Kt6EI7gKxxiJco264gu9GnGf4cn
eNoq/QaZy1tKidb/bHUdqJpy1iR2p2h5rSUkmSZbcg9T8jl10tVkq3/+kMF3FUcO
C4NTHYqv4KVIeAWBZ7IFSlVs0RvdEd9R7TNGFqzMgrOECAfu+SjtasaupfNcqQdt
xdm4fRBKXTB16sMFgVXDBoRD56W4L/o2bsFhXue6zxUTgr4DFgY=
=rFEX
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to