libapt-pkg - _config->FindFile("Dir::Etc::sourcelist") returns empty std::string

Harald Sitter apachelogger at ubuntu.com
Mon Dec 2 11:45:59 UTC 2013


On Thu, Nov 28, 2013 at 4:33 AM, Michael Stemle <themanchicken at gmail.com> wrote:
> Hey all, does anybody know under what circumstances
> `_config->FindFile("Dir::Etc::sourcelist")` would return an empty
> std::string?
>
> I have this line:
>
> qDebug() << "sources.list: " <<
> QString::fromStdString(_config->FindFile("Dir::Etc::sourcelist"));
>
> which outputs (from SourcesListTest::testConstructor):
>
> QDEBUG : SourcesListTest::testConstructor() sources.list:  ""

_config is a libapt-pkg object I suppose? if so I suggest reading
their source code, IIRC the library is rather under documented and
doesn't have the most obvious behavior at times.

HS



More information about the kubuntu-devel mailing list