Welcome to the Pacman bug collection. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproduceable test case whenever possible.
Tasklist

FS#8905 - Sp (--print-uris) can't be run as user

Attached to Project: Pacman
Opened by Roman Kyrylych (Romashka) - Wednesday, 12 December 2007, 08:07 GMT-4
Last edited by Travis Willard (Cerebral) - Saturday, 08 March 2008, 11:23 GMT-4
Task Type Bug Report
Category General
Status New
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Operating System All
Severity Low
Priority Normal
Reported Version git
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 6
Private No

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

Comment by Xavier (shining) - Wednesday, 12 December 2007, 10:51 GMT-4
Reference : http://www.archlinux.org/pipermail/pacman-dev/2007-November/010174.html .

I don't really understand neither the quick hack, nor the proper fix. So I hoped Dan or Aaron could do something about it.
Comment by Aaron Griffin (phrakture) - Wednesday, 12 December 2007, 11:46 GMT-4
Ugh. -Sp.

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
Comment by Dan McGee (toofishes) - Wednesday, 12 December 2007, 11:48 GMT-4
Wow, I brought this up a few times ML before someone decided to file a bug. :)

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.
Comment by Roman Kyrylych (Romashka) - Thursday, 13 December 2007, 05:42 GMT-4
> 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
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.

Comment by Nagy Gabor (combo) - Friday, 14 December 2007, 18:34 GMT-4
Oh, I've created a duplicate of this bug, sorry (I've searched for -Sp or root):  FS#8930  <- You can read my preferred fix there with reasoning (which is much more general[sry], but a possible easy fix)
Comment by Aaron Griffin (phrakture) - Friday, 14 December 2007, 18:37 GMT-4
Not a problem, I had trouble finding this one too, I just knew it was there
Comment by Stefan O. (hybrid) - Sunday, 27 January 2008, 09:56 GMT-4
I'm surprised there's not more votes on this one (only 2 votes on this report and another 2 on duplicate  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.
Comment by Dan McGee (toofishes) - Monday, 28 January 2008, 20:41 GMT-4
I won't lie- we aren't working at all on this.
Comment by Nagy Gabor (combo) - Tuesday, 29 January 2008, 02:06 GMT-4
But we are thinking about it ;-)
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]
Comment by Aaron Griffin (phrakture) - Tuesday, 29 January 2008, 14:18 GMT-4
One bug per report please.
Comment by Stefan O. (hybrid) - Saturday, 08 March 2008, 08:04 GMT-4
"Due in Version: 3.1.1"
"$ 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* :>
Comment by Nagy Gabor (combo) - Saturday, 08 March 2008, 08:33 GMT-4
I'm pretty sure that this won't be fixed in 3.1.x, since we are in API freeze. However, I will look at the problem today again and try to create a fix for this (to 3.2).
Comment by Nagy Gabor (combo) - Saturday, 08 March 2008, 12:42 GMT-4
http://www.archlinux.org/pipermail/pacman-dev/2008-March/011384.html
So if Dan accepts this, the issue can be fixed soon.
Comment by Stefan O. (hybrid) - Saturday, 05 April 2008, 12:52 GMT-4
Great, one month ago you were hurrying to get it done, now almost a month later a new pacman version is out - and it doesn't include your fix.
Thank you very much anyways for your work, nagy :>
Comment by Aaron Griffin (phrakture) - Wednesday, 09 April 2008, 15:32 GMT-4
Last I read, Nagy's patch was denied because it was against the wrong get branch and was never resubmitted against the maint branch. Correct me if I'm wrong.
Comment by Nagy Gabor (combo) - Friday, 11 April 2008, 08:29 GMT-4
Aaron, you're right. But it wasn't resubmitted, because first I wanted to implement needs_root() function http://www.archlinux.org/pipermail/pacman-dev/2008-March/011382.html and http://www.archlinux.org/pipermail/pacman-dev/2008-March/011436.html <- and this led to the pending "argument handling" TODO.

Loading...