You are not logged in.

#1 2019-01-02 19:26:09

chrisjbillington
Member
Registered: 2018-11-26
Posts: 9

[SOLVED] Package with nothing depending on it installed as dependency

I was going through the output of

pacman -Qdtq

to see if I had any unneeded packages, and spotted a package I thought I had explicitly installed. Somehow this package has ended up marked as installed as a dependency. Here is what pacman has to say about that package:

$ pacman -Qi python2-pyside
Name            : python2-pyside
Version         : 1.2.4-9
Description     : Provides LGPL Qt bindings for Python and related tools for binding generation (Python 2
                  version)
Architecture    : x86_64
URL             : https://wiki.qt.io/PySide
Licenses        : LGPL
Groups          : None
Provides        : None
Depends On      : python2-shiboken  python-pyside-common
Optional Deps   : phonon-qt4: for PySide.phonon [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 21.08 MiB
Packager        : Unknown Packager
Build Date      : Thu 29 Nov 2018 15:30:01 EST
Install Date    : Thu 29 Nov 2018 15:44:42 EST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None

I installed the package from the AUR using the yay AUR helper. It doesn't even have anything depending on it (Required By: None), so I don't know how it came to be marked as installed as a dependency (as I said, I'm pretty sure I explicitly installed it). I know I can just mark it as explicitly installed after the fact, but I'm wondering, how might I have gotten into this situation and how can I prevent it from happening again in the future?

Last edited by chrisjbillington (2019-01-03 21:19:12)

Offline

#2 2019-01-03 01:33:06

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,203

Re: [SOLVED] Package with nothing depending on it installed as dependency

Depending how yay works, it could be that you actually installed and subsequently removed one of the 32 packages which depend on python2-pyside. This question should really be directed at the yay support system, since it's unlikely to be anything to do with pacman.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2019-01-03 01:46:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,518
Website

Re: [SOLVED] Package with nothing depending on it installed as dependency

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#4 2019-01-03 14:15:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,509

Re: [SOLVED] Package with nothing depending on it installed as dependency

Required By     : None

pacman only looks at installed packages to determine what to list in that field.

ngoonee wrote:

Depending how yay works, it could be that
you actually installed and subsequently removed one of the 32 packages which depend on python2-pyside. This question should really be directed at the yay support system, since it's unlikely to be anything to do with pacman.

FTFY


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

#5 2019-01-03 16:43:55

chrisjbillington
Member
Registered: 2018-11-26
Posts: 9

Re: [SOLVED] Package with nothing depending on it installed as dependency

Looking into this more I don't think it is an AUR issue, the same thing would have occurred with packages in the official repository with the same dependency structure. Anyway I think I've explained to myself what the situation is.

I was unaware that pacman only looks at installed packages to determine what to list in "Required by". This is inconsistent with the web interface, but ok. Now I know this.

It turns out that indeed, python2-pyside was installed as a dependency - of python-pyside-tools, which is what I had explicitly installed.

However, despite Lone_Wolf's smugness on the matter*, I have not removed python-pyside-tools. It is still installed.

The reason python2-pyside is listed by pacman as not having anything depending on it is presumably that it is a *make* dependency only of python-pyside-tools.

Now, I actually want python2-pyside, so I will mark as it as explicit. But yeah, it is listed as an orphan because it is a make dependency, not because the package depending on it has been removed.

* I believe smugness evolved as a way for people to credibly signal how confident they are, essentially by signing up to be chastised if they are wrong. That's why everyone hates people who are smug but wrong. It's a useful mechanism, but it only works if we follow through on the chastising. So: this is my first post on the forums, but I am not some time-sucking newbie who doesn't do basic research before demanding help. Be nice.

Last edited by chrisjbillington (2019-01-03 16:44:21)

Offline

#6 2019-01-03 17:44:26

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,698

Re: [SOLVED] Package with nothing depending on it installed as dependency

chrisjbillington wrote:

Looking into this more I don't think it is an AUR issue, the same thing would have occurred with packages in the official repository with the same dependency structure. Anyway I think I've explained to myself what the situation is.

It would not happen for *binary repository packages*, since you observed later on that it is a makedepends of a thing.

Consider the problem to be a problem with the "python-pyside-tools" package as it is the root cause: without that package, it can be inferred that you would never have had python2-pyside installed to begin with, and you would have, at some later date, installed it explicitly because you wanted it explicitly.

I was unaware that pacman only looks at installed packages to determine what to list in "Required by". This is inconsistent with the web interface, but ok. Now I know this.

Pacman is highly consistent with the web interface. The web interface shows you information about a repository, and pacman -Q shows you information about your system.

pacman -Sii shows you information about a (binary) repository.

Note that without a custom repository to query with -S, pacman has no way of showing information comparable to the *AUR* web interface, because as is well known, pacman does not support source repositories like the AUR.

The AUR web interface can only do so because it has a mysql connection to the aurweb database, which provides more information than is exposed in the public RPC interface. That being said, the recent v4.7.0 release of aurweb allows searching by depends, so this could be finally implemented in an AUR helper...

It turns out that indeed, python2-pyside was installed as a dependency - of python-pyside-tools, which is what I had explicitly installed.

However, despite Lone_Wolf's smugness on the matter*, I have not removed python-pyside-tools. It is still installed.

The reason python2-pyside is listed by pacman as not having anything depending on it is presumably that it is a *make* dependency only of python-pyside-tools.

Now, I actually want python2-pyside, so I will mark as it as explicit. But yeah, it is listed as an orphan because it is a make dependency, not because the package depending on it has been removed.

In other words: no package depended on it at all. Both you and Lone_Wolf are wrong; you're wrong because it is still an AUR helper problem, and Lone_Wolf is wrong for assuming way too deeply into the mechanism by which it happened.

FWIW: makepkg has the -r option to remove packages which it has installed as makedepends but which are not required after makepkg finishes up (and optionally installs the package with -i). So you'd end up with the package installed, then removed, and if you wanted to keep it you would *need* to explicitly install it.

Also, yaourt (of great infamy, apparently) provides very nearly the same functionality as well. At least, it will finish off the installation process by printing a warning: "Packages no longer required by any installed package:" listing the delta of newly orphaned packages. You'd thus be alerted to the fact that it was installed as a dependency, and know to clarify its status on your own.

Last edited by eschwartz (2019-01-03 20:16:21)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2019-01-03 20:11:25

chrisjbillington
Member
Registered: 2018-11-26
Posts: 9

Re: [SOLVED] Package with nothing depending on it installed as dependency

Thanks eschwartz for all the useful information. It makes perfect sense that this would not be an issue for binary packages and thus the main repos, so I stand corrected.

The fact that -Qi doesn't say anything about remote databases also makes sense and expecting otherwise was a newbie mistake on my part.

Yay allows (in some way, I forget) for passing -r to makepkg to remove make dependencies as well, but I have opted not to so far since I expected the same ones would come up repeatedly. However now I think it makes more sense to remove them, and to explicitly install the ones that come up often enough for it to be worth it, otherwise it becomes hard to distinguish other orphans from makedepends, making it a little trickier to keep things clean.

I wonder if an option for AUR helpers to treat all makedepends as if they were ordinary dependencies would be useful or practical, similar to how the "makedep" package turns optional dependencies into true dependencies. Possibly not a good idea, it usually seems simpler in the long run to manage these things explicitly instead of with hidden magic.

Anyway this issue is totally resolved, marking thread as solved.

Offline

#8 2019-01-03 20:24:15

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,698

Re: [SOLVED] Package with nothing depending on it installed as dependency

I guess one thing you could do is create a custom metapackage which depends on other commonly-used packages -- call it "common-makedepends" or something.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2019-01-03 20:52:17

chrisjbillington
Member
Registered: 2018-11-26
Posts: 9

Re: [SOLVED] Package with nothing depending on it installed as dependency

I suppose that is what base-devel is for, though it might make sense for an additional metapackage with a lower threshold for how common a dependency has to be for inclusion, since base-devel is not super extensive.

Offline

#10 2019-01-03 20:53:39

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

Re: [SOLVED] Package with nothing depending on it installed as dependency

I saw nothing smug in Lone_Wolf's post.  More importantly, I also saw nothing incorrect in it.  He highlighted that you (and/or an aur helper under your direction) installed python2-pyside as a dependency.  This was true.  The fact that it was a build-time dependency not a run-time dependency is orthogonal to this point.  But this fact also conclusively demonstrates that it is purely an AUR/AUR-helper issue as your AUR helper installed the build-time dependency and didn't remove it after the build was complete.  The speculation that you more recently removed a package was incorrect, but it was based on the limited information you provided - and it wasn't even Lone_Wolf's own speculation, he simply quoted it for emphasis or agreement.

Further, while I'm not sure I really agree with your view on the need for chastizing people who are smug but incorrect, I will happily play by your rules: consider this your chastizing as you were more smug, and more wrong.  Worse yet, it's your own thread.  Being a dick to people who are just trying to help you is one sure way to be sure no one will volunteer to help you in the future.  As for your closing imperative to "be nice," if you want others to be nice to you, you should try being nice to them.

Last edited by Trilby (2019-01-03 20:58:07)


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

Offline

#11 2019-01-03 21:10:40

chrisjbillington
Member
Registered: 2018-11-26
Posts: 9

Re: [SOLVED] Package with nothing depending on it installed as dependency

Lone_Wolf was wrong though (they said I uninstalled a package that depended on the orphan, which I did not, it was more subtle than that). I read them as smug, but I'm happy that's open to interpretation. They removed the hedging "it could be that" as if to imply it was obvious that it could be nothing else, which was not true.

I was wrong too, and smug, but I was not smug about the things I was wrong about smile.

But this is off-topic and maybe getting too ad-hom, so I won't comment on any more meta stuff in this thread.

Last edited by chrisjbillington (2019-01-03 21:23:00)

Offline

#12 2019-01-06 12:01:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,509

Re: [SOLVED] Package with nothing depending on it installed as dependency

One comment :

It seems my post was way to vague.
The smugness was aimed at ngoonee, an experienced  archlinux user who makes very few mistakes .

If anyone wants to continue discussing that, they can send me a pm .


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

Board footer

Powered by FluxBB