--- apt-0.5.15cnc6/apt-pkg/rpm/rpmpm.cc.selinux 2004-06-28 17:30:52.996194951 -0400 +++ apt-0.5.15cnc6/apt-pkg/rpm/rpmpm.cc 2004-06-28 17:45:12.394104099 -0400 @@ -778,6 +778,21 @@ TS = rpmtransCreateSet(DB, Dir.c_str()); #endif +#if RPM_VERSION >= 0x040300 + if (!(tsFlags & RPMTRANS_FLAG_NOCONTEXTS)) { + rpmsx sx = rpmtsREContext(TS); + if (sx == NULL) { + const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL); + if (fn != NULL && *fn != '\0') { + sx = rpmsxNew(fn); + (void) rpmtsSetREContext(TS, sx); + } + fn = (const char *) _free(fn); + } + sx = rpmsxFree(sx); + } +#endif + if (_config->FindB("RPM::OldPackage", true) || !upgrade.empty()) { probFilter |= RPMPROB_FILTER_OLDPACKAGE; } @@ -921,6 +936,10 @@ Opts->Value == "--excludeconfigs") *tsFlags |= RPMTRANS_FLAG_NOCONFIGS; #endif +#if RPM_VERSION >= 0x040300 + else if (Opts->Value == "--nocontexts") + *tsFlags |= RPMTRANS_FLAG_NOCONTEXTS; +#endif // Problem filter flags else if (Opts->Value == "--replacefiles")