You are not logged in.
Upgrading with --asdeps, marks the packages being upgraded as implicitly installed. Is this the intended behavior?
This is problematic when installing package with, for instance:
# pacman -Syu <package_x> --asdeps
The result is not intuitive, as is would install the package_x as dependency but any upgrade that it does perform on the system, even if previously marked as explicitly installed, would be marked as implicit installation.
I would say this is a bug, but if it's not one it should at least be mentioned in the man pages and help of pacman.
Last edited by strangelyput (2018-05-15 13:17:00)
Offline
It doesn't look like a bug to me, just a very bad idea. Why would you add the "--asdeps" flag there? It's doing exactly what it's supposed to.
How would you like it mentioned in the man page, it's pretty clear already:
Install packages non-explicitly; in other words, fake their install reason to be installed as a dependency.
Last edited by Trilby (2018-05-15 13:33:10)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That's behaving as expected. Packages with existing database entries will retain their install reason during upgrades, and new packages will inherit the install reason you have provided.
If you want to alter the install reason for a currently installed package, use 'pacman -D'. EDIT: Looks like I'm completely wrong on this, see below.
Last edited by WorMzy (2018-05-15 13:56:03)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
WorMzy, the OP is actually saying the opposite is happening (I think) which does seem to me to be the documented behavior. All the packages upgraded (whether new or not) are being marked as dependencies.
I am not willing to try replicating this on my system (as the command itself is just a horrible idea to start with) but I can replicate with a single package that I already have installed:
$ pacman -Qi xorg-xrandr | grep Reason
Install Reason : Explicitly installed
$ pacman -S xorg-xrandr --asdeps
...
$ pacman -Qi xorg-xrandr | grep Reason
Install Reason : Installed as a dependency for another package
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Huh, I'm not sure if that's changed in recent versions of pacman, or if it always did that and I'm just misremembering. Thanks for clarifying.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I'm fairly sure this is working as intended.
-Su will expand all available upgrades and add them to the explicit transaction list.
--asdeps will mark all packages in the explicit transaction list as "asdeps" (but should not modify the installation reason of existing installed packages which are upgraded only due to e.g. a versioned dependency requirement, which is sort of irrelevant when using -Su as it will still be on the explicit transaction list).
Passing either --asexplicit nor --asdeps will cause installation reasons for already-installed packages to be preserved.
So the root of the issue is you were expecting -Su to be something other than a simple alias for "pretend I explicitly listed every single package that has an available update".
tl;dr
You need two passes if you want to set the installation reason for only some packages. Or install explicitly then use -D to modify it after the fact.
Last edited by eschwartz (2018-05-15 14:23:31)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
So the root of the issue is you were expecting -Su to be something other than a simple alias for "pretend I explicitly listed every single package that has an available update".
Yes, I guess. But I would still say that the actual behavior is not what most people expect. Specially because you cannot possibly understand that from the help page.
But if this is as intended, you are absolutely right, this a very very bad idea, it should not even be possible. You could do much damage inadvertently, if you are not aware of this behavior like me (I have been using Arch for 3 or 4 years).
Maybe at least the help page should be changed?
Last edited by strangelyput (2018-05-15 15:05:00)
Offline
Specially because you cannot possibly understand that from the help page.
No, you can't, apparently. But don't make such claims about others. It is perfectly intuitive - even obvious - to me from reading the man page. It's ok if it isn't to you, but then elaborate on what is confusing to you, don't assume it is confusing for everyone.
---
... this a very very bad idea, it should not even be possible. You could do much damage inadvertently
There are countlessly many pacman commands you could use which would do much worse than this.
UNIX was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things.
---
Maybe at least the help page should be changed?
How would you like it mentioned in the man page, it's pretty clear already...
Last edited by Trilby (2018-05-15 15:08:27)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It doesn't look like a bug to me, just a very bad idea. Why would you add the "--asdeps" flag there? It's doing exactly what it's supposed to.
How would you like it mentioned in the man page, it's pretty clear already:
man pacman wrote:Install packages non-explicitly; in other words, fake their install reason to be installed as a dependency.
Yes, but the problem is that any packages that are updated in the process change their "Install Reason". Maybe it's obvious for you that this would happen, but I would never expect this. Applying --asdeps basically randomly to packages is a bad ideia. And should not be possible. I cannot see any reason for this behavior.
Offline
I cannot see any reason for this behavior.
I agree it's a bad idea. I also cannot see any reason for it ... which is why I don't know why you did it. But again, if you want to man page changed, suggest a change. No one else could know what would make it clear to you, only you can tell us.
EDIT: I mean this quite matter-of-factly. Rereading this might sound abrupt, but to me it's just fact: those who understand the man page the way it is written really can't suggest useful edits to make it clear to those who don't understand it. As you are in the latter group you need to highlight what would make it more clear.
Last edited by Trilby (2018-05-15 15:13:26)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
As Trilby said:
This seemed clear to me. Maybe this is from my perspective as someone who's involved in pacman development, but the fact remains clear... it seemed obvious to me. How can I document the unclear, if I don't realize it is in fact unclear?
You're asserting it is not clear to you. The best way to fix this is to tell us what would in fact make it clear to you. If you could help us improve our documentation, that can only be a good thing.
Feel free to suggest manpage updates, or even provide patches.
https://www.archlinux.org/pacman/#_bugs
Last edited by eschwartz (2018-05-15 15:27:27)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I agree it's a bad idea. I also cannot see any reason for it ... which is why I don't know why you did it.
Since partial upgrades are not suported and the suggested way to install packages is "pacman -Syu package_name". Using -Su with --asdeps should be discouraged. Which is not on any pacman documentation that I have looked at.
Feel free to suggest manpage updates, or even provide patches.
I'll probably do that. Thank you all for the clarification.
Offline
But -Syu packagename works fine too, it assumes you're installing an explicitly installed package. -Syu && -S --asdeps packagename also works fine.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
and the suggested way to install packages is "pacman -Syu package_name".
It is *a* way to install packages, I wouldn't say it is *the* way.
Offline
Since you guys don't see this as a problem, which I understand, and I'm not seeing an easy fix to the help page right now. I've edited the wiki, maybe it help someone in my position.
Offline
It would be slightly more intuitive if the --asdeps and --asexplicit options only applied to packages explicitly passed to pacman during the sync operation. Consider the two possibilities for the interpretation of "pacman -Syu --asdeps foo":
Current situation: Install foo and all upgradable packages as dependencies. It is up to me to check which packages will be affected.
Alternative: Install all upgradable packages as usual, and install foo as a dependency."
In the first case, I expect that it is of very limited use to change the install dependency of all upgradable packages given that this set depends on when the upgrade operation is run. Additional commands will always be required to determine which packages will be affected, unless a user is just randomly changing install reasons, which should have little practical use.
The second case allows a user to change the install reason of both upgradable packages and uninstalled packages in the same operation while remaining completely explicit.
The issue is trivial because it can always be resolved with
$ pacman -Syu foo
$ pacman -D --asdeps foo
but the current behavior is less useful than the one expected by OP (and likely others). Given a choice between an operation that applies changes to a variable set of packages with possible consequences for system stability when apparent deps are removed, and one which only applies changes explicitly requested by the user, with no other obvious effects on usuability, I would opt for the latter. In my opinion, the second option is of greater practical value. Of course, I expect that pacman maintains a simple internal list of packages for the sync operation and simply appends upgradable packages and dependencies to a common list along with the explicitly requested package.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline