sysupgrade: skip version cmp for pkg elected for removal (patch from VMiklos <vmiklos@frugalware.org>)
This commit is contained in:
parent
9bf647c82b
commit
aeb0133974
3 changed files with 20 additions and 5 deletions
3
TODO
3
TODO
|
@ -18,9 +18,6 @@ meanings)
|
||||||
PACMAN
|
PACMAN
|
||||||
======
|
======
|
||||||
|
|
||||||
- implement missing functionnalities (mainly handling of package conflicts
|
|
||||||
during packages replacement)
|
|
||||||
|
|
||||||
- review how things are displayed in the frontend (normal display,
|
- review how things are displayed in the frontend (normal display,
|
||||||
verbose mode, which usage for the library log callback, debug levels, ...)
|
verbose mode, which usage for the library log callback, debug levels, ...)
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,7 @@ int sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync)
|
||||||
/* match installed packages with the sync dbs and compare versions */
|
/* match installed packages with the sync dbs and compare versions */
|
||||||
for(i = db_get_pkgcache(db_local); i; i = i->next) {
|
for(i = db_get_pkgcache(db_local); i; i = i->next) {
|
||||||
int cmp;
|
int cmp;
|
||||||
|
int replace = 0;
|
||||||
pmpkg_t *local = i->data;
|
pmpkg_t *local = i->data;
|
||||||
pmpkg_t *spkg = NULL;
|
pmpkg_t *spkg = NULL;
|
||||||
pmsyncpkg_t *sync;
|
pmsyncpkg_t *sync;
|
||||||
|
@ -211,7 +212,24 @@ int sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(spkg == NULL) {
|
if(spkg == NULL) {
|
||||||
/*_alpm_log(PM_LOG_ERROR, "%s: not found in sync db -- skipping.", local->name);*/
|
_alpm_log(PM_LOG_DEBUG, "%s: not found in sync db -- skipping.", local->name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* we don't care about a to-be-replaced package's newer version */
|
||||||
|
for(j = trans->packages; j && !replace; j = j->next) {
|
||||||
|
sync = j->data;
|
||||||
|
if(sync->type == PM_SYNC_TYPE_REPLACE) {
|
||||||
|
for(k = sync->data; k && !replace; k = k->next) {
|
||||||
|
if(!strcmp(((pmpkg_t *)k->data)->name, spkg->name)) {
|
||||||
|
replace = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(replace) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "%s is already elected for removal -- skipping",
|
||||||
|
local->name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue