| Summary: | Can't get installed package information when it's not in mirror | ||
|---|---|---|---|
| Product: | [Unmaintained] libqapt | Reporter: | sbw <sbw> |
| Component: | general | Assignee: | Harald Sitter <sitter> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
sbw
2017-08-02 05:54:28 UTC
works just fine.
$ cat src/main.cpp
#include <QApplication>
#include <QApt/Backend>
#include <QDebug>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QApt::Backend backend;
backend.init();
auto pkg = backend.package("discord");
Q_ASSERT(pkg);
qDebug() << pkg->isInstalled();
qDebug() << pkg->version();
}
$ ./build/src/test
test(18175)/(default) main: true
test(18175)/(default) main: "0.0.1"
$ apt policy discord
discord:
Installed: 0.0.1
Candidate: 0.0.1
Version table:
*** 0.0.1 100
100 /var/lib/dpkg/status
Okey, I checked my code and find some reason.
I'm install a 32-bit deb file in 64-bit system, and call backend.package("somename") will return a null pointer, but backend.package("somename:i386") will get right info.
|