Re: dpkg-source v2
On Mon, 2002-07-22 at 14:13, Colin Walters wrote:
> > What if it used a rule like this:
> >
> > For each tarball:
> > If there is a colon in the tarball's filename, unpack that tarball
> > in package-version/<bit-after-colon>.
> > Else if there is no colon, (and there must only be one tarball with no
> > colon), unpack it in package-version/.
>
> Ok, I agree. I think I know this is the correct answer because it makes
> the code simpler.
Well, I take that back. It definitely makes the unpacking code simpler,
but the packing code becomes more complicated. Currently, the hack for
multiple upstream sources I use is to add a "Source-Style: multi" entry
to the debian/control file. When that entry is present, dpkg-source v2
looks at the subdirectories in the unpacked directory, and figures out
what each of the upstream sources and their versions are from that.
If Source-Style isn't present (or is != "multi"), then dpkg-source just
assumes it's a single upstream source.
For reference, here's what the current multi-upstream layout looks like:
walters@space-ghost> l evolution-1.0.7
total 16
drwxr-sr-x 5 walters src 82 2002-07-21 03:01 .
drwxr-sr-x 3 walters src 4096 2002-07-21 03:02 ..
lrwxr-xr-x 1 walters src 9 2002-07-21 03:01 db -> db-3.1.17
drwxr-sr-x 50 walters src 4096 2002-07-21 03:01 db-3.1.17
drwxr-sr-x 4 walters src 4096 2002-07-16 13:25 debian
lrwxr-xr-x 1 walters src 15 2002-07-21 03:01 evolution -> evolution-1.0.7
drwxr-sr-x 30 walters src 4096 2002-07-21 03:01 evolution-1.0.7
Since this has a standard format, dpkg-source can reliably determine
information from it.
I guess the real problem is that the rest of the debian control files
have no clue about multiple upstream sources. Maybe we could do
something like this in debian/control:
Source: evolution
Build-Depends: baz, bar...
...
Sub-Source: db
Unpack-Directory: db
Sub-Source: foo
Package: evolution
...
And then this would unpack into something that looked like:
evolution-1.0.7/
[evolution files]
db/
[foo files]
But then all sorts of other Debian tools would probably have to be
changed. Maybe that's not a bad thing, but it would significantly
complicate deploying dpkg-source v2.
How about this: we keep the current multi-source layout, except we
switch the directories and the symlinks:
walters@space-ghost> l /src/dpkg-source2/evolution2/evolution-1.0.7
total 16
drwxr-sr-x 5 walters src 82 2002-07-22 22:22 .
drwxr-sr-x 3 walters src 4096 2002-07-22 21:09 ..
drwxr-sr-x 50 walters src 4096 2002-07-22 21:09 db
lrwxr-xr-x 1 walters src 2 2002-07-22 22:22 db-3.1.17 -> db
drwxr-sr-x 4 walters src 4096 2002-07-22 04:35 debian
drwxr-sr-x 30 walters src 4096 2002-07-22 21:09 evolution
lrwxr-xr-x 1 walters src 9 2002-07-22 22:22 evolution-1.0.7 -> evolution
walters@space-ghost> /src/dpkg-source2/evolution2/evolution-1.0.7
That way you wouldn't have to deal with directories being renamed in
CVS. This solution is a bit ugly, but it would probably work.
Actually, a third solution occurs to me; we create another file,
source-control.xml, which is separate from debian/control, and would
allow you to customize all these things. Yeah. Now that I think about
it, this solution is probably the best.
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: