FS#8905 - Sp (--print-uris) can't be run as user
Attached to Project:
Pacman
Opened by Roman Kyrylych (Romashka) - Wednesday, 12 December 2007, 13:07 GMT
Last edited by Xavier (shining) - Wednesday, 03 June 2009, 11:55 GMT
Opened by Roman Kyrylych (Romashka) - Wednesday, 12 December 2007, 13:07 GMT
Last edited by Xavier (shining) - Wednesday, 03 June 2009, 11:55 GMT
|
Details
Summary and Info:
with pacman 3.0 I can get -Sp output as non-root user, while 3.1 says I must be root for this. Steps to Reproduce: just run pacman -Sp somepackage as non-root |
This task depends upon
Closed by Xavier (shining)
Wednesday, 03 June 2009, 11:55 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in git by commit f4ecc908eccc3ace2e40b15be837e4fa44ecf0a0
Wednesday, 03 June 2009, 11:55 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in git by commit f4ecc908eccc3ace2e40b15be837e4fa44ecf0a0
I don't really understand neither the quick hack, nor the proper fix. So I hoped Dan or Aaron could do something about it.
I think Dan and I informally agreed that this is a minor issue for now. PRINTURIs is a big freaking mess. There is _no reason_ to do that as part of a transaction. The *best* thing to do would be to use something similar to get all targets (-Sup or -Sp) and call something like alpm_pkg_get_url from the frontend.
Roman: Please let Dan and I manage what bugs go into the 3.1 release. We need to fix this one, but it is not critical for the release. Requiring root for -Sp is annoying, sure, but not a deal-breaker
I personally don't use this operation at all, so I have no impetus to fix it. Thoughts in no particular order:
* Running -Sp fires up the whole dependency machinery, which is now all-but-impossible to do without starting a transaction.
* Can we just run pacman -Qu | alpm_pkg_get_url()? That won't cover all bases though, as stated here:
bug 7884.* The existing PRINTURI stuff is a crock of shit.
OK, no problems. :-)
Sure it isn't critical issue for 3.1, I just added it because it's a clear regression from 3.0.x. I didn't know (I forgot about ML threads) it was not easy to fix.
FS#8930<- You can read my preferred fix there with reasoning (which is much more general[sry], but a possible easy fix)FS#9154= 4 votes for this bug) since it pretty much breaks (non-root-)frontends to pacman like yaourt.Anyhow, I know you guys are working on it and I'm grateful for that. Just wanted to bring it up again, that even though it's not critical this (should) affect way more ppl than the 4 that have voted for the bug reports.
The main problem is, that currently -Sp needs a transaction, which induces a database lock per definition [which requires root permission]. My preferred possible solution to introduce a new need_lock parameter to trans_init to indicate whether the "transaction" needs a db lock or not [+
FS#9154;-)].I can go further with this audacious idea:
See also -Sy. This is an other operation where currently transaction is needed, but imho this is not a transaction at all, we just must do trans_init and release to lock/unlock the database.
That's why I suggest move out db lock from back-end to front-end (my real preferred sol. ;-). Dan, thoughts? [I know, that my idea needs more attention from front-ends, but currently pacman is the only(?) front-end, and the current rule is just a restriction to ourself]
"$ pacman -V
Pacman v3.1.3 - libalpm v2.3.0"
Is there any news from the front, as to when "-Sp" will be accessible for regular users again?
*nag* :>
So if Dan accepts this, the issue can be fixed soon.
Thank you very much anyways for your work, nagy :>
Soooo, what's the status on this one now? :>
Additionally, I'm sure yaourt could be easily changed to drop root before running makepkg (it probably should do this anyway, to be on the safe side)