Install Packages in F37 without Dependencies?

Hi,

I’m trying to install Sway Window Manager in Fedora 37 but I noticed that, when typing sudo dnf install sway, xorg, x11 and xwayland are listed as dependencies.

Is there a way to install sway (and other programs) one by one without installing all of its dependencies?

Thanks and Happy Thanksgiving!

Hello Chris and welcome to ask :fedora:

There are 3 layers to graphics.
The DM which is the lowest layer and talks to the hardware.
The DE which provides the basic desktop enviroment and background and communicates with the DM…
The WM which manages the windows on top of the DE.

All those layers are involved in the packages you are asking about, and most would already be installed if you did a workstation install. I think the only way to not have them would be to do a server install or a minimal netinstall.

You cannot install a package and have it functional without also installing everything it depends upon to run which is the premise upon which dependencies are based.
Package A requires (depends upon) package B which depends upon package C. Thus before package A can be functional both package B & C must be installed.

The package management system (rpm, dnf, gnome software) is designed to prevent the scenario you are proposing.

Yes, you can in theory do what you ask about, but this could result in a very broken system.

1 Like
rpm -Uvh --nodeps sway

but don’t expect it to work without the dependencies

grab rpm from here: sway-1.7-4.fc37 | Build Info | koji

related sites: SIGs/Sway - Fedora Project Wiki and Group sway-sig - src.fedoraproject.org

1 Like

This is required for dmenu from the looks of it. See the spec here:

https://src.fedoraproject.org/rpms/sway/blob/rawhide/f/sway.spec#_61

I see that dmenu is a weak dependency though:

https://src.fedoraproject.org/rpms/sway/blob/rawhide/f/sway.spec#_43

So perhaps the first requires is not necessary in the spec, or it could also be a weak dependency too that allows users to not install it if they don’t want to. You’d have to speak to the package maintainer (via a bug report, for example) to get more specific answers on these dependencies.

2 Likes

Awesome @ankursinha! Does that mean that dmenu is the only thing that’s making the entire sway package require xorg, x11 , xserver and xwayland? If so, how would I go about installing sway without installing dmenu? (bemenu, wofi and tofi don’t require xwayland and x11 afaik).

Thanks a lot!

I’m not sure, but the spec would indicate so.

With the Fedora package, one cannot install without pulling in dmenu and all its dependencies. It’s part of the rpm metadata. One will have to rebuild the package after modifying the spec to remove this requirement. Speaking to the maintainers to ask them to make it a weak dep would be the way to go.

Technically, you could use rpm --nodeps ... but it isn’t suggested because that won’t pull in any dependencies.

1 Like

xorg-x11-server-Xwayland is a hard dependency of sway package (and xorg-x11-server-common is a dependency of xorg-x11-server-Xwayland), so you can’t avoid installing it, sway package requires it and you have to install it. dmenu is a weak dependency and you can avoid installing it with:

sudo dnf install --setopt install_weak_deps=false sway

Other weak deps of sway package:

(qt5-qtwayland if qt5-qtbase-gui)
(qt6-qtwayland if qt6-qtbase-gui)
desktop-backgrounds-compat
dmenu
findutils
foot
grim
mesa-dri-drivers
sway-systemd
swayidle
swaylock
2 Likes