From 25a4e9e0a7cfea5d3dadbe8d55d3e7d80d0d7dc5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 8 Nov 2025 15:29:40 -0600 Subject: fix(archsetup): correct invalid sudo syntax in yay installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed critical bug at line 336 that blocked all AUR package installations. Changed invalid 'sudo -u $username -D $build_dir' to proper 'cd $build_dir && sudo -u $username' pattern. Also updated TODO.org: - Marked yay bug task as DONE - Created "Resolved Tasks" section - Moved completed task to archive with resolution notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- TODO.org | 20 +++++++++++++++----- archsetup | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/TODO.org b/TODO.org index 244f1d8..205785d 100644 --- a/TODO.org +++ b/TODO.org @@ -119,11 +119,6 @@ The script handles edge cases gracefully, provides detailed error messages with *Why this is Method 1:* Can't build testing infrastructure or maintain packages if the script doesn't work. This is the foundation—everything else depends on reliable execution. -*** TODO [#A] Fix critical bug: typo in yay installation (archsetup:336) -BLOCKS all AUR installs - script cannot install any AUR packages until this is fixed -Line 336 has ~sudo -u "$username" -D "$build_dir"~ which is invalid - the -D flag doesn't exist for sudo in this context -Should be ~cd "$build_dir" && sudo -u "$username"~ or similar - *** TODO [#A] Fix: no dotfiles were set up on last run CRITICAL - system is unusable without dotfiles; all 50+ scripts and configs missing @@ -673,5 +668,20 @@ Package maintainers sometimes release broken packages to the AUR, especially whe - *Target:* Regular retrospective on adopted tools - did they actually reduce friction? - *Measure:* Post-install assessment: is the new tool better? Did it solve the problem? Worth the switching cost? - *Frequency:* Quarterly retrospective on tools adopted in past 3 months + +* Resolved Tasks + +Tasks that have been completed and closed. + +** Method 1: Achieve Fail-Proof Execution + +*** DONE [#A] Fix critical bug: typo in yay installation (archsetup:336) +CLOSED: [2025-11-08 Sat 15:28] +BLOCKS all AUR installs - script cannot install any AUR packages until this is fixed +Line 336 has ~sudo -u "$username" -D "$build_dir"~ which is invalid - the -D flag doesn't exist for sudo in this context +Should be ~cd "$build_dir" && sudo -u "$username"~ or similar + +*Resolution:* Fixed line 336 to use ~cd "$build_dir" && sudo -u "$username"~ pattern (same as line 341). Now properly changes directories before running git pull. Unblocks all AUR package installations. + * ArchSetup Inbox diff --git a/archsetup b/archsetup index 2cbd767..e8762ca 100755 --- a/archsetup +++ b/archsetup @@ -333,7 +333,7 @@ aur_installer () { display "task" "fetching source code for yay" if ! (sudo -u "$username" git clone --depth 1 "$yay_repo" "$build_dir" >> "$logfile" 2>&1); then error "error" "cloning source code for yay" - (sudo -u "$username" -D "$build_dir" git pull --force origin master >> "$logfile" 2>&1) || \ + (cd "$build_dir" && sudo -u "$username" git pull --force origin master >> "$logfile" 2>&1) || \ error "crash" "changing directories to $build_dir and pulling source code" "$?" fi -- cgit v1.2.3