From: David Kalnischkies <kalnischkies@gmail.com>
Date: Tue, 22 Feb 2011 14:05:01 +0000 (+0100)
Subject: * ftparchive/multicompress.cc, apt-inst/deb/debfile.cc:
X-Git-Tag: 0.8.12~4^2~13
X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/b7080ced608f012aee2566afc724c3727e75fc1b

* ftparchive/multicompress.cc, apt-inst/deb/debfile.cc:
  - support xz compressor to create xz-compressed Indexes and be able
    to open data.tar.xz files
* ftparchive/writer.cc:
  - include xz-compressed Packages and Sources files in Release file
---

b7080ced608f012aee2566afc724c3727e75fc1b
diff --cc debian/changelog
index bbb973b8f,ebea1dac8..92ae058c5
--- a/debian/changelog
+++ b/debian/changelog
@@@ -3,210 -8,18 +3,214 @@@ apt (0.8.11.6) UNRELEASED; urgency=lo
    [ Christian Perrier ]
    * Fix error in French translation of manpages (apt_preferences(5)).
      Merci, Rémi Vanicat. Closes: #613689
 +  * Complete French manpage translation
  
    [ David Kalnischkies ]
 -  * apt-pkg/contrib/fileutl.cc:
 -    - reorder the loaded filesize bytes for big endian (Closes: #612986)
 -      Thanks to Jörg Sommer for the detailed analyse!
+   * ftparchive/multicompress.cc, apt-inst/deb/debfile.cc:
+     - support xz compressor to create xz-compressed Indexes and be able
+       to open data.tar.xz files
    * ftparchive/writer.cc:
 +    - ensure that Date and Valid-Until time strings are not localised
 +    - add options to disable specific checksums for Indexes
+     - include xz-compressed Packages and Sources files in Release file
  
-  -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 22 Feb 2011 14:48:21 +0100
 - -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 22 Feb 2011 14:51:32 +0100
++ -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 22 Feb 2011 14:59:51 +0100
 +
 +apt (0.8.11.5) unstable; urgency=low
 +
 +  [ Christian Perrier ]
 +  * Add missing dot in French translation of manpages. Merci, Olivier
 +    Humbert.
 +  * French translation update
 +  * French manpages translation update
 +
 +  [ David Kalnischkies ]
 +  * apt-pkg/depcache.cc:
 +    - party revert fix in 0.8.11.2 which marked all packages as manual
 +      installed if the FromUser bit is set in the MarkInstall call.
 +      The default for this bit is true and aptitude depends on the old
 +      behavior so the package is only marked as manual if its not marked
 +      ("old" behavior) or if automatic installation is enabled - which
 +      aptitude disables always (see also #613775)
 +
 + -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 17 Feb 2011 15:16:31 +0100
 +
 +apt (0.8.11.4) unstable; urgency=low
 +
 +  [ David Kalnischkies ]
 +  * apt-pkg/contrib/error.cc:
 +    - ensure that va_list is not invalid in second try
 +  * cmdline/apt-get.cc:
 +    - don't remove new dependencies of garbage packages (Closes: #613420)
 +  
 +  [ Michael Vogt ]
 +  * test/integration/*
 +    - fix dashish in the integration tests
 +
 + -- Michael Vogt <mvo@debian.org>  Wed, 16 Feb 2011 14:36:03 +0100
 +
 +apt (0.8.11.3) unstable; urgency=low
 +
 +  * apt-pkg/contrib/fileutl.cc:
 +    - really detect bigendian machines by including config.h,
 +      so we can really (Closes: #612986)
 +  * apt-pkg/contrib/mmap.cc:
 +    - Base has as 'valid' failure states 0 and -1 so add a simple
 +      validData method to check for failure states
 +
 + -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 14 Feb 2011 16:58:03 +0100
 +
 +apt (0.8.11.2) unstable; urgency=low
 +
 +  [ Michael Vogt ]
 +  * merged lp:~evfool/apt/fix641673:
 +    - String-fix in the source and the translations for the grammatical 
 +      mistake reported in bug LP: #641673, thanks to Robert Roth
 +  * merged lp:~evfool/apt/fix418552:
 +    - Grammar fix for bug LP: #418552, thanks to Robert Roth
 +  
 +  [ David Kalnischkies ]
 +  * cmdline/apt-get.cc:
 +    - add --install-suggests option (Closes: #473089)
 +  * apt-pkg/depcache.cc:
 +    - mark a package which was requested to be installed on commandline
 +      always as manual regardless if it is already marked or not as the
 +      marker could be lost later by the removal of rdepends (Closes: #612557)
 +  * methods/rred.cc:
 +    - read patch into MMap only if we work on uncompressed patches
 +    - update size of dynamic MMap as we write in from the outside
 +  * apt-pkg/contrib/mmap.cc:
 +    - do not try to free the mapping if its is unset
 +  * apt-pkg/contrib/fileutl.cc:
 +    - reorder the loaded filesize bytes for big endian (Closes: #612986)
 +      Thanks to Jörg Sommer for the detailed analyse!
 +
 + -- Michael Vogt <mvo@debian.org>  Mon, 14 Feb 2011 12:07:18 +0100
 +
 +apt (0.8.11.1) unstable; urgency=low
 +
 +  [ Stefan Lippers-Hollmann ]
 +  * cmdline/apt-key:
 +    - fix root test which prevented setting of trustdb-name
 +      which lets gpg fail if it adds/remove keys from trusted.gpg
 +      as it tries to open the (maybe) not existent /root/.gnupg
 +
 +  [ David Kalnischkies ]
 +  * debian/apt.symbols:
 +    - add more arch dependent symbols
 +
 + -- Michael Vogt <mvo@debian.org>  Wed, 09 Feb 2011 17:49:59 +0100
 +
 +apt (0.8.11) unstable; urgency=low
 +
 +  [ David Kalnischkies ]
 +  * apt-pkg/depcache.cc:
 +    - add SetCandidateRelease() to set a candidate version and
 +      the candidates of dependencies if needed to a specified
 +      release (Closes: #572709)
 +    - allow conflicts in the same group again (Closes: #612099)
 +  * cmdline/apt-get.cc:
 +    - if --print-uris is used don't setup downloader as we don't need
 +      progress, lock nor the directories it would create otherwise
 +    - show dependencies of essential packages which are going to remove
 +      only if they cause the remove of this essential (Closes: #601961)
 +    - keep not installed garbage packages uninstalled instead of showing
 +      in the autoremove section and installing those (Closes: #604222)
 +    - change pkg/release behavior to use the new SetCandidateRelease
 +      so installing packages from experimental or backports is easier
 +    - really do not show packages in the extra section if they were
 +      requested on the commandline, e.g. with a modifier (Closes: #184730)
 +    - always do removes first and set not installed remove packages
 +      on hold to prevent temporary installation later (Closes: #549968)
 +  * debian/control:
 +    - add Vcs-Browser now that loggerhead works again (Closes: #511168)
 +    - depend on debhelper 7 to raise compat level
 +    - depend on dpkg-dev (>= 1.15.8) to have c++ symbol mangling
 +  * apt-pkg/contrib/fileutl.cc:
 +    - add a RealFileExists method and check that your configuration files
 +      are real files to avoid endless loops if not (Closes: #604401)
 +    - ignore non-regular files in GetListOfFilesInDir (Closes: #594694)
 +  * apt-pkg/contrib/weakptr.h:
 +    - include stddefs.h to fix compile error (undefined NULL) with gcc-4.6
 +  * methods/https.cc:
 +    - fix CURLOPT_SSL_VERIFYHOST by really passing 2 to it if enabled
 +  * deb/dpkgpm.cc:
 +    - fix popen/fclose mismatch reported by cppcheck. Thanks to Petter
 +      Reinholdtsen for report and patch! (Closes: #607803)
 +  * doc/apt.conf.5.xml:
 +    - fix multipl{y,e} spelling error reported by Jakub Wilk (Closes: #607636)
 +  * apt-inst/contrib/extracttar.cc:
 +    - let apt-utils work with encoded tar headers if uid/gid are large.
 +      Thanks to Nobuhiro Hayashi for the patch! (Closes: #330162)
 +  * apt-pkg/cacheiterator.h:
 +    - do not segfault if cache is not build (Closes: #254770)
 +  * doc/apt-get.8.xml:
 +    - remove duplicated mentioning of --install-recommends
 +  * doc/sources.list.5.xml:
 +    - remove obsolete references to non-us (Closes: #594495)
 +    - a notice is printed for ignored files (Closes: #597615)
 +  * debian/rules:
 +    - use -- instead of deprecated -u for dh_gencontrol
 +    - remove shlibs.local creation and usage
 +    - show differences in the symbol files, but never fail
 +  * pre-build.sh:
 +    - remove as it is not needed for a working 'bzr bd'
 +  * debian/{apt,apt-utils}.symbols:
 +    - ship experimental unmangled c++ symbol files
 +  * methods/rred.cc:
 +    - operate optional on gzip compressed pdiffs
 +  * apt-pkg/acquire-item.cc:
 +    - don't uncompress downloaded pdiff files before feeding it to rred
 +    - try downloading clearsigned InRelease before trying Release.gpg
 +    - change the internal handling of Extensions in pkgAcqIndex
 +    - add a special uncompressed compression type to prefer those files
 +    - download and use i18n/Index to choose which Translations to download
 +  * cmdline/apt-key:
 +    - don't set trustdb-name as non-root so 'list' and 'finger'
 +      can be used without being root (Closes: #393005, #592107)
 +  * apt-pkg/deb/deblistparser.cc:
 +    - rewrite LoadReleaseInfo to cope with clearsigned Releasefiles
 +  * ftparchive/writer.cc:
 +    - add config option to search for more patterns in release command
 +    - include Index files by default in the Release file
 +  * methods/{gzip,bzip}.cc:
 +    - print a good error message if FileSize() is zero
 +  * apt-pkg/aptconfiguration.cc:
 +    - remove the inbuilt Translation files whitelist
 +  * cmdline/apt-cache.cc:
 +    - remove not implemented 'apt-cache add' command
 +  * doc/apt-cache.8.xml:
 +    - describe reality as apt-cache just queries and doesn't manipulate
 +      the caches. Thanks to Enrico Zini for spotting it! (Closes: #612009)
 +  * apt-pkg/algorithms.cc:
 +    - mark pseudo packages of installed all packages as configured
 +      in the simulation as we don't call configure for these packages
 +  * apt-pkg/pkgcachegen.cc:
 +    - in multiarch, let :all packages conflict with :any packages
 +      with a different version to be sure
 +  * apt-pkg/contrib/error.cc:
 +    - remove 400 char size limit of error messages (LP: #365611)
 +
 +  [ Michael Vogt ]
 +  * methods/http.cc:
 +    - do not hang if Acquire::http::ProxyAutoDetect can not be
 +      executed or returns no data (LP: #654393)
 +  * debian/apt.conf.autoremove:
 +    - never autoremove the GNU/Hurd kernel (closes: #588423), thanks
 +      to Guillem Jover
 +  * apt-pkg/cdrom.cc, apt-pkg/init.cc, methods/cdrom.cc:
 +    - use /media/cdrom as default mountoint (closes: #611569)
 +  * cmdline/apt-get.cc:
 +    - add apt-get changelog (closes: #526990)
 +    - add apt-get download (closes: #82738)
 +
 +  [ Martin Pitt ]
 +  * test/integration/test-compressed-indexes, test/test-indexes.sh:
 +    - Explicitly disable compressed indexes at the start. This ensures that we
 +      will actually test uncompressed indexes regardless of the internal
 +      default value of Acquire::GzipIndexes.
 +
 + -- Michael Vogt <mvo@debian.org>  Tue, 08 Feb 2011 12:58:12 +0100
  
  apt (0.8.10.3) unstable; urgency=low
  
diff --cc ftparchive/writer.cc
index d3a19ca28,086c44390..9462ebe27
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@@ -924,21 -907,18 +924,23 @@@ bool ContentsWriter::ReadFromPkgs(strin
  /* */
  ReleaseWriter::ReleaseWriter(string const &DB)
  {
 -   AddPattern("Packages");
 -   AddPattern("Packages.gz");
 -   AddPattern("Packages.bz2");
 -   AddPattern("Packages.lzma");
 -   AddPattern("Packages.xz");
 -   AddPattern("Sources");
 -   AddPattern("Sources.gz");
 -   AddPattern("Sources.bz2");
 -   AddPattern("Sources.lzma");
 -   AddPattern("Sources.xz");
 -   AddPattern("Release");
 -   AddPattern("md5sum.txt");
 +   if (_config->FindB("APT::FTPArchive::Release::Default-Patterns", true) == true)
 +   {
 +      AddPattern("Packages");
 +      AddPattern("Packages.gz");
 +      AddPattern("Packages.bz2");
 +      AddPattern("Packages.lzma");
++      AddPattern("Packages.xz");
 +      AddPattern("Sources");
 +      AddPattern("Sources.gz");
 +      AddPattern("Sources.bz2");
 +      AddPattern("Sources.lzma");
++      AddPattern("Sources.xz");
 +      AddPattern("Release");
 +      AddPattern("Index");
 +      AddPattern("md5sum.txt");
 +   }
 +   AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
  
     Output = stdout;
     time_t const now = time(NULL);
diff --cc test/integration/framework
index 7e1d25e61,6545cf3ce..71e7e476c
--- a/test/integration/framework
+++ b/test/integration/framework
@@@ -328,11 -251,9 +328,11 @@@ createaptftparchiveconfig() 
  	echo -n '";
  };
  Default {
- 	Packages::Compress ". gzip bzip2 lzma";
- 	Sources::Compress ". gzip bzip2 lzma";
- 	Contents::Compress ". gzip bzip2 lzma";
- 	Translation::Compress ". gzip bzip2 lzma";
+ 	Packages::Compress ". gzip bzip2 lzma xz";
+ 	Sources::Compress ". gzip bzip2 lzma xz";
+ 	Contents::Compress ". gzip bzip2 lzma xz";
++	Translation::Compress ". gzip bzip2 lzma xz";
 +	LongDescription "false";
  };
  TreeDefault {
  	Directory "pool/";
@@@ -433,40 -326,27 +433,41 @@@ buildaptarchivefromincoming() 
  
  buildaptarchivefromfiles() {
  	msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on prebuild files…"
 -	cd aptarchive
 -	if [ -f Packages ]; then
 -		msgninfo "\tPackages file… "
 -		cat Packages | gzip > Packages.gz
 -		cat Packages | bzip2 > Packages.bz2
 -		cat Packages | lzma > Packages.lzma
 -		cat Packages | xz > Packages.xz
 +	find aptarchive -name 'Packages' -o -name 'Sources' | while read line; do
 +		msgninfo "\t${line} file… "
 +		cat ${line} | gzip > ${line}.gz
 +		cat ${line} | bzip2 > ${line}.bz2
 +		cat ${line} | lzma > ${line}.lzma
++		cat ${line} | xz > ${line}.xz
  		msgdone "info"
 +	done
 +	generatereleasefiles
 +}
 +
 +generatereleasefiles() {
 +	msgninfo "\tGenerate Release files… "
 +	local DATE="${1:-now}"
 +	if [ -e aptarchive/dists ]; then
 +		for dir in $(find ./aptarchive/dists -mindepth 3 -maxdepth 3 -type d -name 'i18n'); do
 +			aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
 +		done
 +		for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
 +			local CODENAME="$(echo "$dir" | cut -d'/' -f 4)"
 +			aptftparchive -qq release $dir -o APT::FTPArchive::Release::Suite="${CODENAME}" -o APT::FTPArchive::Release::Codename="${CODENAME}" | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
 +			if [ "$CODENAME" = "experimental" -o "$CODENAME" = "experimental2" ]; then
 +				sed -i '/^Date: / a\
 +NotAutomatic: yes' $dir/Release
 +			fi
 +		done
 +	else
 +		aptftparchive -qq release ./aptarchive | sed -e '/0 Release$/ d' > aptarchive/Release # remove the self reference
  	fi
 -	if [ -f Sources ]; then
 -		msgninfo "\tSources file… "
 -		cat Sources | gzip > Sources.gz
 -		cat Sources | bzip2 > Sources.bz2
 -		cat Sources | lzma > Sources.lzma
 -		cat Sources | xz > Sources.xz
 -		msgdone "info"
 +	if [ "$DATE" != "now" ]; then
 +		for release in $(find ./aptarchive -name 'Release'); do
 +			touch -d "$1" $release
 +		done
  	fi
 -	msgninfo "\tRelease file… "
 -	aptftparchive -qq release . | sed -e '/0 Release$/ d' > Release # remove the self reference
  	msgdone "info"
 -	cd ..
  }
  
  setupdistsaptarchive() {