aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-01-11 15:45:13 +0000
committerJason Woodward2005-01-11 15:45:13 +0000
commit01d4421206a0929e879ae1dd75bf8a1c5a61d0aa (patch)
tree9f8bedaa3b15a1271a1b79d097fb74ef8470b9a9
parent0a8e25d01ae53d35066290981092261ee0a5f870 (diff)
downloadslapt-get-01d4421206a0929e879ae1dd75bf8a1c5a61d0aa.tar.gz
exclude now searches on package location, so you can exclude disk sets as well
-rw-r--r--ChangeLog4
-rw-r--r--FAQ14
-rw-r--r--FAQ.html14
-rw-r--r--src/package.c6
4 files changed, 19 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index a560227..c6f109c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
-0.9.9f Jan 10, 2005
+0.9.9f Jan 11, 2005
+ * exclude now searches on package location, so you can exclude disk
+ sets as well
* rewrote "Why yet another package management tool for slackware?" and
"What about package dependencies?" in FAQ
* added a 'Getting started' section to the README
diff --git a/FAQ b/FAQ
index 3ec69bf..ed61ae5 100644
--- a/FAQ
+++ b/FAQ
@@ -291,14 +291,12 @@ Frequently Asked Questions:
16. How can I generate an exclude list for an entire disk set?
- You can use this script to generate a listing of packages to add to your
- exclude list:
-
- #!/bin/sh
- # this should gen an exclude list for a particular dir set (first arg to script)
- DIR=$1
- slapt-get --search "^\.\/slackware\/${DIR}$"|awk '{print $1}'|\
- xargs -iZ echo -n "Z,"|sed -e 's/,$//'
+ You can exclude an entire disk set by placing the disk set as an exclude. Be
+ sure to use the beginning-of-line (^) and end-of-line ($) operators for
+ specific matching. For example:
+
+ To exclude all of ./slackware/x and ./slackware/xap
+ EXCLUDE=^./slackware/x$,^./slackware/xap$
17. How do I use a local file source?
diff --git a/FAQ.html b/FAQ.html
index 8630a34..f8454a6 100644
--- a/FAQ.html
+++ b/FAQ.html
@@ -305,14 +305,12 @@
<A NAME="slgFAQ16"><B>16. How can I generate an exclude list for an entire disk set?</B></A>
- You can use this script to generate a listing of packages to add to your
- exclude list:
-
- #!/bin/sh
- # this should gen an exclude list for a particular dir set (first arg to script)
- DIR=$1
- slapt-get --search "^\.\/slackware\/${DIR}$"|awk '{print $1}'|\
- xargs -iZ echo -n "Z,"|sed -e 's/,$//'
+ You can exclude an entire disk set by placing the disk set as an exclude. Be
+ sure to use the beginning-of-line (^) and end-of-line ($) operators for
+ specific matching. For example:
+
+ To exclude all of ./slackware/x and ./slackware/xap
+ EXCLUDE=^./slackware/x$,^./slackware/xap$
<A NAME="slgFAQ17"><B>17. How do I use a local file source?</B></A>
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;
}