You are not logged in.

#1 2014-02-02 17:29:01

VDP76
Member
Registered: 2013-04-21
Posts: 23

AUR helpers, removing makedepends

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

#2 2014-02-02 17:38:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: AUR helpers, removing makedepends

... && pacman -Rsn $(pacman -Qdtq)

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2014-02-02 17:44:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: AUR helpers, removing makedepends

@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

#4 2014-02-02 17:44:46

VDP76
Member
Registered: 2013-04-21
Posts: 23

Re: AUR helpers, removing makedepends

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

#5 2014-02-02 17:44:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: AUR helpers, removing makedepends

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

#6 2014-02-02 18:02:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: AUR helpers, removing makedepends

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

#7 2014-02-02 18:04:51

Dunke
Member
From: Riga, Latvia
Registered: 2014-02-02
Posts: 5

Re: AUR helpers, removing makedepends

karol wrote:

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

#8 2014-02-02 18:08:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: AUR helpers, removing makedepends

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

#9 2014-02-02 18:37:22

VDP76
Member
Registered: 2013-04-21
Posts: 23

Re: AUR helpers, removing makedepends

tomk wrote:

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.. hmm

@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

#10 2014-02-02 19:52:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: AUR helpers, removing makedepends

Scimmia wrote:

@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

#11 2014-02-02 22:29:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: AUR helpers, removing makedepends

Trilby wrote:

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

#12 2014-02-02 22:42:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: AUR helpers, removing makedepends

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

#13 2014-02-02 23:23:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: AUR helpers, removing makedepends

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

#14 2014-02-03 00:15:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: AUR helpers, removing makedepends

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

#15 2014-02-03 01:56:24

jpgg
Member
Registered: 2014-01-15
Posts: 43

Re: AUR helpers, removing makedepends

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

#16 2014-02-03 10:50:59

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: AUR helpers, removing makedepends

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

#17 2014-02-03 11:17:59

VDP76
Member
Registered: 2013-04-21
Posts: 23

Re: AUR helpers, removing makedepends

All right, that's fair enough!
Thank you for the prompt reply (on the AUR page too).

Cheers

Offline

Board footer

Powered by FluxBB