archlinux, and therefore pacman, isn't meant to have multiple versions. The idea is that all packages are always kept up to date with upstream releases.
In case where there are multiple maintained versions with meaningful differences there are just multiple packages. Like python2 and python (which for my taste should really be called python3).
There's also gcc5 because of CUDA I think, but there isn't any helper. If you want to use it, you have to export CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 or so and build systems will usually look at those variables.
tl;dr: There isn't really a mechanism. Sometimes there are legacy packages for compatibility reasons in the repository but it depends how you use it. Other than that you are expected to manage stuff yourself and use environment variables. Like JAVA_HOME for java, LD_LIBRARY_PATH, PATH, etc. The alternative is using isolated enviroments, possibly with their own distribution as a basis. chroot, systemd-nspawn, docker, or even VMs.
Better output from pacman when updated packages cause other packages to be installed or uninstalled or even cause conflicts.
It's mostly fine, but if you have for example the [mesa-git] repository enabled, compiled your own version of mesa and are testing another xorg build then pacman updates can easily require surprising replacements or downgrades. Then you have to use pacman --debug and read a long list of packages to find out why exactly it wants to do something.
I wish for an option like --showreasons that would display the reasons why something is happening like a stack:
----
X 2 is upgraded to version 3
Y 2 is upgraded to version 3 because X version 3 requires Y version >=3
Z 5 will be newly installed because Y 3 depends on Z
----
I gave it a try and it seems like yay is finally a good replacement. Especially yaourt -G hasn't been really working lately for repo packages/ABS, but yay has even that. Thanks for the tip.
For instance having a YouTube video already playing and then trying to play music in Audacious, the latter returns:
ALSA error: snd_pcm_open failed: Device or resource busy.
Pulseaudio will take exclusive access of the sound card device via alsa. Other applications that try to use alsa directly will not be able to output sound.
But pulseaudio does support alsa applications via a plugin. However, you need to have an alsa configuration that points alsa applications to pulseaudio by default. pulseaudio-alsa should be installed, but if it is not, install it. It contains a simple /etc/asound.conf that should redirect all applications that use non-exclusive alsa access to pulseaudio. If you have a user specific alsa config file like ~/.asoundrc in your home directory, just rename it to something else to remove it and back it up.
If you want to make sure applications are actually using pulseaudio, you can install pavucontrol. Most desktop volume controls should support most of the same features of pavucontrol, but it's just one single standalone application that's often useful. If you play a youtube video in your browser, you should see a stream that's created for it in the first tab ("Playback").
If everything works like this, then that still leaves applications that want to grab exclusive access of the sound card via alsa. By now it should be possible for almost all such applications to behave in a more sane way.
I just checked, in audacious in the settings in the audio tab you can choose pulsaudio. Choosing the alsa output plugin and in its setting a default sound card should also work and automatically redirect it to pulseaudio's alsa plugin - you'll see in pavucontrol that the stream will be called something like ALSA plug-in [audacious]: ALSA Playback. What will not work is choosing one of the sound cards that start with hw:. Those are the ones that alsa exposes for exclusive access, which you can't use while pulseaudio is running.
If you really need, there is a tool called pasuspender - for example if you run pasuspender audacious, pulseaudio will block all streams and release the audio device until the application started with it quits, grabs the audio device and then resumes playback.
Overall pulseaudio should be pretty painless nowadays and it does have its useful features.
archlinux, and therefore pacman, isn't meant to have multiple versions. The idea is that all packages are always kept up to date with upstream releases.
In case where there are multiple maintained versions with meaningful differences there are just multiple packages. Like python2 and python (which for my taste should really be called python3).
Or jdk7-openjdk and jdk8-openjdk. For the default java version archlinux has its own small tool: https://wiki.archlinux.org/index.php/Java#Switching_between_JVM.
There's also gcc5 because of CUDA I think, but there isn't any helper. If you want to use it, you have to export CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 or so and build systems will usually look at those variables.
tl;dr: There isn't really a mechanism. Sometimes there are legacy packages for compatibility reasons in the repository but it depends how you use it. Other than that you are expected to manage stuff yourself and use environment variables. Like JAVA_HOME for java, LD_LIBRARY_PATH, PATH, etc. The alternative is using isolated enviroments, possibly with their own distribution as a basis. chroot, systemd-nspawn, docker, or even VMs.
Better output from pacman when updated packages cause other packages to be installed or uninstalled or even cause conflicts.
It's mostly fine, but if you have for example the [mesa-git] repository enabled, compiled your own version of mesa and are testing another xorg build then pacman updates can easily require surprising replacements or downgrades. Then you have to use
pacman --debugand read a long list of packages to find out why exactly it wants to do something.I wish for an option like
--showreasonsthat would display the reasons why something is happening like a stack:or something like that
You mean
yaourt -S yay? :)I gave it a try and it seems like yay is finally a good replacement. Especially
yaourt -Ghasn't been really working lately for repo packages/ABS, but yay has even that. Thanks for the tip.Pulseaudio will take exclusive access of the sound card device via alsa. Other applications that try to use alsa directly will not be able to output sound.
But pulseaudio does support alsa applications via a plugin. However, you need to have an alsa configuration that points alsa applications to pulseaudio by default.
pulseaudio-alsashould be installed, but if it is not, install it. It contains a simple/etc/asound.confthat should redirect all applications that use non-exclusive alsa access to pulseaudio. If you have a user specific alsa config file like~/.asoundrcin your home directory, just rename it to something else to remove it and back it up.If you want to make sure applications are actually using pulseaudio, you can install pavucontrol. Most desktop volume controls should support most of the same features of pavucontrol, but it's just one single standalone application that's often useful. If you play a youtube video in your browser, you should see a stream that's created for it in the first tab ("Playback").
If everything works like this, then that still leaves applications that want to grab exclusive access of the sound card via alsa. By now it should be possible for almost all such applications to behave in a more sane way.
I just checked, in audacious in the settings in the audio tab you can choose pulsaudio. Choosing the alsa output plugin and in its setting a default sound card should also work and automatically redirect it to pulseaudio's alsa plugin - you'll see in pavucontrol that the stream will be called something like
ALSA plug-in [audacious]: ALSA Playback. What will not work is choosing one of the sound cards that start withhw:. Those are the ones that alsa exposes for exclusive access, which you can't use while pulseaudio is running.If you really need, there is a tool called pasuspender - for example if you run
pasuspender audacious, pulseaudio will block all streams and release the audio device until the application started with it quits, grabs the audio device and then resumes playback.Overall pulseaudio should be pretty painless nowadays and it does have its useful features.
Graphics are complicated. The developers have to be aware of so many subtle edge cases...
I remember this bug where the chromium gpu acceleration looked like https://bugs.freedesktop.org/attachment.cgi?id=92854 and https://bugs.freedesktop.org/attachment.cgi?id=92865