Bug#661537: Support for staged/bootstrap builds to break cyclic build-dependencies
David Kalnischkies <kalnischkies+debian@gmail.com> wrote:
> On Mon, Feb 27, 2012 at 20:00, Wookey <wookey@debian.org> wrote:
> > This little patch allows Build-Depends-Stage1 to be added to package
> > control files, which is the proposed solution to this issue.
> Is the discussion on that feature completed?
> I vaguely recall "complains" about the naming and such stuff.
> (Just want to avoid that this ends in a disaster like multiarchâ¦)
I beleive so, but I've been planning to confirm on -devel for ages.
It's really urgent now, so mail is in progress.
> Attached was a patch for dpkg and the wiki also only mentions one
> for dpkg. If there is one for APT and the feature is frozen i am sure
> Michael will be fine with pushing it for wheezy.
Sorry - cock up. Attached is the patch I meant to send, now updated
to include -stage2 fields too and for current apt.
I don't really understand what the 'Type' thing is about - is it just
a field index number or something else?
> I am not sure through how apt is supposed to be useful in this context
> as it is high in the stack (in terms of bootstrapping), but i need to confess
> that i consider bootstrapping "magic" so far, so i am properly wrong.
The existing patch just stops apt complaining about these new fields
it's never heard of.
I have actually realised that more work is needed if we want apt-get
build-dep to do the right thing when bootstrapping. A clue as to where
in the code to look to make that change would be useful. I'm sending
mail to the deity list about that.
Wookey
diff -urN apt-0.9.2.original/apt-pkg/deb/debsrcrecords.cc apt-0.9.2/apt-pkg/deb/debsrcrecords.cc
--- apt-0.9.2.original/apt-pkg/deb/debsrcrecords.cc 2012-04-16 18:23:05.000000000 +0100
+++ apt-0.9.2/apt-pkg/deb/debsrcrecords.cc 2012-05-10 03:49:45.864895400 +0100
@@ -74,12 +74,14 @@
BuildDepRec rec;
const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
+ "Build-Depends-Stage1",
+ "Build-Depends-Stage2",
"Build-Conflicts",
"Build-Conflicts-Indep"};
BuildDeps.clear();
- for (I = 0; I < 4; I++)
+ for (I = 0; I < 6; I++)
{
if (ArchOnly && (I == 1 || I == 3))
continue;
diff -urN apt-0.9.2.original/apt-pkg/srcrecords.cc apt-0.9.2/apt-pkg/srcrecords.cc
--- apt-0.9.2.original/apt-pkg/srcrecords.cc 2012-04-16 18:23:05.000000000 +0100
+++ apt-0.9.2/apt-pkg/srcrecords.cc 2012-05-10 03:54:08.282196637 +0100
@@ -123,9 +123,11 @@
{
const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
+ "Build-Depends-Stage1",
+ "Build-Depends-Stage2",
"Build-Conflicts",
"Build-Conflicts-Indep"};
- if (Type < 4)
+ if (Type < 6)
return fields[Type];
else
return "";
diff -urN apt-0.9.2.original/apt-pkg/tagfile.cc apt-0.9.2/apt-pkg/tagfile.cc
--- apt-0.9.2.original/apt-pkg/tagfile.cc 2012-04-16 18:23:05.000000000 +0100
+++ apt-0.9.2/apt-pkg/tagfile.cc 2012-05-10 03:33:38.116096575 +0100
@@ -498,6 +498,8 @@
"Original-Maintainer",
"Build-Depends",
"Build-Depends-Indep",
+ "Build-Depends-Stage1",
+ "Build-Depends-Stage2",
"Build-Conflicts",
"Build-Conflicts-Indep",
"Architecture",
Reply to: