mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
rename PKG_LOCALITY_LOCAL -> PKG_LOCALITY_NATIVE
PKG_LOCALITY_LOCAL was confusing because the enum is used with -Q, so all packages are "local". Also reversed the config->op_q_locality assignment so that the locality matches the option used. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
64e4f627c1
commit
55ca38b4cd
@ -187,7 +187,7 @@ enum {
|
|||||||
/** package locality */
|
/** package locality */
|
||||||
enum {
|
enum {
|
||||||
PKG_LOCALITY_UNSET = 0,
|
PKG_LOCALITY_UNSET = 0,
|
||||||
PKG_LOCALITY_LOCAL = (1 << 0),
|
PKG_LOCALITY_NATIVE = (1 << 0),
|
||||||
PKG_LOCALITY_FOREIGN = (1 << 1)
|
PKG_LOCALITY_FOREIGN = (1 << 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -512,11 +512,11 @@ static int parsearg_query(int opt)
|
|||||||
break;
|
break;
|
||||||
case OP_FOREIGN:
|
case OP_FOREIGN:
|
||||||
case 'm':
|
case 'm':
|
||||||
config->op_q_locality |= PKG_LOCALITY_LOCAL;
|
config->op_q_locality |= PKG_LOCALITY_FOREIGN;
|
||||||
break;
|
break;
|
||||||
case OP_NATIVE:
|
case OP_NATIVE:
|
||||||
case 'n':
|
case 'n':
|
||||||
config->op_q_locality |= PKG_LOCALITY_FOREIGN;
|
config->op_q_locality |= PKG_LOCALITY_NATIVE;
|
||||||
break;
|
break;
|
||||||
case OP_OWNS:
|
case OP_OWNS:
|
||||||
case 'o':
|
case 'o':
|
||||||
|
@ -241,7 +241,7 @@ static unsigned short pkg_get_locality(alpm_pkg_t *pkg)
|
|||||||
|
|
||||||
for(j = sync_dbs; j; j = alpm_list_next(j)) {
|
for(j = sync_dbs; j; j = alpm_list_next(j)) {
|
||||||
if(alpm_db_get_pkg(j->data, pkgname)) {
|
if(alpm_db_get_pkg(j->data, pkgname)) {
|
||||||
return PKG_LOCALITY_LOCAL;
|
return PKG_LOCALITY_NATIVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return PKG_LOCALITY_FOREIGN;
|
return PKG_LOCALITY_FOREIGN;
|
||||||
@ -275,7 +275,7 @@ static int filter(alpm_pkg_t *pkg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* check if this pkg is or isn't in a sync DB */
|
/* check if this pkg is or isn't in a sync DB */
|
||||||
if(config->op_q_locality && config->op_q_locality & pkg_get_locality(pkg)) {
|
if(config->op_q_locality && config->op_q_locality != pkg_get_locality(pkg)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* check if this pkg is unrequired */
|
/* check if this pkg is unrequired */
|
||||||
|
Loading…
Reference in New Issue
Block a user