quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH] Remember location of patches and series file


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH] Remember location of patches and series file
Date: Sat, 12 Dec 2009 11:00:21 +0100
User-agent: KMail/1.9.1

Hi Martin,

Le jeudi 10 décembre 2009 00:57, Martin Panter a écrit :
> > [adding .pc/quiltrc]
> > > >> And, besides that, quilt documentation says that all it's needed to 
> > > >> share
> >  > >> patches is QUILT_PATCHES (specifically, the series file and the 
> > patches).
> >  > >> Requiring the user to change things in .pc/ would break this
> >  > >> "portability".
> >  > >>
> >  > >> (cfr. quilt.pdf, §5.3)
> 
> The way I would like it to work, nobody would be /required/ to change
> the ".pc" directory. I'd want Quilt to default to using "patches" and
> "patches/series" or whatever it does today, but in particular cases I
> would want to force it use something different, without having to set
> up silly environment variables all the time.

These environment variables don't seem that silly to me ;) But yes,
you must set them all the time, which may not be too convenient.

> > . . .
> > Most QUILT_* variables are not related to the patch series but to the
> >  default behavior of the quilt commands. The only variable (other than
> >  QUILT_PATCHES) that seems relevant here is QUILT_SERIES. Not sure how
> >  often this one is used in practice.
> 
> Here's the actual reason I wanted to specify the patches and series
> file for a specific source tree. My ".pc/quiltrc" file looks like
> this:
> 
> QUILT_SERIES=series-vad-2
> QUILT_PATCHES=../patches

For clarity: what is the above path relative to? From the explanation
below, I guess "relative to the root of the source tree"?

> In my "patches" directory there are a few different series files,
> sharing some patches, having different "forked" versions of other
> patches, and some having extra patches.

So far so good.

> I put the "patches" outside 
> the source tree so that I can easily go and delete it all or extract
> it in a different directory, and share the patches between different
> base versions.

There I don't quite follow you. If you "delete it all", then you lose
.pc/, so you also lose .pc/quiltrc which contained the pointers to
the patches and series file. So you have to set this up again, right?

Same thing for the "extract it in a different directory" case. Unless
your packed source tree _includes_ .pc/quiltrc?

Now I have a question. How does your setup differs from:
* patches/ is a symbolic link to ../patches/
* series is a symbolic link to ../patches/series-vad-2

The above can be implemented without any change to the current
quilt code, and I don't see why it would fail. Am I missing
something?

> I also wondered if there should be such a thing as a "quilt init"
> command, so you could explicitly tell it where the top of the source
> tree is, rather than having Quilt search mindlessly up for a directory
> called ".pc" or "patches". If this "quilt init" command existed, I'd
> expect it to have optional parameters to tell it where "patches" and
> "series" are, or where they should be created.

I admit that a "quilt init" command would be nice to have, even
though we don't want to make its use mandatory. It should be fairly
simple to implement, do you want to give it a try?

> > (...)
> >  I am under the impression that your own proposal is a snake biting
> >  its own tail. You want quiltrc to be looked for in $QUILT_PATCHES but
> >  you also want to be able to redefine QUILT_PATCHES in that
> >  configuration file! Obviously that doesn't work. The extra
> >  configuration file can only go in a well defined place, that is, the
> >  root of the source code or .pc/.
> 
> Yes, "$QUILT_PATCHES/quiltrc" doesn't help if you want quiltrc to
> specify where $QUILT_PATCHES is.
> 
> "./quiltrc" at the top of the source tree is a fairly nice solution,
> but then Quilt would have to search for "quiltrc" files in addition to
> ".pc"/"patches" to find the top of the tree.

For now, I don't think anyone ever proposed to make the location of
.pc configurable, so it would seem reasonable to use  it as the
marker for the root of the source tree. That would be a change from
the current situation (we look for the patches directory).

> >  Anyway, as a summary, I can't see that much difference between your
> >  proposal and Raphael's. He adds separate files to define the location
> >  of the series file and the patches, when you put both defines in a
> >  single file. Other than that it seems to be pretty much the same.
> >
> >  Oh, your proposal can set other quilt settings, but then it becomes
> >  quite confusing what we should do if customer settings disagree with
> >  per-repository settings. There are certainly cases where the user
> >  would want to use the file to set mandatory settings for a project
> >  (for example the refresh options, to enforce a specific format for
> >  the patches) while in other cases the file would only contain
> >  project-specific defaults which should still be overridden by the
> >  user's own settings.  And things get even worse when you consider
> >  that the same QUILT variable can list more than one option, and that
> >  it may be desirable, in some cases, to merge both settings rather
> >  than picking one of them and ignoring the other.
> 
> Because "quiltrc" is a shell script, some of these problems could be
> worked around by running all such files in a specific order and using
> fancy if statements etc.

Not sure if we will ever find an agreement on the "specific order".
That's the problem. Anyway this is beyond the problem Raphael intends
to solve, so this discussion may be better left for later.

> >  So in the end, the problem you are trying to solve is much more
> >  complex than what Raphael wants to implement.

-- 
Jean Delvare
Suse L3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]