Skip to content
Snippets Groups Projects

sodepends: fix listing binaries, check libdepends, libprovides

Merged Balló György requested to merge bgyorgy/namcap:fix-sodepends-list into master
1 unresolved thread
  • This fixes the problem when a library is needed by multiple binaries in a package, and only the last binary was listed, because the previous list was overridden on every scan.
  • Check the sonames provided by the package and compare it with provides=() specified in PKGBUILD. Warn if provided but not specified, error if specified but not provided.
  • Check the sonames required by the package and compare it with depends=() specified in PKGBUILD. Warn if a package provides a requred soname but not specified, and if a specified soname is not needed.
Edited by Balló György

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
173 194 ))
174 195 self.infos.append(("link-level-dependence %s in %s", (pkg, str(files))))
175 196
197 # Check for soname dependencies, filter out internal dependencies
198 libdependlist = dict(filter(lambda elem: elem[1] != pkginfo["name"], libdependlist.items()))
199
200 for i in libdependlist:
201 if i in pkginfo["depends"]:
202 self.infos.append(("libdepends-detected-satisfied %s %s (%s)", (i, libdependlist[i], str(list(libdepends[i])))))
  • This code is looking a little like LISP, and since the same deeply tested construction is use 5 times here it seems like a local function might have been in order, but my Python foo isn't up to suggesting something robust and idiomatic. If nothing comes to mind based on this suggestion feel free to dismiss...

  • Please register or sign in to reply
  • This looks good to me with a minor gripe about code style. Since I don't have a concrete suggestion I'm happy to proceed if nobody chimes in with something better.

  • Caleb Maclennan approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading