From 984ec34f0ab73a8558ad417db3b1f9651029a46f Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Jul 2020 23:18:12 -0400 Subject: ob_get_binary_packages(): Factor out side effects As described in the documentation, it was only pure after being called once outside a subshell, but it was never actually called outside a subshell. So it rescanned the file system for binary packages every time. --- (limited to 'NEWS') diff --git a/NEWS b/NEWS index 162fafe..aa1f81c 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ Utilities: * Source package names are now prefixed with "src:" instead of "src-". pro-archman has supported this in its package name hashing since version 2.0.0. + * With ob_get_binary_packages() becoming always pure (see below), all + utilities now scan the file system for binary packages only once. libopkbuild: @@ -52,6 +54,10 @@ libopkbuild: correctly. * New functions ob_validate_section() and ob_qualify_package_name() have been added. + * ob_get_binary_packages() is now always pure (without side effects + that would preclude use in a subshell environment). Side effects + have been factored out into a new internal function called by + ob_init_package(). opkbuild version 4.1.4 ---------------------- -- cgit v0.9.1