FS#5641 - Pacman (makepkg): Support for -I (--install with sudo)

Attached to Project: Pacman
Opened by Brett Andrew Goulder (predatorfreak) - Sunday, 22 October 2006, 06:46 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 08 December 2006, 23:06 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I found the lack of this feature slightly annoying, as there is -S, allowing dependencies to be installed via sudo without sacrificing fakeroot, but not support for installing them in the same fashion. I tried to stick to the coding and indentation style I saw in the code, the only thing I couldn't preserve was the exit $? part, exiting with pacman's status.

Attached is a patch against 2.9.8, complete with a manpage update for the new option.
This task depends upon

This task blocks these from closing
 FS#6316 - Pacman 3 release bugcatcher 
Closed by  Dan McGee (toofishes)
Sunday, 11 February 2007, 21:49 GMT
Reason for closing:  Implemented
Additional comments about closing:  Implemented in CVS, did sufficient testing but could always use more.
Comment by Brett Andrew Goulder (predatorfreak) - Sunday, 22 October 2006, 06:54 GMT
Sorry, the former patch doesn't handle the "package already built" area of code, I missed that, here's a corrected patch.
Comment by Brett Andrew Goulder (predatorfreak) - Tuesday, 24 October 2006, 03:50 GMT
Looks like I fucked up the exiting for the above "fixed" patch, so here's a patch to repair that mistake, I'm likely to just start throwing all my work into an Arch repository, which I will post a link to once I get around to it, as I have plans for other work on makepkg later.
Comment by Roman Kyrylych (Romashka) - Tuesday, 28 November 2006, 12:11 GMT
IIRC there was a plan to merge -A and -U into one -I in Pacman 3. If this happen, then "-I with sudo" will need to have slightly different syntax, i.e. -Ix, where x is some char (dunno what it can be, -Ii maybe?).
Comment by James Rayner (iphitus) - Tuesday, 28 November 2006, 22:00 GMT
patch is for makepkg, not pacman.
Comment by Brett Andrew Goulder (predatorfreak) - Thursday, 30 November 2006, 00:02 GMT
I'm more than willing to do any forward porting required for 3.0, I'd just like to see this feature merged.
Comment by Aaron Griffin (phrakture) - Thursday, 11 January 2007, 23:26 GMT
makepkg CVS uses the -S flag when -i is specified, to run sudo. So -Si will do this.

Perhaps -S should changed to just "use sudo" so -Si, -Sr, and -Ss will be the sudo counterparts of the lowercase options.

Opinions?
Comment by Roman Kyrylych (Romashka) - Friday, 12 January 2007, 09:29 GMT
Yeah, I like -Ss, -Si, -Sr idea :)
Comment by Dan McGee (toofishes) - Friday, 09 February 2007, 18:29 GMT
Without thinking about it too much, I like Aaron's idea, it seems like a KISS way to do it. Makepkg already has enough options.
Comment by Dan McGee (toofishes) - Sunday, 11 February 2007, 21:48 GMT
Implemented in CVS as phrakture's comment stated above. -S now means --usesudo, and any of the i, r, and s operations can be used in combination with it.

Loading...