<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/libapt, branch 1.2.1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.2.1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.2.1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2016-01-15T18:18:29Z</updated>
<entry>
<title>string_view: Drop constexpr constructor for standard compatibility</title>
<updated>2016-01-15T18:18:29Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-15T18:18:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ef6cc0e22a2933e0e36bc260179fdf0b86f9ac26'/>
<id>urn:sha1:ef6cc0e22a2933e0e36bc260179fdf0b86f9ac26</id>
<content type='text'>
APT::StringView is supposed to be a temporary measure, until support
for the standardized string_view is widely available. Introducing
additional unstandardized features just makes porting to the
standard version harder.

The constexpr constructor also won't have any real effect on most
systems, as the compiler will happily optimise the strlen() call
away for constant strings.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>provide a constexpr char[] overload for APT::StringView</title>
<updated>2016-01-15T17:19:16Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-15T16:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ec6a4a831e57834bf4d7abb91fc8b298c2fbfcc2'/>
<id>urn:sha1:ec6a4a831e57834bf4d7abb91fc8b298c2fbfcc2</id>
<content type='text'>
The commit also adds a few trivial tests

Git-Dch: Ignore
</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>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>Fix FileUtlTest.GetTempDir failure when run as root</title>
<updated>2015-12-19T11:51:10Z</updated>
<author>
<name>Pino Toscano</name>
<email>pino@debian.org</email>
</author>
<published>2015-12-19T11:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dbbe1e6393dab381db0f48b2a645babdddb14eca'/>
<id>urn:sha1:dbbe1e6393dab381db0f48b2a645babdddb14eca</id>
<content type='text'>
Testing /usr as TMPDIR assumes that GetTempDir() cannot use it
because it cannot write to it; this is true for non-root users, but
not so much for root.

Since root can access everything, perform this particular test case
only when not running as root.

Closes: #808383
</content>
</entry>
<entry>
<title>Do not swap required and important in pkgCache::Priority()</title>
<updated>2015-12-10T09:02:21Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2015-12-10T08:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2fcd25a9e26093b8d1228107b5b0019675984114'/>
<id>urn:sha1:2fcd25a9e26093b8d1228107b5b0019675984114</id>
<content type='text'>
required and important were swapped, leading to wrong
output.

Closes: #807523
Thanks: Manuel A. Fernandez Montecelo for discovering this
</content>
</entry>
<entry>
<title>outsmart gcc -O3 over-optimization in pkgCdrom::FindPackages</title>
<updated>2015-11-27T21:22:21Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-11-27T21:22:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0300f0077af832e87beb290f26b13404cab81fd3'/>
<id>urn:sha1:0300f0077af832e87beb290f26b13404cab81fd3</id>
<content type='text'>
Seems like a simpler workaround than forcing a lower optimization
level just for this for all of apt.

See also:
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1473674
</content>
</entry>
<entry>
<title>support setting empty values (sanely) &amp; removing support for</title>
<updated>2015-11-19T16:13:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-11-19T12:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=bc7a59dded57338e9b5e523726b246dbdd4e0935'/>
<id>urn:sha1:bc7a59dded57338e9b5e523726b246dbdd4e0935</id>
<content type='text'>
space-gapping: '-o option= value'

That is a very old feature (straight from 1998), but it is super
surprising if you try setting empty values and instead get error
messages or a non-empty value as the next parameter is treated as the
value – which could have been empty, so if for some reason you need a
compatible way of setting an empty value try: '-o option="" ""'.

I can only guess that the idea was to support '-o option value', but we
survived 17 years without it, we will do fine in the future I guess.

Similar is the case for '-t= testing' even through '-t testing' existed
before and the code even tried to detect mistakes like '-t= -b' … all
gone now.

Technically that is as its removing a feature replacing it with another
a major interface break. In practice I really hope for my and their
sanity that nobody was using this; but if for some reaon you do: Remove
the space and be done.

I found the patch and the bugreport actually only after the fact, but
its reassuring that others are puzzled by this as well and hence a
thanks is in perfect order here as the patch is practical identical
[expect that this one here adds tests and other bonus items].

Thanks: Daniel Hartwig for initial patch.
Closes: 693092
</content>
</entry>
<entry>
<title>do not use _apt for file/copy sources if it isn't world-accessible</title>
<updated>2015-11-19T15:46:29Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-11-18T18:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=514a25cbcd2babb2a9c4485fc7b9a4256b7f6ff3'/>
<id>urn:sha1:514a25cbcd2babb2a9c4485fc7b9a4256b7f6ff3</id>
<content type='text'>
In 0940230d we started dropping privileges for file (and a bit later for
copy, too) with the intend of uniforming this for all methods. The
commit message says that the source will likely fail based on the
compressors already – and there isn't much secret in the repository
content. After all, after apt has run the update everyone can access the
content via apt anyway…

There are sources through which worked before which are mostly
single-deb (and those with the uncompressed files available).
The first one being especially surprising for users maybe, so instead of
failing, we make it so that apt detects that it can't access a source as
_apt and if so doesn't drop (for all sources!) privileges – but we limit
this to file/copy, so the uncompress which might be needed will still
fail – but that failed before this regression.

We display a notice about this, mostly so that if it still fails (e.g.
compressed) the user has some idea what is wrong.

Closes: 805069
</content>
</entry>
<entry>
<title>encode UTF-8 characters correctly in QuoteString</title>
<updated>2015-11-05T11:21:33Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-11-04T22:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4453cfdcf42f7fe6859bb0fc6b310a2a391bee77'/>
<id>urn:sha1:4453cfdcf42f7fe6859bb0fc6b310a2a391bee77</id>
<content type='text'>
Limit the field length to a char to avoid bogus FF for
utf-8 characters with the default length.

Closes: 799123
</content>
</entry>
</feed>
