Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#53161 - [vim-spell] Missplaced hyphen in PKGBUILD
Attached to Project:
Arch Linux
Opened by NicoHood (NicoHood) - Saturday, 04 March 2017, 14:19 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 20 April 2017, 16:52 GMT
Opened by NicoHood (NicoHood) - Saturday, 04 March 2017, 14:19 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 20 April 2017, 16:52 GMT
|
DetailsDescription:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/vim-spell#n72 Please remove the hyphen. Otherwise namcap fails to parse the package. |
This task depends upon
It seems to start with the eval command which causes trouble for me. Maybe this can be simplified.
I will try to write a proper fix.
---------------
for _i in ${pkgname[@]}; do _j=${_i/vim-spell-/}; eval "package_$_i() {
cd \"\$srcdir\"
install -d \"\$pkgdir\"/usr/share/vim/vimfiles/spell
install -m644 $_j* \"\$pkgdir\"/usr/share/vim/vimfiles/spell
[[ -f README_$_j.txt ]] \
&& install -Dm644 README_$_j.txt \"\$pkgdir\"/usr/share/licenses/$_i/README #\
# || echo 'No README for $_j...'
}"; done
-------------------
Which will give an invalid parsepkgbuild output:
----------------
sha256sums
source
url
No README for af...
%NAME%
vim-spell-af
%VERSION%
20150901-1
------------------
Otherwise I get with the namcap python API:
PacmanPackage({None: ['No README for af...'], 'name': 'vim-spell-af', [...] })
Maybe this also needs to be better fixed in parsepkgbuild or the namcap python part.
# Disable echo for the sourceing of the PKGBUILD to avoid errors
echo() { :; }
printf() { :; }
source $1
And then use builtin echo for every command below that line. This works for me.
Anyway, weird pkgbuilds are likely to be parsed weird. Using eval to generate a pkgbuild function that echos to stdout is weird. It is a bug, but given the exceptional nature of what it took to produce the error I kind of feel it isn't worth fixing.
Half of the problem can be fixed by replacing "echo" with "msg", a makepkg function that won't exist during this non-interactive use. This removes the "None: ['No README for af...'" junk. (I'm leaning towards this, because we have "msg" for a reason. And because of all the solutions it is the only one that makes the total size smaller :-)
Or namcap can be tweaked. In PacmanPackage(), changing "elif line.strip() != '':" to "elif line.strip() != '' and attrname:" ignores the malformed data and never creates a "None" field.
FS#43502