[pacman-dev] [PATCH] Allow querying directory ownership

Andrew Gregory andrew.gregory.8 at gmail.com
Tue May 22 10:02:16 EDT 2012


On Tue, 22 May 2012 16:38:42 +1000
Allan McRae <allan at archlinux.org> wrote:

> On 22/05/12 11:20, Andrew Gregory wrote:
> > On Tue, 22 May 2012 08:28:11 +1000
> > Allan McRae <allan at archlinux.org> wrote:
> > 
> >> The restriction of not checking the ownership of a directory is
> >> unnecessary given that all the package filelists contain this
> >> information. Remove this restriction, with the expectation that you
> >> might get multiple packages returned for a given directory.
> >> Additionally attempt to minimise the number of files getting
> >> through to the slow realpath call.
> >>
> >> This combines ideas from two patches that have been around for a
> >> long time.
> >>
> >> Original-work-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> >> Original-work-by: Dan McGee <dan at archlinux.org>
> >> Signed-off-by: Allan McRae <allan at archlinux.org>
> > 
> > I actually decided to try tackling this again recently too.  If
> > you're interested, you can see the most recent incarnation here:
> > http://bitbucket.org/andrewgregory/pacman/changesets/tip/directory_owner
> > It gets rid of a lot of the basename/dirname stuff which I think
> > makes it a lot easier to follow.
> > 
> 
> I had a quick look through your patch.  It is quite a change to the
> code so there is not anything obvious for me to grab into this one.
> 
> How far would your patch be from being ready?  If the answer is really
> soon, and Dan likes the look of your changes, then I am quite happy
> for "my" patch to be ignored.
> 
> Allan
> 

Unfortunately, in removing the dirname/basename stuff I built in the
assumption that the pkgfile paths will never include symlinks or
anything else that needs to be resolved. I'm not sure why they would,
but it's something we support at the moment.  If everybody's ok with
adding that assumption, then the answer is really soon.  If not, we
should go ahead with your patch.  I do have a couple suggestions for
improving it though, which I'll send along separately.


More information about the pacman-dev mailing list