summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-04-07 16:58:44 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-04-07 18:30:15 +0200
commit66c3875df391b1120b43831efcbe88a78569fbfe (patch)
tree0cfc5d1e07eac9ae43124c9c0ad7b906c1326bd6 /apt-pkg/indexfile.h
parenta2679f55b5b14092db88fab3799f06e6b68e439e (diff)
avoid depends on std::string implementation for pkgAcquire::Item::Mode
In /experimental this is resolved by deprecating Mode and moving to a new std::string, but that breaks ABI of course, so that was out of question. We can't change to a malloc/free style c-string either as Mode is public and hence a library user could be setting this as well. std::string implementors actually helped us out here with copy-on-write which means that while the variable "obviously" runs out of scope here, in reality you get the correct result as the string we work with here comes from the configuration in which it is still valid. Such a dependency on magic is bad of course, but its still interesting that only python3 seems to have an issue with it… With some silly explicit if-else assigning we can sidestep this issue while retaining the same output for 99.99% of all users (= noone actually configures additional compression algorithms which are also provided by repositories…), but even for these 0.01% its just a small change in the display as Mode can not be used for anything else. Example: apt/aptitude uses it in its 'update' implementations in the one-line progress at the bottom for specific items. Closes: 781858
Diffstat (limited to 'apt-pkg/indexfile.h')
0 files changed, 0 insertions, 0 deletions