Eliminate use of cat and subshells in patching.
The previous code takes the first field of PKG_BUILD, using a space
as the delimiter. PKG_BUILD used to be generated using 'ls' at least
as of before commit ef8e871d3c1234d2c2a8c2f0d9b2ba822a2ec50e in 2013.
Today, PKG_BUILD is a set path, without spaces.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
In case two packages has dependency on each other unpacking fails because unpack script goes to loop and eats all the computer resources. With this change unpack fails on third pass.
Probably this functionality could be done better but atm I don't have better idea.
unpack recursive limit hit [package1, package2]
*********** FAILED COMMAND ***********
${SCRIPTS}/unpack "${p}" "${PARENT_PKG}"
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/unpack "${p}" "${PARENT_PKG}"
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/unpack "${PKG_NAME}" "${PARENT_PKG}"
**************************************
Instead of cluttering $BUILD we now have
- $BUILD/build sources and builds of packages
- $BUILD/install_pkg installed packages
- $BUILD/install_init installed packages for initramfs
The unpack folder will be a temporary (isolated) unpack folder for
pre_unpack() and unpack(), but by the time of post_unpack() the folder will
have been moved into the main ${BUILD} "public" folder.
This change ensures that PKG_BUILD always references the correct folder at all times.
Each time scripts/extract is called it sources config/options which is an
expensive operation.
We call scripts/extract 8 times for each possible tarball pattern, and for
7 of those 8 calls scripts/extract does nothing but source config/options
and then exit.
This change is more efficient, while functionally equivalent.
from
APPLY PATCH (common) /data/LibreELEC.tv/packages/audio/alsa-lib/patches/alsa-lib-USB_Soundblaster_HD.patch
to
APPLY PATCH (common) packages/audio/alsa-lib/patches/alsa-lib-USB_Soundblaster_HD.patch