[pacman-dev] pacman -Ql
I found it weird that pacman -Ql listed two directories : pacman -Ql | grep "/$" cups /var/spool/cups/tmp/ ttf-ms-fonts /tmp/ttf-ms-fonts/ I found the explanation here : http://bbs.archlinux.org/viewtopic.php?pid=259654#p259654 I think this code is wrong, but don't know how to fix it.. Why does it have to use stat for dir though ? Can't it just check for the trailing slash ? And then, stat could be used for the feature request of this thread, ie checking that all files from package actually exist on the filesystem. But in this case, root access will be needed here, otherwise it'll get it wrong..
On 6/18/07, Xavier <shiningxc@gmail.com> wrote:
I found it weird that pacman -Ql listed two directories :
pacman -Ql | grep "/$" cups /var/spool/cups/tmp/ ttf-ms-fonts /tmp/ttf-ms-fonts/
I found the explanation here : http://bbs.archlinux.org/viewtopic.php?pid=259654#p259654
I think this code is wrong, but don't know how to fix it.. Why does it have to use stat for dir though ? Can't it just check for the trailing slash ?
And then, stat could be used for the feature request of this thread, ie checking that all files from package actually exist on the filesystem. But in this case, root access will be needed here, otherwise it'll get it wrong..
If you explain your logic a bit better and provide a patch actually fixing something, we'll be sure to take it. stat just seemed like the best way at the time to ensure that something was in fact a directory and not a file, symlink, etc. -Dan
I just found that only displaying directories that can't be stated was a bit strange. That's not a big problem though, maybe not a problem at all, I only wanted to have other opinions about this. If it's indeed a problem, the main difficulty is finding what should be pacman behavior here, not providing a patch for it.
ok, so here is a possible fix : http://chantry.homelinux.org/~xav/git/gitweb.cgi?p=pacman.git;a=commitdiff;h... before :
pacman -Ql ttf-ms-fonts ttf-ms-fonts /tmp/ttf-ms-fonts/ ttf-ms-fonts /tmp/ttf-ms-fonts/andale32.exe ttf-ms-fonts /tmp/ttf-ms-fonts/arial32.exe ttf-ms-fonts /tmp/ttf-ms-fonts/arialb32.exe ...
pacman -Ql cups |grep spool ... cups /var/spool/cups/tmp/
after :
pacman -Ql ttf-ms-fonts ttf-ms-fonts /tmp/ttf-ms-fonts/ : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/andale32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/arial32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/arialb32.exe : No such file or directory ...
pacman -Ql cups |grep spool ... cups /var/spool/cups/tmp/ : Permission denied
This command should then show all inconsistent packages (packages which own a file that isn't installed on filesystem) : LANG=C sudo pacman -Ql > /dev/null git /usr/share/gitweb/test/M\303\244rchen : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/ : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/andale32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/arial32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/arialb32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/comic32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/courie32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/georgi32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/impact32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/times32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/trebuc32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/verdan32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/wd97vwr32.exe : No such file or directory ttf-ms-fonts /tmp/ttf-ms-fonts/webdin32.exe : No such file or directory So there is apparently a problem with filenames that contains special character, like this file : /usr/share/gitweb/test/Märchen Is there a way to fix that?
participants (2)
-
Dan McGee
-
Xavier