diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 15:36:21 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 15:36:21 -0500 |
commit | 37eec3ff31c4a709fcd8e21dbf4e53624f0fc2f1 (patch) | |
tree | 0699a5722e66bb342879c94958769412c9ce8fd0 /commitpkg.in | |
parent | 914cf4f45d3dfc3a566e77397a0ef8ed97ad41cc (diff) |
makechrootpkg: Have functions be more function-y.
Rather than them simply being named blocks of code with braces around
them.
That is: have them take things via arguments rather than global
variables.
Specific notes:
- download_sources:
Observation: if $SUDO_USER is set, then src_owner=$SUDO_USER.
So (for clarity), rather than checking if $SUDO_USER is set, check
if $src_owner is different than $USER.
This reduces how much we have to worry about global state.
- install_packages:
1. Receive the list of packages as arguments, rather than a global
variable.
2. Make the caller responsible for looking at PKGBUILD. From the
name and arguments, one would never expect it to look at PKGBUILD.
- create_chroot->sync_chroot:
I pulled the `if [[ ! -d $copydir ]] || $clean_first;` check out; it is
now the caller's responsibility to use that check when deciding if to
call sync_chroot.
Diffstat (limited to 'commitpkg.in')
0 files changed, 0 insertions, 0 deletions