--- apt-0.5.15lorg3.2-hacking/configure.in.repomd 2006-11-20 15:02:26.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/configure.in 2006-11-20 15:03:23.000000000 +0100 @@ -92,12 +92,23 @@ AC_SUBST(RPMLIBS) fi -dnl repomd support needs libxml2, not sure about the minimal version - I've -dnl only tested it with 2.6.20 -## xmlReadFile is not available before 2.6.0 -PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6]) -RPMLIBS="$LIBXML2_LIBS $RPMLIBS" -CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" +dnl Repomd support +AC_MSG_CHECKING(for --disable-repomd) +AC_ARG_ENABLE([repomd], + AS_HELP_STRING([--disable-repomd], + [disable repomd support]), + [enable_repomd="$enableval"],[enable_repomd="yes"]) +if test "$enable_repomd" != "no"; then + AC_MSG_RESULT(no) + AC_DEFINE(WITH_REPOMD, 1, [Define if you want to enable repomd support]) + ## xmlReadFile is not available before 2.6.0 + PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6]) + RPMLIBS="$LIBXML2_LIBS $RPMLIBS" + CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" +else + AC_MSG_RESULT(yes) +fi +AM_CONDITIONAL(WITH_REPOMD, test "$enable_repomd" != "no") dnl Can we use g++ hash_map? AH_TEMPLATE(WITH_GNU_HASH_MAP, --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmlistparser.cc.repomd 2006-11-21 09:34:12.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmlistparser.cc 2006-11-21 09:34:47.000000000 +0100 @@ -542,6 +542,7 @@ FromPkgI->CurrentState = 0; } +#ifdef WITH_REPOMD xmlNode *rpmRepomdParser::FindNode(xmlNode *n, const string Name) { for (n = n->children; n; n = n->next) { @@ -611,6 +612,7 @@ xmlFreeDoc(RepoMD); return true; } +#endif /* WITH_REPOMD */ #endif /* HAVE_RPM */ --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmhandler.cc.repomd 2006-11-20 15:07:30.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmhandler.cc 2006-11-20 15:10:10.000000000 +0100 @@ -26,9 +26,11 @@ #include #include +#ifdef WITH_REPOMD #include #include #include +#endif #include @@ -898,6 +900,7 @@ } #endif +#ifdef WITH_REPOMD RPMRepomdHandler::RPMRepomdHandler(string File, bool useFilelist) { WithFilelist = useFilelist; @@ -1383,5 +1386,6 @@ xmlFreeTextReader(Filelist); } } +#endif /* WITH_REPOMD */ // vim:sts=3:sw=3 --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/repomd.cc.repomd 2006-11-20 15:04:35.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/repomd.cc 2006-11-20 15:05:26.000000000 +0100 @@ -14,6 +14,10 @@ #pragma implementation "apt-pkg/repomd.h" #endif +#include + +#ifdef WITH_REPOMD + #include #include #include @@ -93,4 +97,6 @@ return true; } +#endif /* WITH_REPOMD */ + // vim:sts=3:sw=3 --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmhandler.h.repomd 2006-11-20 15:10:25.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmhandler.h 2006-11-20 15:11:34.000000000 +0100 @@ -11,9 +11,11 @@ #define PKGLIB_RPMHANDLER_H #include +#ifdef WITH_REPOMD #include #include #include +#endif #include #include @@ -219,6 +221,7 @@ virtual ~RPMDirHandler(); }; +#ifdef WITH_REPOMD class RPMRepomdHandler : public RPMHandler { @@ -275,5 +278,6 @@ RPMRepomdHandler(string File, bool useFilelist); virtual ~RPMRepomdHandler(); }; +#endif /* WITH_REPOMD */ #endif --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmlistparser.h.repomd 2006-11-21 09:34:54.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmlistparser.h 2006-11-21 09:35:45.000000000 +0100 @@ -16,8 +16,10 @@ #include #include #include +#ifdef WITH_REPOMD #include #include +#endif /* WITH_REPOMD */ #include #include @@ -90,6 +92,7 @@ ~rpmListParser(); }; +#ifdef WITH_REPOMD class rpmRepomdParser : public rpmListParser { protected: @@ -107,5 +110,6 @@ rpmRepomdParser(RPMHandler *Handler) : rpmListParser(Handler) {}; }; +#endif /* WITH_REPOMD */ #endif --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmindexfile.cc.repomd 2006-11-20 15:11:55.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmindexfile.cc 2006-11-20 15:15:59.000000000 +0100 @@ -536,6 +536,7 @@ return URI; } +#ifdef WITH_REPOMD string rpmRepomdIndex::ArchiveURI(string File) const { string Res; @@ -809,6 +810,7 @@ Res += " (" + File.Type + ")"; return Res; } +#endif /* WITH_REPOMD */ // DatabaseIndex::rpmDatabaseIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -1032,6 +1034,7 @@ } }; +#ifdef WITH_REPOMD class rpmSLTypeRepomd : public rpmSLTypeGen { public: @@ -1118,13 +1121,16 @@ Label = "RepoMD src tree"; } }; +#endif /* WITH_REPOMD */ rpmSLTypeRpm _apt_rpmType; rpmSLTypeSrpm _apt_rpmSrcType; rpmSLTypeRpmDir _apt_rpmDirType; rpmSLTypeSrpmDir _apt_rpmSrcDirType; +#ifdef WITH_REPOMD rpmSLTypeRepomd _apt_repomdType; rpmSLTypeRepomdSrc _apt_repomdSrcType; +#endif /* WITH_REPOMD */ /*}}}*/ // Index File types for rpm /*{{{*/ class rpmIFTypeSrc : public pkgIndexFile::Type @@ -1185,6 +1191,7 @@ { return &_apt_DB; } +#ifdef WITH_REPOMD const pkgIndexFile::Type *rpmRepomdPkgIndex::GetType() const { return &_apt_Pkg; @@ -1193,7 +1200,7 @@ { return &_apt_Src; } - +#endif */ WITH_REPOMD */ /*}}}*/ #endif /* HAVE_RPM */ --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmrecords.cc.repomd 2006-11-21 09:36:10.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmrecords.cc 2006-11-21 09:37:46.000000000 +0100 @@ -43,8 +43,10 @@ Handler = new RPMDirHandler(File); else if (flExtension(File) == "rpm") Handler = new RPMSingleFileHandler(File); +#ifdef WITH_REPOMD else if (flExtension(File) == "xml") Handler = new RPMRepomdHandler(File, false); +#endif /* WITH_REPOMD */ else Handler = new RPMFileHandler(File); } --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/repomd.h.repomd 2006-11-20 15:06:05.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/repomd.h 2006-11-20 15:07:18.000000000 +0100 @@ -7,9 +7,12 @@ #pragma interface "apt-pkg/repomd.h" #endif +#include + +#ifdef WITH_REPOMD + #include #include -#include using namespace std; @@ -36,6 +39,8 @@ }; +#endif /* WITH_REPOMD */ + #endif // vim:sts=3:sw=3 --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmindexfile.h.repomd 2006-11-21 10:01:17.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmindexfile.h 2006-11-21 10:01:51.000000000 +0100 @@ -277,6 +277,7 @@ rpmSrcListIndex("", "", "", NULL), FilePath(File) {}; }; +#ifdef WITH_REPOMD class rpmRepomdIndex : public rpmIndexFile { protected: @@ -372,4 +373,6 @@ rpmRepomdIndex(URI,Dist,Section,Repository) {}; }; +#endif /* WITH_REPOMD */ + #endif --- apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmsrcrecords.cc.repomd 2006-11-21 09:37:52.000000000 +0100 +++ apt-0.5.15lorg3.2-hacking/apt-pkg/rpm/rpmsrcrecords.cc 2006-11-21 09:39:01.000000000 +0100 @@ -40,8 +40,10 @@ Handler = new RPMDirHandler(File); else if (flExtension(File) == "rpm") Handler = new RPMSingleFileHandler(File); +#ifdef WITH_REPOMD else if (flExtension(File) == "xml") Handler = new RPMRepomdHandler(File, false); +#endif /* WITH_REPOMD */ else Handler = new RPMFileHandler(File); }