Solved Upgrade MPV Port with Custom Option

Hi
I wanted to add PULSE support in mpv, so I installed it from ports and enabled PULSE option during 'make config'. Now when I run the command (pkg upgrade), the system is asking to replace mpv from (0.32.0 to 0.32.0_5.1) and it also show (Options changed). Please check attached screenshot. So, my question is that if I continue with upgrade (by pkg upgrade) then would it again remove that PULSE support?
Thanks
 

Attachments

  • mpv.png
    mpv.png
    131.4 KB · Views: 130
So, my question is that if I continue with upgrade (by pkg upgrade) then would it again remove that PULSE support?
If you normally use pkg(8) to install software and only applied ports for multimedia/mpv, the answer is yes it would reinstall it with the default options. One solution would be to lock mpv and upgrade it manually via ports
Code:
# pkg lock mpv
So pkg upgrade will ignore mpv.
Another solution is to use ports-mgmt/poudriere or ports-mgmt/synth to build your own pkg repo. But this seems excessive if you dont need further customization and have only one device running FreeBSD.
 
If you normally use pkg(8) to install software and only applied ports for multimedia/mpv, the answer is yes it would reinstall it with the default options. One solution would be to lock mpv and upgrade it manually via ports
Code:
# pkg lock mpv

So pkg upgrade will ignore mpv.
Another solution is to use ports-mgmt/poudriere or ports-mgmt/synth to build your own pkg repo. But this seems excessive if you dont need further customization and have only one device running FreeBSD.

Thanks, that worked. However, it raises two more questions :-)
1. Wouldn't locking mpv cause any problem with associated libraries and other dependencies?
2. How can I upgrade mpv from ports?
 
1. Wouldn't locking mpv cause any problem with associated libraries and other dependencies?
It depends. You can run into troubles or not. Difficult to say. I would recommend using the LATEST pkg repository.
I did the same with emulators/virtualbox-ose for a while to get sound working for guests and didnt spot any problems. Now Im using ports-mgmt/poudriere for ~ 1.5 years cause I need more customization and have two machines using the same repo. But here is a nice guide by ShelLuser Thread 62126.

2. How can I upgrade mpv from ports?
I used ports-mgmt/portmaster. You can configure it to use binary packages for dependencies. Than simply update your ports-tree, unlock and upgrade mpv.
Code:
# portsnap fetch update
# pkg unlock mpv
# portmaster multimedia/mpv
# pkg lock mpv
 
FreeBSD has 2 pkg branches. One is quarterly which is also the default and gets updates every quarter or so. The other is latest which is patched every week or two. To use latest package repository create a file /usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: {
    enabled: no
}

FreeBSD-latest: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
    mirror_type= "srv",
    signature_type= "fingerprints",
    fingerprints= "/usr/share/keys/pkg",
    enabled: yes
}
Then upgrade all your packages
Code:
# pkg upgrade -f
 
Don't do it like that.

Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
That's all.
Do you mean that instead of using "FreeBSD-latest" and all other options like "mirror", "signature", "fingerprint" etc. I should use only that (one) line that you've mentioned?
 
Correct. It simply overrules the standard URL from the pre-defined configuration from /etc/pkg/FreeBSD.conf (don't edit that file).
 
Back
Top