aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-11 15:45:13 +0000
committerJason Woodward2005-01-11 15:45:13 +0000
commit01d4421206a0929e879ae1dd75bf8a1c5a61d0aa (patch)
tree9f8bedaa3b15a1271a1b79d097fb74ef8470b9a9 /src
parent0a8e25d01ae53d35066290981092261ee0a5f870 (diff)
downloadslapt-get-01d4421206a0929e879ae1dd75bf8a1c5a61d0aa.tar.gz
exclude now searches on package location, so you can exclude disk sets as well
Diffstat (limited to 'src')
-rw-r--r--src/package.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index cec2221..df4362f 100644
--- a/src/package.c
+++ b/src/package.c
@@ -675,7 +675,7 @@ void free_pkg_list(struct pkg_list *list){
int is_excluded(const rc_config *global_config,pkg_info_t *pkg){
unsigned int i,pkg_not_excluded = 0, pkg_is_excluded = 1;
- int name_reg_ret = -1,version_reg_ret = -1;
+ int name_reg_ret = -1,version_reg_ret = -1,location_reg_ret = -1;
sg_regex exclude_reg;
if( global_config->ignore_excludes == 1 )
@@ -701,8 +701,10 @@ int is_excluded(const rc_config *global_config,pkg_info_t *pkg){
name_reg_ret = exclude_reg.reg_return;
execute_regex(&exclude_reg,pkg->version);
version_reg_ret = exclude_reg.reg_return;
+ execute_regex(&exclude_reg,pkg->location);
+ location_reg_ret = exclude_reg.reg_return;
- if( name_reg_ret == 0 || version_reg_ret == 0 ){
+ if( name_reg_ret == 0 || version_reg_ret == 0 || location_reg_ret == 0 ){
free_regex(&exclude_reg);
return pkg_is_excluded;
}