diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-02-13 02:23:51 -0500 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2019-08-09 19:41:51 +0200 |
commit | 46d614d91a90a60839280060f736dc3be8445502 (patch) | |
tree | a36f73472e6e56c0ee689616535aad22bc174563 /archbuild.in | |
parent | df0d6b867b289ed98c4b9e7ced817dee155feb4f (diff) | |
download | devtools32-46d614d91a90a60839280060f736dc3be8445502.tar.xz |
Revert "makechrootpkg: Have functions be more function-y."
This reverts (the bulk of) commit 2fd5931a8c67289a8a4acd327b3ce99a5d64c8c7.
Reducing globals makes little sense in in a oneshot bash script, but
reduces code clarity and in fact resulted in bugs because even the
commit author couldn't keep track of the script state.
An exit was changed to a return, even though that made no sense outside
of a function, and has been duly returned to being an exit. This was
never tested and later papered over by wrapping the entire script in a
main() function and then calling the function for hysterical raisins.
The functiony nature of sync_chroot/delete_chroot is preserved, as those
functions demonstrate meaningfully standalone functionality -- who
knows? we may want to reuse this. Everything else is tightly bound to
the internal logic of makechrootpkg.
Completely separate functionality that was silently implemented in the
original commit is also preserved:
- declare a couple of variables as locals
- move the abort-on-no-PKGBUILD outside the install_packages function
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'archbuild.in')
0 files changed, 0 insertions, 0 deletions