diff -Naur slapt-get.cvs/FAQ slapt-get/FAQ --- slapt-get.cvs/FAQ 2008-11-26 04:29:21.000000000 +0000 +++ slapt-get/FAQ 2008-11-29 15:22:39.000000000 +0000 @@ -1229,7 +1229,11 @@ SOURCE={url}:DEFAULT is the default, lowest priority SOURCE={url}:PREFERRED assigns more weight to this source SOURCE={url}:OFFICIAL even more weight, used to denote official sources - SOURCE={url}:CUSTOM highest priority, for your custom package source + SOURCE={url}:CUSTOM yet more weight, for your custom package source + SOURCE={url}:CUSTOM+1 even higher priority, for advanced use + SOURCE={url}:CUSTOM+2 ... + SOURCE={url}:CUSTOM+3 ... + SOURCE={url}:CUSTOM+4 highest priority PRIORITY of DEFAULT gives the usual slapt-get behaviour, whereby packages are upgraded based on their version numbers. A package from a source with the diff -Naur slapt-get.cvs/README slapt-get/README --- slapt-get.cvs/README 2008-11-26 04:29:21.000000000 +0000 +++ slapt-get/README 2008-11-29 15:22:42.000000000 +0000 @@ -109,14 +109,17 @@ official mirrors. Third party packages might not be as rigorously tested as official packages. - Every SOURCE mentioned in the slapt-getrc file is assigned a priority - number, which is a non-negative integer that defaults to 0. Priority - is assigned by appending :{PRIORITY} to the source URI. For example: + Each SOURCE can be a assigned a priority level, by appending :{PRIORITY} to + the source URI. For example: SOURCE={url}:DEFAULT is the default, lowest priority SOURCE={url}:PREFERRED assigns more weight to this source SOURCE={url}:OFFICIAL even more weight, used to denote official sources - SOURCE={url}:CUSTOM highest priority, for your custom package source + SOURCE={url}:CUSTOM yet more weight, for your custom package source + SOURCE={url}:CUSTOM+1 even higher priority, for advanced use + SOURCE={url}:CUSTOM+2 ... + SOURCE={url}:CUSTOM+3 ... + SOURCE={url}:CUSTOM+4 highest priority See the FAQ for more information. diff -Naur slapt-get.cvs/src/common.c slapt-get/src/common.c --- slapt-get.cvs/src/common.c 2008-11-25 05:08:33.000000000 +0000 +++ slapt-get/src/common.c 2008-11-29 14:12:13.000000000 +0000 @@ -351,6 +351,22 @@ return gettext("Custom"); case SLAPT_PRIORITY_CUSTOM_PATCH: return gettext("Custom Patch"); + case SLAPT_PRIORITY_CUSTOM_PLUS_1: + return gettext("Custom +1"); + case SLAPT_PRIORITY_CUSTOM_PLUS_1_PATCH: + return gettext("Custom +1 Patch"); + case SLAPT_PRIORITY_CUSTOM_PLUS_2: + return gettext("Custom +2"); + case SLAPT_PRIORITY_CUSTOM_PLUS_2_PATCH: + return gettext("Custom +2 Patch"); + case SLAPT_PRIORITY_CUSTOM_PLUS_3: + return gettext("Custom +3"); + case SLAPT_PRIORITY_CUSTOM_PLUS_3_PATCH: + return gettext("Custom +3 Patch"); + case SLAPT_PRIORITY_CUSTOM_PLUS_4: + return gettext("Custom +4"); + case SLAPT_PRIORITY_CUSTOM_PLUS_4_PATCH: + return gettext("Custom +4 Patch"); default: return NULL; }; diff -Naur slapt-get.cvs/src/common.h slapt-get/src/common.h --- slapt-get.cvs/src/common.h 2008-11-25 05:08:33.000000000 +0000 +++ slapt-get/src/common.h 2008-11-29 14:11:44.000000000 +0000 @@ -34,13 +34,25 @@ SLAPT_PRIORITY_OFFICIAL, SLAPT_PRIORITY_OFFICIAL_PATCH, SLAPT_PRIORITY_CUSTOM, - SLAPT_PRIORITY_CUSTOM_PATCH + SLAPT_PRIORITY_CUSTOM_PATCH, + SLAPT_PRIORITY_CUSTOM_PLUS_1, + SLAPT_PRIORITY_CUSTOM_PLUS_1_PATCH, + SLAPT_PRIORITY_CUSTOM_PLUS_2, + SLAPT_PRIORITY_CUSTOM_PLUS_2_PATCH, + SLAPT_PRIORITY_CUSTOM_PLUS_3, + SLAPT_PRIORITY_CUSTOM_PLUS_3_PATCH, + SLAPT_PRIORITY_CUSTOM_PLUS_4, + SLAPT_PRIORITY_CUSTOM_PLUS_4_PATCH } SLAPT_PRIORITY_T; #define SLAPT_PRIORITY_DEFAULT_TOKEN "DEFAULT" #define SLAPT_PRIORITY_PREFERRED_TOKEN "PREFERRED" #define SLAPT_PRIORITY_OFFICIAL_TOKEN "OFFICIAL" #define SLAPT_PRIORITY_CUSTOM_TOKEN "CUSTOM" +#define SLAPT_PRIORITY_CUSTOM_PLUS_1_TOKEN "CUSTOM+1" +#define SLAPT_PRIORITY_CUSTOM_PLUS_2_TOKEN "CUSTOM+2" +#define SLAPT_PRIORITY_CUSTOM_PLUS_3_TOKEN "CUSTOM+3" +#define SLAPT_PRIORITY_CUSTOM_PLUS_4_TOKEN "CUSTOM+4" typedef struct { regmatch_t pmatch[SLAPT_MAX_REGEX_PARTS]; diff -Naur slapt-get.cvs/src/configuration.c slapt-get/src/configuration.c --- slapt-get.cvs/src/configuration.c 2008-11-28 06:20:40.000000000 +0000 +++ slapt-get/src/configuration.c 2008-11-29 14:13:46.000000000 +0000 @@ -409,6 +409,14 @@ s->priority = SLAPT_PRIORITY_OFFICIAL; } else if (strcmp(token,SLAPT_PRIORITY_CUSTOM_TOKEN) == 0) { s->priority = SLAPT_PRIORITY_CUSTOM; + } else if (strcmp(token,SLAPT_PRIORITY_CUSTOM_PLUS_1_TOKEN) == 0) { + s->priority = SLAPT_PRIORITY_CUSTOM_PLUS_1; + } else if (strcmp(token,SLAPT_PRIORITY_CUSTOM_PLUS_2_TOKEN) == 0) { + s->priority = SLAPT_PRIORITY_CUSTOM_PLUS_2; + } else if (strcmp(token,SLAPT_PRIORITY_CUSTOM_PLUS_3_TOKEN) == 0) { + s->priority = SLAPT_PRIORITY_CUSTOM_PLUS_3; + } else if (strcmp(token,SLAPT_PRIORITY_CUSTOM_PLUS_4_TOKEN) == 0) { + s->priority = SLAPT_PRIORITY_CUSTOM_PLUS_4; } else { fprintf(stderr,"Unknown token: %s\n", token); } @@ -539,6 +547,14 @@ priority_token = SLAPT_PRIORITY_OFFICIAL_TOKEN; else if (priority == SLAPT_PRIORITY_CUSTOM) priority_token = SLAPT_PRIORITY_CUSTOM_TOKEN; + else if (priority == SLAPT_PRIORITY_CUSTOM_PLUS_1) + priority_token = SLAPT_PRIORITY_CUSTOM_PLUS_1_TOKEN; + else if (priority == SLAPT_PRIORITY_CUSTOM_PLUS_2) + priority_token = SLAPT_PRIORITY_CUSTOM_PLUS_2_TOKEN; + else if (priority == SLAPT_PRIORITY_CUSTOM_PLUS_3) + priority_token = SLAPT_PRIORITY_CUSTOM_PLUS_3_TOKEN; + else if (priority == SLAPT_PRIORITY_CUSTOM_PLUS_4) + priority_token = SLAPT_PRIORITY_CUSTOM_PLUS_4_TOKEN; else priority_token = SLAPT_PRIORITY_DEFAULT_TOKEN; diff -Naur slapt-get.cvs/src/configuration.h slapt-get/src/configuration.h --- slapt-get.cvs/src/configuration.h 2008-11-25 05:08:33.000000000 +0000 +++ slapt-get/src/configuration.h 2008-11-29 13:55:12.000000000 +0000 @@ -4,7 +4,7 @@ #define SLAPT_WORKINGDIR_TOKEN "WORKINGDIR=" #define SLAPT_WORKINGDIR_TOKEN_LEN 256 #define SLAPT_EXCLUDE_TOKEN "EXCLUDE=" -#define SLAPT_SOURCE_ATTRIBUTE_REGEX "(:[A-Z_,]+)$" +#define SLAPT_SOURCE_ATTRIBUTE_REGEX "(:[A-Z_,+0-9]+)$" struct slapt_exclude_list { char **excludes;