You are not logged in.
Hi,
so far I have been using aura as AUR helper, which has the useful feature of removing, at the end of the build process, what was installed as makedepends; I was looking into alternative helpers like yaourt and pacaur but I did not manage to find such a feature.
Have I missed something!? Any suggestion is welcome.
Thanks
Last edited by VDP76 (2014-02-02 17:29:15)
Offline
... && pacman -Rsn $(pacman -Qdtq)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@Trilby, so your suggestion is to remove all optional deps on the entire system?
@VDP76, I haven't seen an option like this in yaourt.
Offline
Thanks for the input, Trilby.
I already have those commands associated to an alias, I was hoping in a function included in the helpers.
@Scimmia: too bad...thanks!
Last edited by VDP76 (2014-02-02 17:48:41)
Offline
Make sure 'pacman -Qdtq' does return something.
Edit: Nwm, you only get an error:
$ sudo pacman -Rsn $(pacman -Qdtq)
error: no targets specified (use -h for help)
I used to use 'pacman -Qi $(pacman -Qqdt)' but it's a different kettle of fish ;-)
Sorry for the noise.
Last edited by karol (2014-02-02 17:48:16)
Offline
Don't most AUR helpers accept normal makepkg flags? Specifically, the -r, --rmdeps flag in this case?
Disclaimer: I use cower, so I don't actually know (or care) what " full service" AUR helpers do.
Offline
Make sure 'pacman -Qdtq' does return something.
Edit: Nwm, you only get an error:
$ sudo pacman -Rsn $(pacman -Qdtq) error: no targets specified (use -h for help)
Not always ..
$ sudo pacman -Rsn $(pacman -Qdtq)
[sudo] password for [REMOVED]:
checking dependencies...
:: git optionally requires subversion: git svn
:: libreoffice-common optionally requires unixodbc: adds ODBC database support
:: qt4 optionally requires unixodbc: ODBC driver
Packages (9): apr-1.5.0-1 apr-util-1.5.3-1 docbook-xml-4.5-5
docbook-xsl-1.78.1-1 serf-1.3.2-1 unixodbc-2.3.2-1
asciidoc-8.6.9-1 cmake-2.8.12.2-1 subversion-1.8.5-2
Total Removed Size: 78.44 MiB
:: Do you want to remove these packages? [Y/n]
Offline
I meant if 'pacman -Qdtq' returns nothing, you only get an error if you try running 'pacman -Rsn'. If you run 'pacman -Qi', you will get info about every package you have installed instead of info about just a few of them - not quite what's expected :-)
Offline
Don't most AUR helpers accept normal makepkg flags? Specifically, the -r, --rmdeps flag in this case?
pacaur uses cowar, but unfortunatly this did not work..
@Dunke, I think the difference between your output and karol's is that just in your case there was some package good to be removed...
@karol, yes, it is a bit of a lengthy output...
Offline
@Trilby, so your suggestion is to remove all optional deps on the entire system?
No, that doesn't remove any optional dependencies that I've opted for.
It only removes things that were pulled in implicitly as a dependency but are no longer needed.
Optional dependencies are not installed as a dependency of another package, they have to be explicitly installed if you want them (otherwise they wouldn't be called optional). And this command doesn't remove explicitly installed packages.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Optional dependencies are not installed as a dependency of another package, they have to be explicitly installed if you want them (otherwise they wouldn't be called optional). And this command doesn't remove explicitly installed packages.
Not true, just look at Dunke's output. Optional deps are not always marked as "explicitly installed". They could have been installed as a dep of another package or they could have been installed with the --asdep option.
Offline
If they were installed as a dependency of another package, then my prosposed command wouldn't remove them.
My proposed command would remove optional dependencies that I have not 'opted in' to - which I consider a good thing.
Last edited by Trilby (2014-02-02 22:43:33)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Again, look at Dunke's output, it's not nearly as simple as you're making it. Pacman doesn't handle optdeps very well right now and your proposed command would remove them in many cases as I already explained. Let me make it a bit more clear, if they were originally installed as a dep of another package, they will still be installed as a dep when the package is removed, even if you purposely left them behind when uninstalling said package. --asdep isn't that uncommon, either.
Offline
I see what you are saying - but I guess it's a difference of opinion: I'm *glad* it works the way it currently does. Some packages have a lot of optional dependencies that I have no interest in. As they are optional, I'm glad they don't get pulled in when I install those packages. On the same logic, I'm glad they are prevented from being removed by those packages. Optional, to me, means opt in - and if I don't opt in by installing those optional packages, I don't want them kept on my system when nothing else needs them.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I agree with Trilby and I like pacman's behaviour with optional dependencies. If you installed X with Y as a dependency and you then want to keep Y on your system no matter what happens to X, you can use this command :
pacman -D --asexplicit Y
and, when you remove X (with -Rs), pacman will behave accordingly with what you really want to be on your system.
Last edited by jpgg (2014-02-03 01:58:07)
Offline
This feature isn't included in pacaur, because:
1/ pacaur aims to stay very close to pacman/makepkg - and neither of them have a flag for this feature,
2/ pacaur targets (lazy) advanced users, so you're supposed to take care of your pacdiff / pacman -Qdt stuff yourself,
3/ an automatic removal of -Qdt packages is counter-productive imho, since some are useful and you want them to stay there.
This said, adding a warning about -Qdt package after an installation might be useful. I'll think about it.
Last edited by Spyhawk (2014-02-03 11:02:55)
Offline
All right, that's fair enough!
Thank you for the prompt reply (on the AUR page too).
Cheers
Offline