Fix package lists that only resolved via the Omarchy repository
This commit is contained in:
Executable
+54
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# blob:summary=Verify every package list entry resolves, ignoring extra repositories
|
||||||
|
# blob:hidden=true
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
bin_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
repo_dir="$(dirname "$bin_dir")"
|
||||||
|
official_list="$repo_dir/packages/blob.packages"
|
||||||
|
aur_list="$repo_dir/packages/blob-aur.packages"
|
||||||
|
|
||||||
|
failures=0
|
||||||
|
|
||||||
|
entries() {
|
||||||
|
grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$1" 2>/dev/null || true
|
||||||
|
}
|
||||||
|
|
||||||
|
# pacman -Si and yay -Si both search every configured repository, so a package
|
||||||
|
# that exists only in a third-party repo passes them and then fails on a machine
|
||||||
|
# that does not have that repo. These checks name the repositories explicitly.
|
||||||
|
official_names="$(pacman -Sl core extra multilib 2>/dev/null | awk '{print $2}' | sort -u)"
|
||||||
|
|
||||||
|
echo "Checking $official_list against core, extra, multilib"
|
||||||
|
for entry in $(entries "$official_list"); do
|
||||||
|
name=${entry%%|*}
|
||||||
|
if ! printf '%s\n' "$official_names" | grep -qx "$name"; then
|
||||||
|
echo " NOT IN OFFICIAL REPOS: $name"
|
||||||
|
failures=$((failures + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Checking $aur_list against the AUR"
|
||||||
|
for entry in $(entries "$aur_list"); do
|
||||||
|
name=${entry%%|*}
|
||||||
|
if printf '%s\n' "$official_names" | grep -qx "$name"; then
|
||||||
|
echo " IN OFFICIAL REPOS, MOVE IT: $name"
|
||||||
|
failures=$((failures + 1))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if ! yay -Ssa "$name" 2>/dev/null | grep -qE "^aur/$name "; then
|
||||||
|
echo " NOT IN AUR: $name"
|
||||||
|
failures=$((failures + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
if (( failures == 0 )); then
|
||||||
|
echo "All entries resolve."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$failures problem(s)."
|
||||||
|
exit 1
|
||||||
+7
-1
@@ -348,6 +348,12 @@ of the `blob` listing.
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `blob-osd` | Show the Blob Quickshell on-screen display | [-i\|--icon <icon>] [-m\|--message <text>] [-p\|--progress <0-100>] [-d\|--duration <ms>] |
|
| `blob-osd` | Show the Blob Quickshell on-screen display | [-i\|--icon <icon>] [-m\|--message <text>] [-p\|--progress <0-100>] [-d\|--duration <ms>] |
|
||||||
|
|
||||||
|
## packages
|
||||||
|
|
||||||
|
| Command | Does | Arguments |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `blob-packages-check` | Verify every package list entry resolves, ignoring extra repositories (hidden) | - |
|
||||||
|
|
||||||
## pkg
|
## pkg
|
||||||
|
|
||||||
| Command | Does | Arguments |
|
| Command | Does | Arguments |
|
||||||
@@ -622,4 +628,4 @@ of the `blob` listing.
|
|||||||
|
|
||||||
## Totals
|
## Totals
|
||||||
|
|
||||||
293 commands.
|
294 commands.
|
||||||
|
|||||||
+26
-2
@@ -69,14 +69,38 @@ Two are worth knowing about:
|
|||||||
`install.sh` installs what is missing before it writes any config:
|
`install.sh` installs what is missing before it writes any config:
|
||||||
|
|
||||||
```
|
```
|
||||||
packages/blob.packages 117 packages from core, extra, multilib
|
packages/blob.packages 119 packages from core, extra, multilib
|
||||||
packages/blob-aur.packages 11 packages with no official equivalent
|
packages/blob-aur.packages 10 packages with no official equivalent
|
||||||
```
|
```
|
||||||
|
|
||||||
Only missing packages are touched, through `pacman -S --needed` and
|
Only missing packages are touched, through `pacman -S --needed` and
|
||||||
`yay -S --needed`. `./install.sh --check` lists what it would install without
|
`yay -S --needed`. `./install.sh --check` lists what it would install without
|
||||||
installing anything, and `--skip-packages` does the directories and config only.
|
installing anything, and `--skip-packages` does the directories and config only.
|
||||||
|
|
||||||
|
### Validating the lists
|
||||||
|
|
||||||
|
```
|
||||||
|
blob-packages-check
|
||||||
|
```
|
||||||
|
|
||||||
|
`pacman -Si` and `yay -Si` both search *every* configured repository, so a
|
||||||
|
package that exists only in a third-party repo passes them and then fails on a
|
||||||
|
machine without that repo. `blob-packages-check` names the repositories
|
||||||
|
explicitly instead: official entries must be in core, extra or multilib, and AUR
|
||||||
|
entries must have an exact `aur/` match and must not be in an official repo.
|
||||||
|
|
||||||
|
Run it after editing either list. It caught `localsend` and `tzupdate` sitting in
|
||||||
|
the official list when they only exist in the Omarchy repository, and `awww`,
|
||||||
|
`lazydocker` and `woff2-font-awesome` sitting in the AUR list when they are in
|
||||||
|
official `extra`.
|
||||||
|
|
||||||
|
### Bootstrapping an AUR helper
|
||||||
|
|
||||||
|
A fresh Arch install has no AUR helper, and `yay` is not in the official
|
||||||
|
repositories. `install.sh` builds `yay-bin` from the AUR once with `makepkg`
|
||||||
|
before installing anything from the AUR list, which is why `base-devel` and
|
||||||
|
`git` are in the official list.
|
||||||
|
|
||||||
An entry may be written `wanted|already-fine`, which asks for the first name but
|
An entry may be written `wanted|already-fine`, which asks for the first name but
|
||||||
accepts either as satisfying the requirement. That is how
|
accepts either as satisfying the requirement. That is how
|
||||||
`hyprland-preview-share-picker-git` avoids conflicting with the non-git build
|
`hyprland-preview-share-picker-git` avoids conflicting with the non-git build
|
||||||
|
|||||||
+28
-3
@@ -137,15 +137,40 @@ install_packages() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if (( ${#aur_missing[@]} )); then
|
if (( ${#aur_missing[@]} )); then
|
||||||
if ! command -v yay &>/dev/null; then
|
ensure_aur_helper || {
|
||||||
say "WARN yay is not installed; skipping ${#aur_missing[@]} AUR package(s)"
|
say "WARN no AUR helper; skipping ${#aur_missing[@]} AUR package(s): ${aur_missing[*]}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
}
|
||||||
say "install ${#aur_missing[@]} AUR package(s)"
|
say "install ${#aur_missing[@]} AUR package(s)"
|
||||||
yay -S --needed --noconfirm "${aur_missing[@]}"
|
yay -S --needed --noconfirm "${aur_missing[@]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# A fresh Arch install has no AUR helper, and yay is not in the official
|
||||||
|
# repositories, so it is built from the AUR once with makepkg. Everything after
|
||||||
|
# this point can then use yay normally.
|
||||||
|
ensure_aur_helper() {
|
||||||
|
command -v yay &>/dev/null && return 0
|
||||||
|
|
||||||
|
say "bootstrap yay from the AUR"
|
||||||
|
sudo pacman -S --needed --noconfirm base-devel git
|
||||||
|
|
||||||
|
local build_dir
|
||||||
|
build_dir="$(mktemp -d)"
|
||||||
|
if ! git clone --depth 1 https://aur.archlinux.org/yay-bin.git "$build_dir/yay-bin"; then
|
||||||
|
rm -rf "$build_dir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
( cd "$build_dir/yay-bin" && makepkg -si --noconfirm ) || {
|
||||||
|
rm -rf "$build_dir"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -rf "$build_dir"
|
||||||
|
command -v yay &>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
blob_sudo_keepalive() {
|
blob_sudo_keepalive() {
|
||||||
sudo -v 2>/dev/null || true
|
sudo -v 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
#
|
#
|
||||||
# These have no official-repo equivalent. See docs/packages.md.
|
# These have no official-repo equivalent. See docs/packages.md.
|
||||||
|
|
||||||
# Wallpaper daemon used by blob-wallpaper-set and blob-theme-menu
|
|
||||||
awww
|
|
||||||
|
|
||||||
# Palette extraction behind blob-wallpaper-set
|
# Palette extraction behind blob-wallpaper-set
|
||||||
python-pywal
|
python-pywal
|
||||||
|
|
||||||
@@ -20,10 +17,12 @@ aether
|
|||||||
|
|
||||||
# Fonts and icons with no official build
|
# Fonts and icons with no official build
|
||||||
ttf-ia-writer
|
ttf-ia-writer
|
||||||
woff2-font-awesome
|
|
||||||
yaru-icon-theme
|
yaru-icon-theme
|
||||||
|
|
||||||
# Tooling
|
# Tooling
|
||||||
mise-bin
|
mise-bin
|
||||||
ufw-docker
|
ufw-docker
|
||||||
lazydocker
|
|
||||||
|
# Only in the Omarchy repository as binaries; these are the AUR sources
|
||||||
|
tzupdate
|
||||||
|
localsend
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ zram-generator
|
|||||||
# System utilities
|
# System utilities
|
||||||
plocate
|
plocate
|
||||||
man-db
|
man-db
|
||||||
tzupdate
|
|
||||||
expac
|
expac
|
||||||
pacman-contrib
|
pacman-contrib
|
||||||
|
|
||||||
@@ -99,6 +98,7 @@ noto-fonts
|
|||||||
noto-fonts-cjk
|
noto-fonts-cjk
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
fontconfig
|
fontconfig
|
||||||
|
woff2-font-awesome
|
||||||
gnome-themes-extra
|
gnome-themes-extra
|
||||||
|
|
||||||
# Image and video handling
|
# Image and video handling
|
||||||
@@ -107,6 +107,9 @@ libvips
|
|||||||
webp-pixbuf-loader
|
webp-pixbuf-loader
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
awww
|
||||||
|
|
||||||
# Capture
|
# Capture
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
@@ -133,6 +136,10 @@ neovim
|
|||||||
# Browser for web apps
|
# Browser for web apps
|
||||||
chromium
|
chromium
|
||||||
|
|
||||||
|
# Build tools, needed to bootstrap an AUR helper
|
||||||
|
base-devel
|
||||||
|
git
|
||||||
|
|
||||||
# Command line
|
# Command line
|
||||||
bat
|
bat
|
||||||
eza
|
eza
|
||||||
@@ -142,7 +149,6 @@ fzf
|
|||||||
zoxide
|
zoxide
|
||||||
jq
|
jq
|
||||||
starship
|
starship
|
||||||
git
|
|
||||||
lazygit
|
lazygit
|
||||||
btop
|
btop
|
||||||
fastfetch
|
fastfetch
|
||||||
@@ -161,6 +167,4 @@ python-gobject
|
|||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
docker-buildx
|
docker-buildx
|
||||||
|
lazydocker
|
||||||
# Sharing
|
|
||||||
localsend
|
|
||||||
|
|||||||
Reference in New Issue
Block a user