main/ca-certificates: fix bug in processing of local CA certificates

We were only grabbing the index of the certlist table, which was making the
filename appear as a number. It would seem like the seem like the second
variables from the pairs() function is the actual name we want.

[Timo: changed to use lua scratch '_' for the first return value,
and use ipairs as it is numbered table.]
This commit is contained in:
Andy Shinn 2015-05-06 21:49:31 +03:00 committed by Timo Teräs
parent 007b0f085e
commit 3faf2e0320
2 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,7 @@ _nmu="+nmu${pkgver#*_p}"
[ "$_nmu" = "+nmu${pkgver}" ] && _nmu=""
_ver=${pkgver}
pkgrel=1
pkgrel=2
pkgdesc="Common CA certificates PEM files"
url="http://packages.debian.org/sid/ca-certificates"
arch="noarch"
@ -62,8 +62,8 @@ EOF
}
md5sums="f619282081c8bfc65ea64c37fa5285ed ca-certificates_20141019.tar.xz
bb24a9e2caf6150053a981e617a209a9 update-ca-certificates"
0c2fb9aa695d9d857fecd1c236930016 update-ca-certificates"
sha256sums="684902d3f4e9ad27829f4af0d9d2d588afed03667997579b9c2be86fcd1eb73a ca-certificates_20141019.tar.xz
4f109a22d74ef36f691933716a83c015b8475ed4e47d21bd0d7f8baef4de046b update-ca-certificates"
b95a80d5881a3ffeea3f36599503a141f9c5a433bc9646d673225658ebc032a1 update-ca-certificates"
sha512sums="5b0e8fb917f5642a5a2b4fde46a706db0c652ff3fb31a5053d9123a5b670b50c6e3cf2496915cc01c613dcbe964d6432f393c12d8a697baedfad58f9d13e568b ca-certificates_20141019.tar.xz
dadf046999f226cef0b14bd9014e59f04fa05a984339ff84940a2beb0f33f70bc921233d22291a294f9366c67989f5d337febd1832574c2e28317c14de84ff00 update-ca-certificates"
ce0e6317af25a5433a4fef28db6afd0ef985089f4a6b9eb13ac1ca454de854ae3de18029fed1e385651317cb237581a38d3792c42f5f30ec12667609d689b4e1 update-ca-certificates"

View File

@ -47,8 +47,7 @@ end
local certlist = posix.glob(LOCALCERTSDIR..'*.crt')
if certlist ~= nil then
table.sort(certlist)
for f in pairs(certlist) do
local fn = LOCALCERTSDIR..f
for _, fn in ipairs(certlist) do
if posix.stat(fn, 'type') == 'regular' then
add(fn, bundle, calinks)
end