forked from cromer/pamac-classic
fix bad installed infos for optdeps
This commit is contained in:
parent
95fa570076
commit
40da570cc8
@ -524,6 +524,9 @@ namespace Pamac {
|
|||||||
public string[] get_pkg_uninstalled_optdeps (string pkgname) {
|
public string[] get_pkg_uninstalled_optdeps (string pkgname) {
|
||||||
string[] optdeps = {};
|
string[] optdeps = {};
|
||||||
unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname);
|
unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname);
|
||||||
|
if (alpm_pkg == null) {
|
||||||
|
alpm_pkg = get_syncpkg (pkgname);
|
||||||
|
}
|
||||||
if (alpm_pkg != null) {
|
if (alpm_pkg != null) {
|
||||||
foreach (unowned Depend optdep in alpm_pkg.optdepends) {
|
foreach (unowned Depend optdep in alpm_pkg.optdepends) {
|
||||||
if (find_satisfier (alpm_config.handle.localdb.pkgcache, optdep.name) == null) {
|
if (find_satisfier (alpm_config.handle.localdb.pkgcache, optdep.name) == null) {
|
||||||
@ -726,7 +729,7 @@ namespace Pamac {
|
|||||||
var err = ErrorInfos ();
|
var err = ErrorInfos ();
|
||||||
string[] details = {};
|
string[] details = {};
|
||||||
int ret = alpm_config.handle.trans_sysupgrade (enable_downgrade);
|
int ret = alpm_config.handle.trans_sysupgrade (enable_downgrade);
|
||||||
if (ret == -1) {;
|
if (ret == -1) {
|
||||||
err.message = _("Failed to prepare transaction");
|
err.message = _("Failed to prepare transaction");
|
||||||
details += Alpm.strerror (alpm_config.handle.errno ());
|
details += Alpm.strerror (alpm_config.handle.errno ());
|
||||||
err.details = details;
|
err.details = details;
|
||||||
@ -1295,13 +1298,15 @@ private void cb_totaldownload (uint64 total) {
|
|||||||
|
|
||||||
private void cb_log (LogLevel level, string fmt, va_list args) {
|
private void cb_log (LogLevel level, string fmt, va_list args) {
|
||||||
LogLevel logmask = LogLevel.ERROR | LogLevel.WARNING;
|
LogLevel logmask = LogLevel.ERROR | LogLevel.WARNING;
|
||||||
if ((level & logmask) == 0)
|
if ((level & logmask) == 0) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
string? log = null;
|
string? log = null;
|
||||||
log = fmt.vprintf (args);
|
log = fmt.vprintf (args);
|
||||||
if (log != null)
|
if (log != null) {
|
||||||
pamac_daemon.emit_log ((uint) level, log);
|
pamac_daemon.emit_log ((uint) level, log);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void on_bus_acquired (DBusConnection conn) {
|
void on_bus_acquired (DBusConnection conn) {
|
||||||
pamac_daemon = new Pamac.Daemon ();
|
pamac_daemon = new Pamac.Daemon ();
|
||||||
|
Loading…
Reference in New Issue
Block a user