FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-26-2011, 11:37 PM
Allan McRae
 
Default Removing empty directories

I just noticed this:

> pacman -Qk | grep "^warning"
warning: filesystem: /opt/ (No such file or directory)
warning: hal: /usr/share/hal/fdi/information/20thirdparty/ (No such file
or directory)
warning: hal-info: /usr/share/hal/fdi/information/20thirdparty/ (No such
file or directory)
warning: hicolor-icon-theme: /usr/share/icons/hicolor/256x256/apps/ (No
such file or directory)
warning: network-manager-applet: /etc/gconf/schemas/ (No such file or
directory)



All these directories are empty in their package. They appear to have
been removed when I uninstalled a different package that had files in
that directory.


Maybe we need some more checking before removing an empty directory.

Allan
 
Old 02-27-2011, 09:40 AM
Xavier Chantry
 
Default Removing empty directories

On Sun, Feb 27, 2011 at 1:37 AM, Allan McRae <allan@archlinux.org> wrote:
> I just noticed this:
>
>> pacman -Qk | grep "^warning"
> warning: filesystem: /opt/ (No such file or directory)
> warning: hal: /usr/share/hal/fdi/information/20thirdparty/ (No such file or
> directory)
> warning: hal-info: /usr/share/hal/fdi/information/20thirdparty/ (No such
> file or directory)
> warning: hicolor-icon-theme: /usr/share/icons/hicolor/256x256/apps/ (No such
> file or directory)
> warning: network-manager-applet: /etc/gconf/schemas/ (No such file or
> directory)
>
>
> All these directories are empty in their package. *They appear to have been
> removed when I uninstalled a different package that had files in that
> directory.
>
> Maybe we need some more checking before removing an empty directory.
>
> Allan
>
>

http://mailman.archlinux.org/pipermail/pacman-dev/2009-July/009008.html
https://bugs.archlinux.org/task/15668
https://bugs.archlinux.org/task/11263
 
Old 02-27-2011, 09:53 AM
Allan McRae
 
Default Removing empty directories

On 27/02/11 20:40, Xavier Chantry wrote:

On Sun, Feb 27, 2011 at 1:37 AM, Allan McRae<allan@archlinux.org> wrote:

I just noticed this:


pacman -Qk | grep "^warning"

warning: filesystem: /opt/ (No such file or directory)
warning: hal: /usr/share/hal/fdi/information/20thirdparty/ (No such file or
directory)
warning: hal-info: /usr/share/hal/fdi/information/20thirdparty/ (No such
file or directory)
warning: hicolor-icon-theme: /usr/share/icons/hicolor/256x256/apps/ (No such
file or directory)
warning: network-manager-applet: /etc/gconf/schemas/ (No such file or
directory)


All these directories are empty in their package. They appear to have been
removed when I uninstalled a different package that had files in that
directory.

Maybe we need some more checking before removing an empty directory.

Allan




http://mailman.archlinux.org/pipermail/pacman-dev/2009-July/009008.html
https://bugs.archlinux.org/task/15668
https://bugs.archlinux.org/task/11263



I had a fair suspicion this had been discussed before... I just did a
"wtf?" when I saw /opt had disappeared.


I'm going to create a pactest for this.

Allan
 
Old 02-27-2011, 10:01 AM
Xavier Chantry
 
Default Removing empty directories

On Sun, Feb 27, 2011 at 11:53 AM, Allan McRae <allan@archlinux.org> wrote:
>
> I had a fair suspicion this had been discussed before... *I just did a
> "wtf?" when I saw /opt had disappeared.
>
> I'm going to create a pactest for this.
>

If we believe the performance hit to fix this problem is not worth it,
why not consider these packaging problems, and have all these packages
install a .keep file ?
 
Old 02-27-2011, 10:40 AM
Allan McRae
 
Default Removing empty directories

On 27/02/11 21:01, Xavier Chantry wrote:

On Sun, Feb 27, 2011 at 11:53 AM, Allan McRae<allan@archlinux.org> wrote:


I had a fair suspicion this had been discussed before... I just did a
"wtf?" when I saw /opt had disappeared.

I'm going to create a pactest for this.



If we believe the performance hit to fix this problem is not worth it,
why not consider these packaging problems, and have all these packages
install a .keep file ?



How much of a performance hit would there really be? If I have this
right in my head (big assumption), the file-lists for all packages are
read in in one go. So all that we would have to do is loop over them
checking for the empty directory before we add it to the removal list.
Should be a minimal impact.... maybe...


I suppose the best way is to make a patch and see!

Allan
 
Old 02-27-2011, 10:48 AM
Xavier Chantry
 
Default Removing empty directories

On Sun, Feb 27, 2011 at 12:40 PM, Allan McRae <allan@archlinux.org> wrote:
>
> How much of a performance hit would there really be? * If I have this right
> in my head (big assumption), the file-lists for all packages are read in in
> one go. *So all that we would have to do is loop over them checking for the
> empty directory before we add it to the removal list. Should be a minimal
> impact.... *maybe...
>
> I suppose the best way is to make a patch and see!
>

AFAIK the file lists currently do not need to be loaded with -R, so
the impact would be loading them more than the checking itself.
Then again, we have that cost for all -S operation already, so why not
make -R as bad ?

Anyway we will keep having problems until we have a single file for
the local db as well.
 
Old 02-27-2011, 11:41 AM
Allan McRae
 
Default Removing empty directories

On 27/02/11 21:48, Xavier Chantry wrote:

On Sun, Feb 27, 2011 at 12:40 PM, Allan McRae<allan@archlinux.org> wrote:


How much of a performance hit would there really be? If I have this right
in my head (big assumption), the file-lists for all packages are read in in
one go. So all that we would have to do is loop over them checking for the
empty directory before we add it to the removal list. Should be a minimal
impact.... maybe...

I suppose the best way is to make a patch and see!



AFAIK the file lists currently do not need to be loaded with -R, so
the impact would be loading them more than the checking itself.
Then again, we have that cost for all -S operation already, so why not
make -R as bad ?


strace tells me that I was wrong and you are right. So that is big
overhead...



Anyway we will keep having problems until we have a single file for
the local db as well.


Yes, we will. I might attempt to a gathering of the contenders for
improving this post 3.5.


Allan
 
Old 02-27-2011, 12:45 PM
Heiko Baums
 
Default Removing empty directories

Am Sun, 27 Feb 2011 12:01:01 +0100
schrieb Xavier Chantry <chantry.xavier@gmail.com>:

> If we believe the performance hit to fix this problem is not worth it,
> why not consider these packaging problems, and have all these packages
> install a .keep file ?

No, please! Not those crappy .keep files in almost every directory again
like in Gentoo! This is really annoying!

Heiko
 
Old 02-27-2011, 03:56 PM
Dan McGee
 
Default Removing empty directories

On Sun, Feb 27, 2011 at 4:53 AM, Allan McRae <allan@archlinux.org> wrote:
> On 27/02/11 20:40, Xavier Chantry wrote:
>>
>> On Sun, Feb 27, 2011 at 1:37 AM, Allan McRae<allan@archlinux.org> *wrote:
>>>
>>> I just noticed this:
>>>
>>>> pacman -Qk | grep "^warning"
>>>
>>> warning: filesystem: /opt/ (No such file or directory)
>>> warning: hal: /usr/share/hal/fdi/information/20thirdparty/ (No such file
>>> or
>>> directory)
>>> warning: hal-info: /usr/share/hal/fdi/information/20thirdparty/ (No such
>>> file or directory)
>>> warning: hicolor-icon-theme: /usr/share/icons/hicolor/256x256/apps/ (No
>>> such
>>> file or directory)
>>> warning: network-manager-applet: /etc/gconf/schemas/ (No such file or
>>> directory)
>>>
>>>
>>> All these directories are empty in their package. *They appear to have
>>> been
>>> removed when I uninstalled a different package that had files in that
>>> directory.
>>>
>>> Maybe we need some more checking before removing an empty directory.
>>>
>>> Allan
>>>
>>>
>>
>> http://mailman.archlinux.org/pipermail/pacman-dev/2009-July/009008.html
>> https://bugs.archlinux.org/task/15668
>> https://bugs.archlinux.org/task/11263
>>
>
> I had a fair suspicion this had been discussed before... *I just did a
> "wtf?" when I saw /opt had disappeared.
>
> I'm going to create a pactest for this.

Agreed- I think we've just tried to ignore this in the past because we
knew the solution would require a lot more overhead, but it probably
makes sense to add a test and re-open FS#11263 for this.

-Dan
 

Thread Tools




All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org