Add support for --nofdigests for rpm >= 4.4.6 which in turn doesn't have
authorPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Tue, 10 Jul 2007 19:15:34 +0000 (22:15 +0300)
committerPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Tue, 10 Jul 2007 19:15:34 +0000 (22:15 +0300)
--nomd5 anymore. Based on patch from Anders F Bj√∂rklund, shuffled around a bit.

apt-pkg/rpm/rpmpm.cc

index a2fc9b7..99de1ee 100644 (file)
@@ -956,10 +956,6 @@ bool pkgRPMLibPM::ParseRpmOpts(const char *Cnf, int *tsFlags, int *probFilter)
         else if (Opts->Value == "--test")
            *tsFlags |= RPMTRANS_FLAG_TEST;
 #if RPM_VERSION >= 0x040000
-#if RPM_VERSION < 0x040406
-        else if (Opts->Value == "--nomd5")
-           *tsFlags |= RPMTRANS_FLAG_NOMD5;
-#endif
         else if (Opts->Value == "--repackage")
            *tsFlags |= RPMTRANS_FLAG_REPACKAGE;
 #endif
@@ -972,6 +968,13 @@ bool pkgRPMLibPM::ParseRpmOpts(const char *Cnf, int *tsFlags, int *probFilter)
         else if (Opts->Value == "--nocontexts")
             *tsFlags |= RPMTRANS_FLAG_NOCONTEXTS;
 #endif
+#if RPM_VERSION >= 0x040406
+         else if (Opts->Value == "--nofdigests")
+            *tsFlags |= RPMTRANS_FLAG_NOFDIGESTS;
+#else
+        else if (Opts->Value == "--nomd5")
+           *tsFlags |= RPMTRANS_FLAG_NOMD5;
+#endif
 
         // Problem filter flags
         else if (Opts->Value == "--replacefiles")