You are not logged in.
I created a PKGBUILD for MEGASync [1], I usually run namcap in both PKGBUILD and package to check if there's any error, and I'm getting the following:
$ namcap PKGBUILD
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.5/site-packages/namcap.py", line 252, in <module>
process_pkgbuild(package, active_modules)
File "/usr/lib/python3.5/site-packages/namcap.py", line 143, in process_pkgbuild
pkginfo = Namcap.package.load_from_pkgbuild(package)
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 202, in load_from_pkgbuild
ret = PacmanPackage(db = out)
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 119, in __init__
self.process()
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 174, in process
self.clean_depends()
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 167, in clean_depends
self["provides"] = [strip_depend_info(d) for d in self['orig_provides']]
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 167, in <listcomp>
self["provides"] = [strip_depend_info(d) for d in self['orig_provides']]
File "/usr/lib/python3.5/site-packages/Namcap/package.py", line 46, in strip_depend_info
raise ValueError("Invalid dependency specification")
ValueError: Invalid dependency specification
My PKGBUILD:
# Maintainer: Alfredo Ramos <alfredo dot ramos at yandex dot com>
_pkgname=megasync
pkgname=${_pkgname}-git
pkgver=2.9.8.0.0.g4977c8e
pkgrel=1
pkgdesc='Easy automated syncing between your computers and your MEGA cloud drive. Development version'
arch=('i686' 'x86_64')
license=('custom:MEGA LIMITED CODE REVIEW LICENCE')
url='https://mega.nz/'
depends=(
'qt5-base' 'c-ares' 'crypto++' 'curl'
'libsodium' 'libuv' 'hicolor-icon-theme'
)
makedepends=('git' 'qt5-tools')
provides=("${_pkgbase}=${pkgver}")
conflicts=("${_pkgbase}" "${_pkgbase}-qt5")
source=(
'git+https://github.com/meganz/MEGAsync.git'
'git+https://github.com/meganz/sdk.git'
)
sha512sums=(
'SKIP'
'SKIP'
)
pkgver() {
# Update package version
cd "${srcdir}"/MEGAsync
git describe --long --tags --match '*Linux' | sed -r 's/^v//;s/_Linux//;s/_/./g;s/-/./g'
}
prepare() {
cd "${srcdir}"/MEGAsync
# Config submodules
git config submodule.src/MEGASync/mega.url "${srcdir}"/sdk
git submodule update --init
# Build directory
mkdir -p "${srcdir}"/build
cp -a "${srcdir}"/MEGAsync/* "${srcdir}"/build
}
build() {
# Configure MEGA SDK
cd "${srcdir}"/build/src/MEGASync/mega
./clean.sh
./autogen.sh
./configure \
--prefix=/usr \
--enable-gcc-hardening \
--with-cares \
--with-curl \
--with-cryptopp \
--with-sodium \
--with-sqlite \
--with-zlib \
--disable-examples \
--disable-megaapi \
--disable-silent-rules \
--without-freeimage \
--without-readline \
--without-termcap
# Generate Makefile
cd "${srcdir}"/build
qmake-qt5 src \
QMAKE_CFLAGS="${CFLAGS}" \
QMAKE_CXXFLAGS="${CXXFLAGS}" \
CONFIG+=release \
CONFIG+=c++14
# Generate translations
lrelease-qt5 \
-compress \
-nounfinished \
-removeidentical \
src/MEGASync/MEGASync.pro
# Build package
make
}
package() {
# Install package
cd "${srcdir}"/build
make INSTALL_ROOT="${pkgdir}" install
# Install executable
mkdir -p "${pkgdir}"/usr/bin
cp MEGASync/megasync "${pkgdir}"/usr/bin
# Install license
mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
cp LICENCE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
# Remove empty files
rm -R "${pkgdir}"/usr/share/doc
}
The package runs perfectly, however I just want to check if namcap shows something, and I must be blind because I can't see what the error is.
My system (fully upgraded):
$ pacman -Q namcap python pyalpm
namcap 3.2.7-1
python 3.5.2-1
pyalpm 0.8-1
___
[1]: Yes, I'm aware that exist a couple of packages for this in the AUR.
Last edited by AbaddonOrmuz (2016-09-02 01:26:01)
Offline
I do not get that error on your PKGBUILD, using the same package versions.
Perhaps you have a corrupted install somehow?
EDIT: This is what I get for downloading the PKGBUILD from the link to save copy-pasting, it isn't the same PKGBUILD -- you edited it by then.
Last edited by eschwartz (2016-09-02 01:39:09)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Is namcap even supposed to show output in that format? It seems to be a traceback. It feels more of a namcap bug.
One thing you can try is to put all the dependencies on a single line, instead of splitting them over multiple lines.
Offline
There is a problem both in your PKGBUILD and in namcap.
The problem in your PKGBUILD is that you use the variable _pkgbase but you never define it.
The problem in namcap is that it chokes on this error in the most ungraceful way.
Fix your problem, report the other as a bug.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Thanks for the replies.
After checking line by line, character by character and with "pacman -Qi" I see I have a typo: "${_pkgbase}" instead of "${_pkgname}", the first one doesn't exist.
I didn't see it before, I need to pay more attention in things like this.
Thanks anyways.
*Edit
@Trilby Yeah, I need to sleep...
Last edited by AbaddonOrmuz (2016-09-02 01:25:42)
Offline