Hook up a per-repo 'Disabled' flag in the config for users to mark repos
as disabled. This can take a boolean value such as 'yes', 'true', or
'1', or the similar negated 'no', 'false', or '0'.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
It's possible that I'm blowing smoke with my strcasecmp commment...
diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.txt
index a9c5db3..cc2d88f 100644
--- a/doc/pacman.conf.5.txt
+++ b/doc/pacman.conf.5.txt
@@ -226,6 +226,13 @@ even be used for different architectures.
Set the signature verification level for this repository. For more
information, see <<SC,Package and Database Signature Checking>> below.
+*Disabled =* boolean::
+ Allows a repository to be marked as disabled. Disabled repositories will
+ not be searched when looking for updates, but will continue to be refreshed.
+ This option takes a boolean true or false value. True can be the string
+ ``1', ``yes', or ``true', case insensitive. False can be the string ``0',
+ ``no', or ``false', case insensitive.
+
Package and Database Signature Checking
---------------------------------------
The 'SigLevel' directive is valid in both the `[options]` and repository
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 4aaacb5..4d042aa 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -636,6 +636,7 @@ struct section_t {
/* db section option gathering */
alpm_siglevel_t siglevel;
alpm_list_t *servers;
+ int disabled;
};
/**
@@ -669,6 +670,8 @@ static int finish_section(struct section_t *section, int parse_options)
goto cleanup;
}