[pacman-dev] pacman and same empty dirs in both pkgs, problem?

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Fri Jul 24 17:05:11 EDT 2009


Xavier wrote:
> On Fri, Jul 24, 2009 at 10:38 PM, Gerardo Exequiel
> Pozzi<vmlinuz386 at yahoo.com.ar> wrote:
>   
>> Hi devs,
>>
>> This mail is trigger by this problem [#1].
>>
>> 1) PKG1 installs some directory without any files like "/some/common/dir"
>> 2) PKG2 installs the same directory "/some/common/dir" with or without
>> any files inside
>> 3) Removing PKG2 also remove "/some/common/dir" that is installed by PKG1
>>
>> This behaviour is expected? pacman only track files not directories
>> true? Also tested with the latest pacman.git (at commit 30c4d53ce)
>>
>> packages like openssh that install an empty dir "/var/empty/" should
>> also install a hidden file like "/var/empty/.keep.this.for.openssh" ?
>>
>>
>>
>> [#1] http://bugs.archlinux.org/task/15668 (openntpd 3.9p1-7 uninstall
>> removes /var/empty)
>>
>>     
>
> pacman just does not take into account this case (package installing
> empty directories) when removing directories.
> It only does this :
>   if(S_ISDIR(buf.st_mode)) {
>     if(rmdir(file)) {
>       /* this is okay, other packages are probably using it (like /usr) */
>       _alpm_log(PM_LOG_DEBUG, "keeping directory %s\n", file);
>     } else {
>       _alpm_log(PM_LOG_DEBUG, "removing directory %s\n", file);
>     }
>
> Maybe instead of trying to remove the directory, it should check all
> existing packages to see if there is one owning this directory.
> But this will slow down the -R operation, for each directory inside a package.
>
> And do we already have a bug report for this issue? I think it has
> been mentioned before.
>
>   
OK maybe you talking about this [#1]? Then, in the case that pacman is
"Won't fix/Not a Bug" issue. Then (in this case) openssh should install
a hidden file in /var/empty that is a common directory for some
packages. Or... ?

Thanks,

[#1] http://bugs.archlinux.org/task/11263 (Removing qt3 removes /opt)

-- 
Gerardo Exequiel Pozzi ( djgera )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D



More information about the pacman-dev mailing list