[pacman-dev] [PATCH] Consistently add leading slash for the output of files operations

Allan McRae allan at archlinux.org
Sun Oct 18 01:15:31 UTC 2015


On 18/10/15 01:06, Andrew Gregory wrote:
> On 10/17/15 at 07:50pm, Allan McRae wrote:
>> Signed-off-by: Allan McRae <allan at archlinux.org>
>> ---
>>  src/pacman/files.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Surely, if anything, we should be adding handle->root, not just a raw
> slash.  I'm not sure it makes sense to do that for sync packages
> though.  All of our path handling for local packages uses absolute
> paths because we're referring to actual objects on the filesystem.
> `pacman -Qo` doesn't even allow paths that don't actually exist.  Sync
> packages, on the other hand, are just a list of strings in a database
> with no correlation to the filesystem.  I'm not sure something like
> `pacman -Fo /foo/bar` even makes sense, and `pacman --root=/baz -Fo
> /foo/bar` and `pacman --root=/baz -Fo /baz/foo/bar` make even less.
> 
> I would say to just treat sync file lists as raw strings and forget
> that they represent paths at all.

Agreed. Printing without any root prefix is the most consistent.  I'll
submit a new patch that consistently does not print and root prefix.

Allan


More information about the pacman-dev mailing list