linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit bc100104f5f298d97b219c4ffae80a02982e10b7 parent e6d746cd7aecc1fe7e2f6fd086746a8a0d4ea714 Author: Jul <jul@9o.is> Date: Sat, 8 Nov 2025 13:18:36 -0500 remove ninja_buffer_fetch Diffstat:
| M | ninja/functions.sh | | | 122 | ++++++++++++++++++++++++++++++++++--------------------------------------------- |
1 file changed, 53 insertions(+), 69 deletions(-)
diff --git a/ninja/functions.sh b/ninja/functions.sh @@ -253,7 +253,59 @@ pkg() { } fetch() { - _ninja_buffer_fetch="$*" + _fetchdir=$outdir/_fetch + + case $1 in + git) + fetch_git $_fetchdir/fetched + ;; + curl) + _url=$2 + _sha256=$3 + shift 3 + _srcs=$* + _name=${_url##*/} + + fetch_curl $_fetchdir/$_name + bind url $_url + + sha256sum $_fetchdir/checked $_fetchdir/$_name + bind sha256 $_sha256 + + case $_name in + *.tar.gz|*.tgz) + _archive=${_name%.t*gz}.tar + _tool=gzip + _extract_rule=extract_decompress + ;; + *.tar.xz) + _archive=${_name%.xz} + _tool=xz + _extract_rule=extract_decompress + ;; + *.tar.bz2) + _archive=${_name%.bz2} + _tool=bzip2 + _extract_rule=extract_decompress + ;; + *) + _archive=$_name + _extract_rule=extract + ;; + esac + + $_extract_rule $_fetchdir/fetched $_fetchdir/$_name '|' $hostdir/pax $_fetchdir/checked ${_tool_dep-} + bind tool $_tool + bind srcs $_srcs + + if ! grep -qE "^$_ninja_gendir/repo$" "$_ninja_basedir"/.git/info/exclude; then + printf "%s/repo\n" "$_ninja_gendir" >> "$_ninja_basedir"/.git/info/exclude + fi + ;; + *) + error unknown fetch method $1 + ;; + esac } subninja() { @@ -364,7 +416,6 @@ _ninja_initglobals() { _ninja_buffer_subgen= _ninja_buffer_objs= - _ninja_buffer_fetch= _ninja_buffer_fspec= _ninja_buffer_fspec_files= _ninja_template= @@ -553,72 +604,6 @@ _ninja_flush_subninjas() { fi } -_ninja_flush_fetch() { - _fetchdir=$outdir/_fetch - - if [ ${_ninja_subninja-} ] || [ $_ninja_type = root ]; then - return - fi - - if [ ! "$_ninja_buffer_fetch" ]; then - touch $_fetchdir/fetched - return - fi - - set -- $_ninja_buffer_fetch - - case $1 in - git) - fetch_git $_fetchdir/fetched - ;; - curl) - shift - _url=$1; shift - _sha256=$1; shift - _srcs=$* - _name=${_url##*/} - - fetch_curl $_fetchdir/$_name - bind url $_url - sha256sum $_fetchdir/checked $_fetchdir/$_name - bind sha256 $_sha256 - - case $_name in - *.tar.gz|*.tgz) - _archive=${_name%.t*gz}.tar - _tool=gzip - _extract_rule=extract_decompress - ;; - *.tar.xz) - _archive=${_name%.xz} - _tool=xz - _extract_rule=extract_decompress - ;; - *.tar.bz2) - _archive=${_name%.bz2} - _tool=bzip2 - _extract_rule=extract_decompress - ;; - *) - _archive=$_name - _extract_rule=extract - ;; - esac - - $_extract_rule $_fetchdir/fetched $_fetchdir/$_name '|' $hostdir/pax $_fetchdir/checked ${_tool_dep-} - bind tool $_tool - bind srcs $_srcs - - if ! grep -qE "^$_ninja_gendir/repo$" "$_ninja_basedir"/.git/info/exclude; then - printf "%s/repo\n" "$_ninja_gendir" >> "$_ninja_basedir"/.git/info/exclude - fi - ;; - *) - error unknown fetch method $1 - ;; - esac -} - _ninja_flush_build() { if [ ${_ninja_subninja-} ]; then return @@ -797,7 +782,6 @@ _ninja_flush() { _ninja_target deps _ninja_target headers _ninja_flush_fspec - _ninja_flush_fetch _ninja_flush_sync _ninja_flush_build _ninja_flush_configure