Initialize history_out always with NULL so apt will not segfault later
in the event of a failure in OpenLog() (which will happen if called with
Debug::NoLocking as user)
Userinfo is urlencoded in URIs (RFC 3986)
Thanks to Jean-Baptiste Lallement for spotting and fixing it!
* apt-pkg/contrib/strutl.cc:
- always escape '%' (LP: #130289) (Closes: #500560)
- unescape '%' sequence only if followed by 2 hex digit
- username/password are urlencoded in proxy string (RFC 3986)
replace every call to toupper with one to our own tolower_ascii
This sounds like a premature optimization and since Mr. Knuth we all
know that they are the root of all evil - but, and here it starts to be
interesting: As the tolower_ascii method is by far the most called
method we have (~60 Mio. times) and as we compare only strings containing
ascii characters (package names, configuration options) using our own
method reduces execution time of APT by 4% plus it avoids that the
locale settings can influence us.
Switch the TranslationWriter to use MultiCompress to be able to generate
the compressed files as we want them and to prevent the file to be
replaced without a reason which could save us from steady redownloads
of a file with the same content.
Inclusion of Long Descriptions in the Packages files can be set now
also in TreeDefaults and Tree to support generation of archives which
should support and which shouldn't support splitted out Translation-en
files in the same run.
* ftparchive/writer.cc:
- write LongDescriptions if they shouldn't be included in Packages
file into i18n/Translation-en by default.
It is ensured that each package+description is listed only ones in the
Translation file even if we generate multiple Packages file in one run.
The file is only generated in "generate" - the simple file commands
can't create it by now. Also, the LongDescription is currently a
global setting, so generating archives with and without LongDescriptions
in the Packages file in the same run are currently not possible.
Add with pkgCacheGen::Essential a way to control which packages get the
essential flag:
* native is the default and will only mark packages of the main arch
* all will mark all packages which have these flag in Packages
* none will obviously do the opposite
* installed will only mark packages which are installed as essential,
so it will behave in the same way as dpkg does it.
It is mostly needed sometimes for debugging but some users with special
needs might like to switch the mode as well under the expense to be
on their own…
merge MultiArch-ABI. We don't support MultiArch yet (as most other tools),
but we support the usage of the new ABI so libapt users
can start to prepare for MultiArch (Closes: #536029)
Readd the FindPkg() method implementation used in the singleArch days to
use it as a fallback if multiarch is not enabled. The effect is barly
noticeable but SingleArch is the realworld scenario.
Fix a segfault in the version merger introduced in the previous patch:
As we skip now versions with a different hash we will have situations
in which the version is equal but the hash different causing to check
the next version, but as this version was the last one the version
iterator is invalid then the merger wants to add further information.
* apt-pkg/pkgcachegen.cc:
- merge versions correctly even if multiple different versions
with the same version number are available.
Thanks to Magnus Holmgren for the patch! (Closes: #351056)
merge with debian-sid, update-po for manpages and fix a few more
typos in doc/po/es.po to generate the manpages properly.
[ Christian Perrier ]
* German translation update. Closes: #571037
* Spanish manpages translation update. Closes: #573293
[ Julian Andres Klode ]
* cmdline/apt-mark:
- Use the new python-apt API (and conflict with python-apt << 0.7.93.2).
* apt-inst/contrib/arfile.h:
- Add public ARArchive::Members() which returns the list of members.
* debian/rules:
- Fix the libraries name to be e.g. libapt-pkg4.9 instead of
libapt-pkg-4.9.
Ensure that for each all package at least one pseudopackage is installed
Removing pseudo packages is cool so far, the problem is that we will
remove with the not required removing so many pseudo packages that
we will have after the remove a few packages with NO installed pseudo
package (e.g. metapackages are good candidates) - so we will walk over
all these packages and try to find a pseudopackage for this package
we can install without breaking something.
* apt-pkg/deb/debversion.cc:
- consider absent of debian revision equivalent to 0 (Closes: #573592)
This moves the existing testcase for version comparison to "my" directory,
adds a few more tests (e.g. the tests used in cupt) and rewrites the
testcases runner: The runner does now call dpkg --compare-versions
to check what dpkg thinks about the comparison - all done in less code ;)
Michael Vogt [Fri, 12 Mar 2010 21:33:35 +0000 (22:33 +0100)]
* debian/apt.cron.daily:
- do not look into admin users gconf anymore for the http proxy
the user now needs to use the "Apply system-wide" UI in the
gnome-control-center to set it
* debian/apt.postinst:
- add set_apt_proxy_from_gconf() and run that once on upgrade if
there is no proxy configured already system-wide (LP: #432631)
From that point on gnome-control-center will have to warn if
the user makes changes to the proxy settings and does not apply
them system wide
Michael Vogt [Fri, 12 Mar 2010 21:10:42 +0000 (22:10 +0100)]
* cmdline/apt-get.cc:
- if apt-get source foo=version or foo/distro can not be found,
error out (LP: #502641)
* apt-pkg/indexfile.cc:
- deal correctly with three letter langcodes (LP: #391409)
* apt-pkg/deb/dpkgpm.cc:
- if available store the Commandline in the history
* apt-pkg/contrib/cmndline.cc:
- save Commandline in Commandline::AsString for logging
* cmdline/apt-get.cc:
- add a --only-upgrade flag to install command (Closes: #572259)
That is NOT what is requested in e.g. #74067 - this is a very simple
flag which behaves orthogonal to --no-upgrade not a full-blown
upgrade option for a single package instead of the whole package set.
We need to kill also pseudo packages which have no dependency, no
installed reverse dependency and which also doesn't provide something.
They cause problems if this pseudo packages get new dependencies.
As a consequence we also need to recheck the dependencies of a killed
pseudo package (and especially the providers of these dependencies)
to really kill all non required packages.
Remove and Unpack operations should not be ignored for pseudo packages -
they should trigger the remove/unpack of the "all" package.
Otherwise - as this package has no dependencies - it will be triggered
to late. The Configuration step doesn't need it as the "all" package is
a dependency of the pseudo-package, so it will be configured before
the pseudo packages are tried: So at this step the ignorance is okay.
Also IsMissing() should report the status of the all package if an
pseudo package is checked instead of always reporting no-miss.
Fix the PkgFileIterator Constructor which defaults to the wrong value.
(0 instead of the HeaderP) This breaks the Cache Validation functionality
as the end() doesn't test for NULL.
(The fault was introduced with the rewriting of the CacheIterators)
Enable the AutoRemover to talk "Multi-Arch" by marking all pseudo
packages in a group if one is marked.
The auto-installed flag is from now on Architecture bound:
A section without an architecture tag will be treated as applying
to all architectures - the next write operation will take care of
this by creating separate sections for the architectures.
* apt-pkg/contrib/mmap.{h,cc}:
- add char[] fallback for filesystems without shared writable
mmap() like JFFS2. Thanks to Marius Vollmer for writing
and to Loïc Minier for pointing to the patch! (Closes: #314334)
move ShowPkg() from apt-get to the PkgIterator and rename it to FullName()
responseable for displaying a package name and the architecture in a
uniform way. Pretty option can be used to not append the architecture if
it is the native architecture or all - and use it all over the place in
the commandline tools.
Michael Vogt [Thu, 18 Feb 2010 14:17:50 +0000 (15:17 +0100)]
* [BREAK] merged lp:~mvo/apt/history
- this writes a /var/log/apt/history tagfile that contains details
from the transaction (complements term.log)
* methods/http.cc:
- add cache-control headers even if no cache is given to allow
adding options for intercepting proxies
- add Acquire::http::ProxyAutoDetect configuration that
can be used to call a external helper to figure out the
proxy configuration and return it to apt via stdout
(this is a step towards WPAD and zeroconf/avahi support)
* abicheck/
- add new abitest tester using the ABI Compliance Checker from
http://ispras.linuxfoundation.org/index.php/ABI_compliance_checker
* Change the package index Info methods to allow apt-cache policy to be
useful when using several different archives on the same host.
(Closes: #329814, LP: #22354)