<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/ftparchive, branch 2.9.12</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.12</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.12'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-11-14T19:02:57Z</updated>
<entry>
<title>Merge branch 'noref' into 'main'</title>
<updated>2024-11-14T19:02:57Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-14T19:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4f0f7d2ba3ec25068e5cfe72bf403b1966a21dbf'/>
<id>urn:sha1:4f0f7d2ba3ec25068e5cfe72bf403b1966a21dbf</id>
<content type='text'>
std::string_view const &amp; -&gt; std::string_view

See merge request apt-team/apt!397</content>
</entry>
<entry>
<title>Merge branch 'append' into 'main'</title>
<updated>2024-11-14T19:02:34Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-14T19:02:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6ee247f4e5130a348c46ed385a0f405f32cc92d4'/>
<id>urn:sha1:6ee247f4e5130a348c46ed385a0f405f32cc92d4</id>
<content type='text'>
(+=)+= -&gt; append().append()

See merge request apt-team/apt!398</content>
</entry>
<entry>
<title>(+=)+= -&gt; append().append()</title>
<updated>2024-11-14T18:08:42Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-14T18:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=fdd846cd67def08f04cc616530adc144fc5435d7'/>
<id>urn:sha1:fdd846cd67def08f04cc616530adc144fc5435d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std::string_view const &amp; -&gt; std::string_view</title>
<updated>2024-11-14T17:41:26Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-14T17:37:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=323fcee3730fc8e3edd555f458bf260382f6d3ef'/>
<id>urn:sha1:323fcee3730fc8e3edd555f458bf260382f6d3ef</id>
<content type='text'>
Fixes: 2c03eed649068c8838d971ceeb1a09603dcc8e9c
</content>
</entry>
<entry>
<title>pkgTagSection::Tag constructors: std::string const&amp; -&gt; std::string_view (always copied) [#if APT_PKG_ABI &gt; 600]</title>
<updated>2024-11-14T17:24:31Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-14T16:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c2c98b6e251d221faea879058aa0e92436048e76'/>
<id>urn:sha1:c2c98b6e251d221faea879058aa0e92436048e76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ftparchive/: prepare for APT::StringView -&gt; std::string_view</title>
<updated>2024-11-14T15:16:45Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-12T16:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2c03eed649068c8838d971ceeb1a09603dcc8e9c'/>
<id>urn:sha1:2c03eed649068c8838d971ceeb1a09603dcc8e9c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Turn char[APT_BUFFER_SIZE] buffers into std::array&lt;char, APT_BUFFER_SIZE&gt;</title>
<updated>2024-11-11T14:52:43Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-11T14:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e59793e29ecb47c63b72de4f9d1e6d044a0ff6f2'/>
<id>urn:sha1:e59793e29ecb47c63b72de4f9d1e6d044a0ff6f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bump read()/write() loop buffers from 4k to APT_BUFFER_SIZE (64k). Bump FileFdPrivate's read()/discard buffer from 1k to APT_BUFFER_SIZE (64k)</title>
<updated>2024-11-07T12:46:19Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2024-11-07T12:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a05376bca3649da9e8ca2c48836aad1d27f7d1db'/>
<id>urn:sha1:a05376bca3649da9e8ca2c48836aad1d27f7d1db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ftparchive: contents: Avoid exponential complexity and overflows</title>
<updated>2024-10-07T14:17:32Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-10-04T16:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=604d1fac652965ec71629fec09ca39660c8bb8dc'/>
<id>urn:sha1:604d1fac652965ec71629fec09ca39660c8bb8dc</id>
<content type='text'>
Wstored directory entries as a binary tree, but we did not balance it,
leading to exponential complexity on insertion and potentially
exponential levels of stack recursion in DoPrint(), causing overflows.

Simply use an std::set storing pairs of (path, package) instead,
this is very simple, and handles aspects such as ordering or the
same package appearing multiple times correctly.

Iteration becomes a bit tricky: After seeing (file1, pkg1) when
we see (file1, pkg2) we need to append pkg2 to the current line;
once we see (file2, anything), we need write out the line and
start a new one.

For memory optimization, we use a new class StringInBlock to handle
the block-managed C strings generated by Mystrdup() in a type-safe
manner. This ensures proper lifetime of objects and no accidental
conversions to std::string. This saves a significant amount of
space (a pair of std::string is 64-byte large; a pair of pointers
is 16 byte large, a 48 byte saving per entry); reproducing the Contents
file of Ubuntu 24.10, using straight-forward std::string resulted in
GB of memory usage, whereas the C-style string only uses 1.35 GB.

As a side effect of the patch we also remove arbitrary 1024-byte
buffer sizes. There also is a change in output: The package names
are now sorted alphabetically, instead of being in visit order.

LP: #2083697
</content>
</entry>
<entry>
<title>ftparchive: Mystrdup: Add safety check and bump buffer size</title>
<updated>2024-10-07T14:02:06Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-10-07T13:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d61d86c73104d1aa84fd6ca506c2230e67727b17'/>
<id>urn:sha1:d61d86c73104d1aa84fd6ca506c2230e67727b17</id>
<content type='text'>
Add a safety check to ensure that the block were are allocating
actually fits the string we want to write. If it doesn't, abort
the program.

While we are here, bump the buffer size from 40 KiB to 4 MiB,
because why bother with smaller buffers.
</content>
</entry>
</feed>
