https://blue-build.org/ logo
dnf packages not removed on my final image
# questions
b
I'm running into an issue where some of my package listed in the
remove
section of the dnf module are still in my final image. I suspect that it's because these packages (fuzzel, alacritty and waybar in my case) are installed as a dependency of another package listed in the
install
section. I wonder if there is a way to run the
remove
section after the
install
section as a workaround for this issue. Another way would be to track down where these packages come from. I couldn't with just the bluebuild action logs, but I strongly suspect it is shipped with the niri package, I would appreciate it if someone can guide me to track down these packages (I don't really know much about rpm packaging ...) I attached portion of my logs showing the packages that should be removed and when they are installed afterward.
Copy code
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 Removing packages:
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - htop
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.35 - firefox
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.36 - fuzzel
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: alacritty
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: waybar
[09:38:29 g.i/b/niri-nvidia:latest] => #65 25.54 No packages to remove for argument: fuzzel
Copy code
[09:38:33 g.i/b/niri-nvidia:latest] => #65 29.52  fuzzel                     x86_64 1.13.1-1.fc42                    updates                                             307.3 KiB
Thank you in advance for your help and all the effort you put in this project.
a
message has been deleted
l
are you sure you're on the latest update?
one way of doing it is to run
rpm-ostree update
, if it says "No upgrade available." then probably you'll need to reboot
if there's an update then let it do it's thing and reboot
g
Maybe this would be a good opportunity to add a way to exclude packages when installing.
Hmmm, there doesn't appear to be an arg for that with dnf
l
dnf -x
I saw it several times while looking at some containerfiles from ublue
g
Oh shit you're right
I was looking for
--exclude
or something
looks like there isn't a long arg for it, just
-x
l
g
Ok so yeah I think that would be something to include in the spec and the module
Nope I'm an idiot who can't read,
--exclude
does exist
Ok, I'll make an issue to add this feature
l
happens 🤷‍♀️
b
I was not when I read your message but I still have my unwanted packages in my image
It would be great, but would it not be kind of redundant to have a
remove
and
exclude
section ? Also, is there a particular reason for not running the
remove
after
install
?
g
You could also try
install-weak-deps: false
b
will try !
g
Remove happens first and will remove any packages that exist. The exclude would prevent the packages from even being installed
b
Is there a way to confirm my unwanted packages were installed because of
niri
being installed ? The only reference I found in the niri copr is in [niri.spec](https://download.copr.fedorainfracloud.org/results/yalter/niri/epel-10-aarch64/09554335-niri/niri.spec) :
Copy code
# Suggested utilities, bound in the default config
Recommends:     alacritty
Recommends:     fuzzel
Recommends:     swaylock
Recommends:     waybar
# Suggested utilities
Recommends:     swaybg
Recommends:     mako
Recommends:     swayidle
But since I don't know much about this file, I'm not sure what it implies.
I will try to create a PR implementing the exclude feature, a draft should be available in the end of the day
Indeed those packages are part of niri's weak dependencies
I think you can close [this](https://github.com/blue-build/modules/issues/460) @gmpinder (sorry for the ping)