Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#14081 - Make pacman able to read dependencies from PKGBUILDs files.

Attached to Project: Pacman
Opened by app4des (app4des) - Friday, 03 April 2009, 14:05 GMT
Last edited by Allan McRae (Allan) - Monday, 07 June 2010, 06:52 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.2.2
Due in Version 3.4.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

The absence of this pacman feature makes it necessary to use/install sudo and edit sudoers file (which is unnecessary security risk for new users), only because you need to easily fetch the dependencies when you do work with AUR and ABS PKGBUILDS.

So makepkg -s is the only sane way to get the dependencies and requires sudo.

My suggestion is to implement a "pacman -P" for example that will automatically read the PKGBUILD of the parent directory, and parse them for syncing/installing.

An alternative solution (and probably more correct) would be to implement this to makepkg instead of pacman. Something like makepkg --onlyinstalldeps (-s right now is "also install deps") that would also disable the root check.

With this functionality a user should be able to install an AUR/ABS package like that without having sudo installed:

cd /(a PKGBUILD directory)/
su -c 'pacman -P' OR su -c 'makepkg --onlyinstalldeps'
makepkg


It is easy to write a small script to implement this, I just feel that a new user by default shouldn't have to install sudo and edit sudoers to effectively use makepkg.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 07 June 2010, 06:52 GMT
Reason for closing:  Implemented
Additional comments about closing:  makepkg will fall back to su if sudo is not present: http://projects.archlinux.org/pacman.git /commit/?id=590606a5
Comment by Dan McGee (toofishes) - Friday, 03 April 2009, 15:28 GMT
pacman knows nothing about PKGBUILDs, and I don't think we plan on changing this anytime soon. Building packages and installing packages are two separate issues.
Comment by Allan McRae (Allan) - Sunday, 05 April 2009, 04:14 GMT
I agree that this should not be in pacman. So that leaves the idea of having makepkg have an option to install needed deps and exit so makepkg can be "safely" run as root for that operation. I'm not sure about including that either...
Comment by Allan McRae (Allan) - Saturday, 06 March 2010, 11:27 GMT
There is a patch on the mailing list to fallback to using "su -c" instead of sudo when sudo is not installed.
Comment by Allan McRae (Allan) - Wednesday, 26 May 2010, 11:27 GMT
Is this patch enough to close this bug: http://projects.archlinux.org/pacman.git/commit/?id=590606a5 ? makepkg will fall back to using "su -c" if sudo is not installed.

Loading...