Skip to content

Commit

Permalink
fix: dnf5-default-package-manager (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko authored Nov 9, 2024
1 parent c35818e commit a27bbc7
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Name: dnf5-default-package-manager
Version: 0
Release: 2%?dist
Release: 3%?dist
Summary: Package that sets dnf5 as the default package manager
License: MIT
URL: https://wiki.ultramarine-linux.org/en/usage/um40-dnf5/
Expand All @@ -15,6 +15,7 @@ This package contains post-install hooks that symlinks %_bindir/dnf
to the new dnf5 binary.

%prep
touch .placeholder

%build

Expand All @@ -28,9 +29,14 @@ if [ $1 -gt 1 ]; then
fi

%preun
rm %_bindir/{dnf,yum}
ln -s /usr/bin/dnf-3 /usr/bin/dnf
ln -s %_bindir/dnf-3 /usr/bin/yum
echo
echo "dnf5-default-package-manager will be uninstalled."
echo "If you want to revert the symlinks, run the following commands:"
echo "rm %_bindir/{dnf,yum}"
echo "ln -s /usr/bin/dnf-3 /usr/bin/dnf"
echo "ln -s %_bindir/dnf-3 /usr/bin/yum"
echo "For more information, visit: %url"
echo

%triggerin -- dnf
rm %_bindir/{dnf,yum}
Expand All @@ -41,3 +47,6 @@ ln -s %_bindir/dnf5 /usr/bin/yum
rm %_bindir/{dnf,yum}
ln -s %_bindir/dnf5 /usr/bin/dnf
ln -s %_bindir/dnf5 /usr/bin/yum

%files
%doc .placeholder

0 comments on commit a27bbc7

Please sign in to comment.