[pacman-dev] [RFC][PATCH] Introduce Include key globing for pacman.conf v4

Marc - A. Dahlhaus [ Administration | Westermann GmbH ] mad at wol.de
Wed Mar 24 10:11:26 CET 2010


Am Sonntag, den 15.11.2009, 20:04 -0600 schrieb Dan McGee:
> On Sun, Nov 15, 2009 at 9:00 AM, Xavier <shiningxc at gmail.com> wrote:
> > On Mon, Oct 12, 2009 at 4:06 AM, Dan McGee <dpmcgee at gmail.com> wrote:
> >> On Fri, Sep 11, 2009 at 5:35 AM, Marc - A. Dahlhaus [ Administration |
> >> Westermann GmbH ] <mad at wol.de> wrote:
> >>> This patch adds the ability to use Include filenames
> >>> containing wildcards.
> >>>
> >>> Added a headercheck for glob.h to configure.ac.
> >>> Added a globfree call to clean up the struct properly.
> >>> Removed tilde expanding.
> >>> Fixed a no debug print on GLOB_NOMATCH condition bug.
> >>>
> >>> Signed-off-by: Marc-A. Dahlhaus <mad at wol.de>
> >>> ---
> >> Xavier, comments here? I kind of dropped this one on the floor, but a
> >> quick review and I think it is good.
> >>
> >
> > I am still not convinced that this is terribly useful. But its like 10
> > lines, so no big deal :)
> > http://mailman.archlinux.org/pipermail/pacman-dev/2009-September/009361.html
> >
> > Like, if it's used for repos, you cannot even control their priority ?
> > Sounds like a show-stopper to me.
> > If not for repos, what else ?
> 
> Yeah, this is an interesting problem. I'm not sure glob() is even
> guaranteed to return results in a known (e.g. alphabetical) order.

The default is to return results in sorted order ("man glob" has all the
details).

We use it for a /etc/pacman/repo.d directory in which we have one
repository definition per file with an ##reponame.conf filename. ##
represent digits from 00 to 99. We can install additional repos with
packages.

> Also, looking at this, if glob returns NOSPACE, we should probably
> pull out the fireworks and blow up- running pacman half-configured
> would be no good.

As this would be an out of memory condition i left the error path as it
was before because i thought that there is error code handling this kind
of situation in place already.

> I'm also thinking of how many reports we are going to get of people
> doing recursive self-includes, but maybe I'm making a problem from
> nothing here.

This kind of error is present without globing also. A solution that
might work would be to restrict the include to eg. go only 5 inclusions
deep.

By the way, sorry for taking so long to respond. Got a bit sidetracked
by my sweet little daughter and some other things ;)

Marc



More information about the pacman-dev mailing list