FYI I committed the following patch to apt cvs to add an --arch-only option for 'apt-get build-dep'
there's a small change to one of the virtual functions in the srcrecord class. i've bumped the so number as well for this. randolph -- Debian Developer <[EMAIL PROTECTED]> http://www.TauSq.org/ ? apt.diff Index: apt-pkg/init.h =================================================================== RCS file: /cvs/deity/apt/apt-pkg/init.h,v retrieving revision 1.8 diff -u -r1.8 init.h --- apt-pkg/init.h 2001/04/22 05:42:52 1.8 +++ apt-pkg/init.h 2001/11/04 17:08:01 @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 3 -#define APT_PKG_MINOR 2 +#define APT_PKG_MINOR 3 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; Index: apt-pkg/makefile =================================================================== RCS file: /cvs/deity/apt/apt-pkg/makefile,v retrieving revision 1.34 diff -u -r1.34 makefile --- apt-pkg/makefile 2001/04/22 05:42:52 1.34 +++ apt-pkg/makefile 2001/11/04 17:08:01 @@ -12,7 +12,7 @@ # The library name, don't forget to update init.h LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) -MAJOR=3.2 +MAJOR=3.3 MINOR=0 SLIBS=$(PTHREADLIB) Index: apt-pkg/srcrecords.h =================================================================== RCS file: /cvs/deity/apt/apt-pkg/srcrecords.h,v retrieving revision 1.7 diff -u -r1.7 srcrecords.h --- apt-pkg/srcrecords.h 2001/05/07 04:24:08 1.7 +++ apt-pkg/srcrecords.h 2001/11/04 17:08:01 @@ -72,7 +72,7 @@ virtual string Section() const = 0; virtual const char **Binaries() = 0; // Ownership does not transfer - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps) = 0; + virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool ArchOnly) = 0; static const char *BuildDepType(unsigned char Type); virtual bool Files(vector<pkgSrcRecords::File> &F) = 0; Index: apt-pkg/deb/debsrcrecords.cc =================================================================== RCS file: /cvs/deity/apt/apt-pkg/deb/debsrcrecords.cc,v retrieving revision 1.4 diff -u -r1.4 debsrcrecords.cc --- apt-pkg/deb/debsrcrecords.cc 2001/02/20 07:03:17 1.4 +++ apt-pkg/deb/debsrcrecords.cc 2001/11/04 17:08:01 @@ -47,7 +47,7 @@ package/version records representing the build dependency. The returned array need not be freed and will be reused by the next call to this function */ -bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps) +bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, bool ArchOnly) { unsigned int I; const char *Start, *Stop; @@ -61,6 +61,9 @@ for (I = 0; I < 4; I++) { + if (ArchOnly && (I == 1 || I == 3)) + continue; + if (Sect.Find(fields[I], Start, Stop) == false) continue; Index: apt-pkg/deb/debsrcrecords.h =================================================================== RCS file: /cvs/deity/apt/apt-pkg/deb/debsrcrecords.h,v retrieving revision 1.6 diff -u -r1.6 debsrcrecords.h --- apt-pkg/deb/debsrcrecords.h 2001/02/20 07:03:17 1.6 +++ apt-pkg/deb/debsrcrecords.h 2001/11/04 17:08:02 @@ -39,7 +39,7 @@ virtual string Maintainer() const {return Sect.FindS("Maintainer");}; virtual string Section() const {return Sect.FindS("Section");}; virtual const char **Binaries(); - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps); + virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool ArchOnly); virtual unsigned long Offset() {return iOffset;}; virtual string AsStr() { Index: cmdline/apt-get.cc =================================================================== RCS file: /cvs/deity/apt/cmdline/apt-get.cc,v retrieving revision 1.110 diff -u -r1.110 apt-get.cc --- cmdline/apt-get.cc 2001/10/02 03:16:28 1.110 +++ cmdline/apt-get.cc 2001/11/04 17:08:02 @@ -1860,7 +1860,7 @@ // Process the build-dependencies vector<pkgSrcRecords::Parser::BuildDepRec> BuildDeps; - if (Last->BuildDepends(BuildDeps) == false) + if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only",false)) == false) return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str()); if (BuildDeps.size() == 0) @@ -2119,6 +2119,7 @@ {0,"trivial-only","APT::Get::Trivial-Only",0}, {0,"remove","APT::Get::Remove",0}, {0,"only-source","APT::Get::Only-Source",0}, + {0,"arch-only","APT::Get::Arch-Only",0}, {'c',"config-file",0,CommandLine::ConfigFile}, {'o',"option",0,CommandLine::ArbItem}, {0,0,0,0}}; Index: doc/apt-get.8.sgml =================================================================== RCS file: /cvs/deity/apt/doc/apt-get.8.sgml,v retrieving revision 1.7 diff -u -r1.7 apt-get.8.sgml --- doc/apt-get.8.sgml 2001/07/08 04:29:40 1.7 +++ doc/apt-get.8.sgml 2001/11/04 17:08:02 @@ -397,6 +397,12 @@ <literal/APT::Get::Tar-Only/ </VarListEntry> + <VarListEntry><term><option/--arch-only/</> + <ListItem><Para> + Only process architecture-dependent build-dependencies. + Configuration Item: <literal/APT::Get::Arch-Only/ + </VarListEntry> + &apt-commonoptions; </VariableList>

