Fix build failure: sync pacman database before makepkg #1

Merged
Copilot merged 2 commits from copilot/fix-build-issue-with-makedepends into master 2025-12-31 20:52:14 +00:00
Copilot commented 2025-12-31 20:45:19 +00:00 (Migrated from github.com)

Build fails because makepkg -s cannot install makedepends (gawk, sed) due to unsynchronized pacman database.

Changes

  • Full system update: Changed pacman -Sy to pacman -Syu to fully sync database before package installation
  • Pre-install makedepends: Added gawk and sed to base package list to prevent resolution failures
  • Split commands: Separated system update from package installation for clarity
# Before
pacman -Sy --noconfirm base-devel git gnupg parallel fakeroot

# After  
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel git gnupg parallel fakeroot gawk sed

The -s flag in makepkg still handles any additional runtime dependencies.

Original prompt

Problem

The build is failing because makepkg -s cannot install the required makedepends packages (gawk and sed). The error occurs at the makepkg step, resulting in no packages being built.

The logs show:

❌ No packages were built – aborting.

Root Cause

The pacman database is not fully synchronized before running makepkg -s, which prevents it from finding and installing the build dependencies like gawk and sed.

Solution

Update the .github/workflows/PKGBUILD2BAR.yml file to:

  1. Add a full system update with pacman -Syu --noconfirm to ensure the pacman database is fully synchronized
  2. Pre-install common makedepends (gawk and sed) along with base-devel to avoid any dependency resolution issues
  3. Keep the -s flag in makepkg to handle any additional dependencies

Specific Changes

In the "Build PKGBUILDs in Arch container" step, modify the section labeled # ---- 1️⃣ Install tools (around line 58-60) to:

# ---- 1️⃣ Install tools + sync database -------------------------------------------------
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel git gnupg parallel fakeroot gawk sed
source /etc/profile

This ensures:

  • The pacman database is fully updated (-Syu)
  • Common build dependencies are pre-installed
  • The -s flag in makepkg can still handle any additional dependencies

The rest of the workflow should remain unchanged.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Build fails because `makepkg -s` cannot install `makedepends` (`gawk`, `sed`) due to unsynchronized pacman database. ## Changes - **Full system update**: Changed `pacman -Sy` to `pacman -Syu` to fully sync database before package installation - **Pre-install makedepends**: Added `gawk` and `sed` to base package list to prevent resolution failures - **Split commands**: Separated system update from package installation for clarity ```yaml # Before pacman -Sy --noconfirm base-devel git gnupg parallel fakeroot # After pacman -Syu --noconfirm pacman -S --noconfirm base-devel git gnupg parallel fakeroot gawk sed ``` The `-s` flag in `makepkg` still handles any additional runtime dependencies. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > ## Problem > > The build is failing because `makepkg -s` cannot install the required `makedepends` packages (`gawk` and `sed`). The error occurs at the makepkg step, resulting in no packages being built. > > The logs show: > ``` > ❌ No packages were built – aborting. > ``` > > ## Root Cause > > The pacman database is not fully synchronized before running `makepkg -s`, which prevents it from finding and installing the build dependencies like `gawk` and `sed`. > > ## Solution > > Update the `.github/workflows/PKGBUILD2BAR.yml` file to: > > 1. Add a full system update with `pacman -Syu --noconfirm` to ensure the pacman database is fully synchronized > 2. Pre-install common makedepends (`gawk` and `sed`) along with base-devel to avoid any dependency resolution issues > 3. Keep the `-s` flag in makepkg to handle any additional dependencies > > ### Specific Changes > > In the "Build PKGBUILDs in Arch container" step, modify the section labeled `# ---- 1️⃣ Install tools` (around line 58-60) to: > > ```yaml > # ---- 1️⃣ Install tools + sync database ------------------------------------------------- > pacman -Syu --noconfirm > pacman -S --noconfirm base-devel git gnupg parallel fakeroot gawk sed > source /etc/profile > ``` > > This ensures: > - The pacman database is fully updated (`-Syu`) > - Common build dependencies are pre-installed > - The `-s` flag in makepkg can still handle any additional dependencies > > The rest of the workflow should remain unchanged. </details> <!-- START COPILOT CODING AGENT SUFFIX --> *This pull request was created from Copilot chat.* > <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
budRich (Migrated from github.com) reviewed 2025-12-31 20:45:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bud/BAR!1
No description provided.