These new enum values might cause "interesting" behaviour in tools not
expecting them – like an old apt would think a Build-Conflicts-Arch is
some sort of Build-Depends – but that can't reasonably be avoided and
effects only packages using B-D/C-A so if there is any breakage the
tools can easily be adapted.
The APT_PKG_RELEASE number is increased so that libapt users can detect
the availability of these new enum fields via:
#if APT_PKG_ABI > 500 || (APT_PKG_ABI == 500 && APT_PKG_RELEASE >= 1)
Closes: #837395
// See also buildlib/libversion.mak
#define APT_PKG_MAJOR 5
#define APT_PKG_MINOR 0
// See also buildlib/libversion.mak
#define APT_PKG_MAJOR 5
#define APT_PKG_MINOR 0
-#define APT_PKG_RELEASE 0
+#define APT_PKG_RELEASE 1
#define APT_PKG_ABI ((APT_PKG_MAJOR * 100) + APT_PKG_MINOR)
#endif
#define APT_PKG_ABI ((APT_PKG_MAJOR * 100) + APT_PKG_MINOR)
#endif
unsigned int I;
const char *Start, *Stop;
BuildDepRec rec;
unsigned int I;
const char *Start, *Stop;
BuildDepRec rec;
- const char *fields[] = {"Build-Depends",
+ const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
"Build-Conflicts",
"Build-Depends-Indep",
"Build-Conflicts",
- "Build-Conflicts-Indep"};
+ "Build-Conflicts-Indep",
+ "Build-Depends-Arch",
+ "Build-Conflicts-Arch"};
- for (I = 0; I < 4; I++)
+ for (I = 0; I < 6; I++)
{
if (ArchOnly && (I == 1 || I == 3))
continue;
{
if (ArchOnly && (I == 1 || I == 3))
continue;
const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
"Build-Conflicts",
const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
"Build-Conflicts",
- "Build-Conflicts-Indep"};
+ "Build-Conflicts-Indep",
+ "Build-Depends-Arch",
+ "Build-Conflicts-Arch"};
if (unlikely(Type >= sizeof(fields)/sizeof(fields[0])))
return "";
return fields[Type];
if (unlikely(Type >= sizeof(fields)/sizeof(fields[0])))
return "";
return fields[Type];
public:
enum BuildDep {BuildDepend=0x0,BuildDependIndep=0x1,
public:
enum BuildDep {BuildDepend=0x0,BuildDependIndep=0x1,
- BuildConflict=0x2,BuildConflictIndep=0x3};
+ BuildConflict=0x2,BuildConflictIndep=0x3,
+ BuildDependArch=0x4,BuildConflictArch=0x5};
for (auto const &dep: Dependencies)
{
std::string * type;
for (auto const &dep: Dependencies)
{
std::string * type;
- if (dep.Type == pkgSrcRecords::Parser::BuildConflict || dep.Type == pkgSrcRecords::Parser::BuildConflictIndep)
+ if (dep.Type == pkgSrcRecords::Parser::BuildConflict ||
+ dep.Type == pkgSrcRecords::Parser::BuildConflictIndep ||
+ dep.Type == pkgSrcRecords::Parser::BuildConflictArch)
type = &conflicts;
else
type = &depends;
type = &conflicts;
else
type = &depends;