Skip to content

Instantly share code, notes, and snippets.

@NigelGreenway
Last active August 23, 2025 16:34
Show Gist options
  • Select an option

  • Save NigelGreenway/8e796f77b3ee3cfa01a83e963f1a546d to your computer and use it in GitHub Desktop.

Select an option

Save NigelGreenway/8e796f77b3ee3cfa01a83e963f1a546d to your computer and use it in GitHub Desktop.
#!/bin/bash
# fix-eopkg - A simple way to fix broken Solus eopkg packages
# Usage: ./fix-eopkg
read -p "Enter the package name (e.g., kf6-kcoreaddons-6.15.0-23): " PACKAGE_NAME
read -p "Enter the CDN URL (e.g., https://cdn.getsol.us/repo/shannon/k/kf6-kcoreaddons/kf6-kcoreaddons-6.15.0-2): " CDN
FILENAME=$(basename $CDN)
if [[ "$FILENAME" == *x86_64* ]]; then
PACKAGE="${FILENAME%-1-x86_64*}"
fi
mkdir -p tmp
cd tmp
wget $CDN
uneopkg $FILENAME
sudo mkdir /var/lib/eopkg/package/$PACKAGE
sudo mv metadata.xml files.xml /var/lib/eopkg/package/$PACKAGE
cd ..
rm -rf ./tmp
echo "Rebuilding eopkg database..."
sudo eopkg rdb -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment