<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/tagfile.cc, branch 1.4.3</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.4.3</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.4.3'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2017-01-19T14:59:38Z</updated>
<entry>
<title>fix various typos reported by spellintian</title>
<updated>2017-01-19T14:59:38Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-01-19T14:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=93cff633a830e222693fc0f3d78e6e534d1126ee'/>
<id>urn:sha1:93cff633a830e222693fc0f3d78e6e534d1126ee</id>
<content type='text'>
Most of them in (old) code comments. The two instances of user visible
string changes the po files of the manpages are fixed up as well.

Gbp-Dch: Ignore
Reported-By: spellintian
</content>
</entry>
<entry>
<title>TagSection: Introduce functions for looking up by key ids</title>
<updated>2016-11-22T21:57:46Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-09-27T15:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=abfd07702c1bbc3ed489d015b43db58ab677af0c'/>
<id>urn:sha1:abfd07702c1bbc3ed489d015b43db58ab677af0c</id>
<content type='text'>
Introduce a new enum class and add functions that can do a lookup
with that enum class. This uses triehash.
</content>
</entry>
<entry>
<title>TagSection: Extract Find() methods taking Pos instead of Key</title>
<updated>2016-11-22T21:56:46Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-09-27T14:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=45ecab4458c4015b7635042064165c229e099c28'/>
<id>urn:sha1:45ecab4458c4015b7635042064165c229e099c28</id>
<content type='text'>
This allows us to add a perfect hash function to the tag file
without having to reimplement the methods a second time.
</content>
</entry>
<entry>
<title>TagSection: Split AlphaIndexes into AlphaIndexes and BetaIndexes</title>
<updated>2016-11-22T21:47:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-09-27T13:24:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3e633069c9c187dc51c12e59a7ddba4b68a76c4f'/>
<id>urn:sha1:3e633069c9c187dc51c12e59a7ddba4b68a76c4f</id>
<content type='text'>
Move the use of the AlphaHash to a new second hash table in
preparation for the arrival of the new perfect hash function.

With the new perfect hash function hashing most of the keys for
us, having 128 slots for a fallback hash function seems enough
and prevents us from wasting space.
</content>
</entry>
<entry>
<title>TagFile: Fix off-by-one errors in comment stripping</title>
<updated>2016-08-31T15:39:06Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-08-31T15:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=923c592ceb6014b31ec751b97b3ed659fa3e88ae'/>
<id>urn:sha1:923c592ceb6014b31ec751b97b3ed659fa3e88ae</id>
<content type='text'>
Adding 1 to the value of d-&gt;End - current makes restLength one byte
too long: If we pass memchr(current, ..., restLength) has thus
undefined behavior.

Also, reading the value of current has undefined behavior if
current &gt;= d-&gt;End, not only for current &gt; d-&gt;End:

Consider a string of length 1, that is d-&gt;End = d-&gt;Current + 1.
We can only read at d-&gt;Current + 0, but d-&gt;Current + 1 is beyond
the end of the string.

This probably caused several inexplicable build failures on hurd-i386
in the past, and just now caused a build failure on Ubuntu's amd64
builder.

Reported-By: valgrind
</content>
</entry>
<entry>
<title>Switch performance critical code to use APT::StringView</title>
<updated>2016-01-07T18:59:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-07T18:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=eff0c22e59e65b6b63e854ff41eb091278e05714'/>
<id>urn:sha1:eff0c22e59e65b6b63e854ff41eb091278e05714</id>
<content type='text'>
This improves performance of the cache generation on my
ARM platform (4x Cortex A15) by about 10% to 20% from
2.35-2.50 to 2.1 seconds.
</content>
</entry>
<entry>
<title>add optional support for comments in pkgTagFile</title>
<updated>2016-01-02T15:19:40Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-02T11:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=55153bf94ff28a23318e79aa48242244c4d82b3c'/>
<id>urn:sha1:55153bf94ff28a23318e79aa48242244c4d82b3c</id>
<content type='text'>
APT usually deals with perfectly formatted files generated automatically
be other programs – and as it has to parse multiple MBs of such files it
tries to be fast rather than forgiving.

This was always a problem if we reused this parser for files with a
deb822 syntax which are mostly written by hand however, like
apt_preferences or the deb822-style sources as these can include stray
newlines and more importantly comments all over the place.

As a stopgap we had pkgUserTagSection which deals at least with comments
before and after a given stanza, but comments in between weren't really
supported and now that we support parsing debian/control for e.g.
build-dep we face the full comment problem e.g. with comments inbetween
multi-line fields (like Build-Depends).

We can't easily deal with this on the pkgTagSection level as the interface
gives access to 'raw' char-pointers for performance reasons so we would
need to optionally add a buffer here on which we could remove comments
to hand out pointers into this buffer instead. The interface is quite
large already and supports writing stanzas as well, which does not
support comments at all either. So while in future it might make sense
to have a parser setup which deals with and keeps comments in this
commit we opt for the simpler solution for now: We officially declare
that pkgTagSection does not support comments and instead expect the
caller to deal with them, which in our case is pkgTagFile:

pkgTagFile is extended with an additional mode which can deal with
comments by dropping them from the buffer which will later form the
input of pkgTagSection. The actual implementation is slightly more
complex than this sentence suggests at first on one hand to have good
performance and on the other to allow jumping directly to stanzas with
offsets collected in a previous run (like our cache generation does it
for example).
</content>
</entry>
<entry>
<title>pkgTagSection::Scan: Fix read of uninitialized value</title>
<updated>2015-12-29T13:37:14Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2015-12-29T13:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=67c90775b650efe89d7d784cf913526cc3b63d07'/>
<id>urn:sha1:67c90775b650efe89d7d784cf913526cc3b63d07</id>
<content type='text'>
We ignored the boundary of the buffer we were reading in
while scanning for spaces.
</content>
</entry>
<entry>
<title>deal with empty values properly in deb822 parser</title>
<updated>2015-12-27T20:52:01Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-12-27T20:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c72f5c4fb4b1d496a9bbdb421f25e986f0cba9bf'/>
<id>urn:sha1:c72f5c4fb4b1d496a9bbdb421f25e986f0cba9bf</id>
<content type='text'>
Regression introduced in 8710a36a01c0cb1648926792c2ad05185535558e,
but such fields are unlikely in practice as it is just as simple to not
have a field at all with the same result of not having a value.

Closes: 808102
</content>
</entry>
<entry>
<title>Convert most callers of isspace() to isspace_ascii()</title>
<updated>2015-12-27T00:20:41Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2015-12-26T23:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=74dedb4ae28fd4f7c89bf769708d4f7edc7ed79a'/>
<id>urn:sha1:74dedb4ae28fd4f7c89bf769708d4f7edc7ed79a</id>
<content type='text'>
This converts all callers that read machine-generated data,
callers that might work with user input are not converted.
</content>
</entry>
</feed>
