瀏覽代碼

fix lzma-support detection via xz binary

Clear() only clears a config option, not removing it and an empty
setting still exists. Hence we set the option instead to the xz path
so that the later existance check can find a binary for the test
David Kalnischkies 12 年之前
父節點
當前提交
342df71233
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apt-pkg/aptconfiguration.cc

+ 1 - 1
apt-pkg/aptconfiguration.cc

@@ -453,7 +453,7 @@ void Configuration::setDefaultConfigurationForCompressors() {
 	_config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
 	_config->CndSet("Dir::Bin::xz", "/usr/bin/xz");
 	if (FileExists(_config->FindFile("Dir::Bin::xz")) == true) {
-		_config->Clear("Dir::Bin::lzma");
+		_config->Set("Dir::Bin::lzma", _config->FindFile("Dir::Bin::xz"));
 		_config->Set("APT::Compressor::lzma::Binary", "xz");
 		if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) {
 			_config->Set("APT::Compressor::lzma::CompressArg::", "--format=lzma");