[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Apply pattern-matching immediately beneath the stow directory.
From: |
Sergiu Ivanov |
Subject: |
[PATCH] Apply pattern-matching immediately beneath the stow directory. |
Date: |
Mon, 31 Aug 2009 23:32:12 +0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* stow.c ( _stow_scanstowentry): Don't iterate the subdirs of the
supplied directory; instead, check the directory itself against
the pattern.
---
Hello,
On Fri, Aug 28, 2009 at 03:37:23AM +0200, olafBuddenhagen@gmx.net wrote:
> On Mon, Aug 24, 2009 at 12:07:18AM +0300, Sergiu Ivanov wrote:
> > On Sun, Aug 23, 2009 at 10:42:41PM +0200, Gianluca Guida wrote:
>
> > > I do agree that it's counter-intuitive. Please note that the stow
> > > functionality was mostly meant for the GNU system as a base for a --
> > > rather complex I'd say -- packaging system.
[...]
> > I wonder whether there is still the necessity to keep things as they
> > are. I can see that the files in which you are mentioned as the
> > author date back to 2005, so requirements might have changed in the
> > meantime.
>
> The requirements haven't changed. In fact, there is no movement on this
> front at all ;-)
>
> But you have a point there: just matching everything below the top level
> directory (so you'd have to pass "*/bin" instead of "bin" for the
> original use case), would be both more intuitive *and* more generic...
This patch makes unionfs try the pattern against the directories
immediately beneath stow/ , instead of doing it in the original way.
Please note, however, that "*/bin" will not work anyways, because
unionfs checks the patterns only against the first-level
subdirectories of stow/ . To make this pattern work, unionfs would
have to traverse all subdirectories of stow/ , interpreting the
pattern in a smart way and consuming much more time than it does now.
That's why I am not sure whether we really need such functionality.
Regards,
scolobb
---
stow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stow.c b/stow.c
index fa99747..4895413 100644
--- a/stow.c
+++ b/stow.c
@@ -93,7 +93,7 @@ _stow_scanstowentry (char *arg, char *dirpath, void *priv)
}
else
{
- err = for_each_subdir_priv (filepath, _stow_registermatchingdirs, priv);
+ err = _stow_registermatchingdirs (arg, dirpath, priv);
if (err)
{
mutex_unlock (&privdata->lock);
--
1.6.3.3
Re: unionfs: stowing feature, olafBuddenhagen, 2009/08/28