Skip to content
Snippets Groups Projects
Open Look into replacing parsepkgbuild.sh with .SRCINFO
  • View options
  • Look into replacing parsepkgbuild.sh with .SRCINFO

  • View options
  • Open Issue created by Jelle van der Waa

    Parsing a PKGBUILD with bash might make sense, but for our repositories we have .SRCINFO available and python-srcinfo as library to read those files. Not running subprocess and doing extra legwork to make sense of a PKGBUILD would make namcap's code a lot simpler. (and maybe faster?).

    There is only one rule which relies on extravars which we can not support in when using .SRCINFO, as we don't source the PKGBUILD and export the exported vars. In theory this could be replaced with pkginfo.pkgbuild and trying to smartly parse the PKGBUILD. (strip all whitespace at the start of the line and check if it a variable declaration foo= which starts with an underscore with regex).

    There are some other rules which use pkginfo.pkgbuild and these just scan the whole PKGBUILD file. We can keep reading the PKGBUILD file, we just don't want to parse it with a bash script.

    Edited by Jelle van der Waa
    • Merge request
    • Branch

    Linked items 0

  • Link items together to show that they're related or that one is blocking others.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading