[pacman-dev] installing a package as user (permission problems)

Xavier shiningxc at gmail.com
Sat Jul 7 16:26:43 EDT 2007


Should pacman allow installing a package as user ?
It looks quite hard to check for all permissions
before doing anything.
And if permissions are checked on the fly, and at one point it fails,
it looks hard to revert what has been done.
For example, suppose an user wants to install foo-1 package,
and has write access to everything but $dbpath/local/foo-1/
pacman will be able to install the package, extracting all files
on filesystem, but it won't be able to add the package in the database.
So the package will be installed, but not recorded in the db.

A permission problem can also appear earlier, eg during the extraction of
files. Maybe all files from the package can be extracted except one,
which needs to be installed in a directory without write access.

That looks quite complicated to handle.

Oh, I just remembered Dan's permissions branch :
http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commitdiff;h=b06c89e3e5c8a1daae1b6fdab504bb8a9301cfc9

"Remove geteuid calls and things related to uid checking in anticipation
of reimplementing a more robust permissions checking system. This will
allow libalpm to be used in situations where we do not always have root
on a system (cygwin, dreamhost, etc.)."

More robust permissions checking system, that would be cool. :)
To Dan : what you had in mind would solve the problems above ?




More information about the pacman-dev mailing list