r214 - in branches/rewrite: etc src tests/Config
Otavio Salvador
partial-mirror-devel@lists.alioth.debian.org
Mon, 02 Aug 2004 07:52:25 -0600
Author: otavio
Date: Mon Aug 2 07:52:24 2004
New Revision: 214
Modified:
branches/rewrite/etc/debpartial-mirror.conf
branches/rewrite/src/Config.py
branches/rewrite/tests/Config/good.conf
branches/rewrite/tests/Config/invalid-filter.conf
branches/rewrite/tests/Config/missing-required.conf
branches/rewrite/tests/Config/section-types.conf
Log:
Updated to use get_packages, get_sources and components.
Modified: branches/rewrite/etc/debpartial-mirror.conf
==============================================================================
--- branches/rewrite/etc/debpartial-mirror.conf (original)
+++ branches/rewrite/etc/debpartial-mirror.conf Mon Aug 2 07:52:24 2004
@@ -14,7 +14,7 @@
architectures = i386
;; What should I look for, by default?
-sections = main
+components = main
distributions = stable
;; What should I get?
@@ -30,9 +30,9 @@
;; Where do we get the packages from?
server = http://ftp.debian.org/debian
-;; Since we specify sections and distributions in this section, what we
+;; Since we specify components and distributions in this section, what we
;; specify here overrides the settings in [DEFAULT].
-sections = main
+components = main
distributions = sarge
;; Only get a subset of the packages in this source.
@@ -45,7 +45,7 @@
;; packages from the unstable distribution (sid).
[sid_debian-installer]
server = http://ftp.debian.org/debian
-sections = main/debian-installer
+components = main/debian-installer
distributions = sid
;; You can use debian-cd tasks to include or exclude a subset of the
@@ -55,14 +55,14 @@
;; Let's only get the source packages, not the binary ones.
get_sources = true
-source_only = true
+get_packages = false
;; This backend is a local repository, as you can see from the use of the
;; file:// URL. The idea is that we have a set of custom-made packages
;; stored on the local computer.
[local_custom_packages]
server = file:///var/lib/custom-packages
-sections = main
+components = main
distributions = local
;; These packages depend on Debian official packages. We will use the
Modified: branches/rewrite/src/Config.py
==============================================================================
--- branches/rewrite/src/Config.py (original)
+++ branches/rewrite/src/Config.py Mon Aug 2 07:52:24 2004
@@ -155,6 +155,7 @@
'get_recommends',
'get_provides',
'get_sources',
+ 'get_packages',
]
_allowed = [
@@ -168,6 +169,7 @@
'get_recommends': 'boolean',
'get_suggests': 'boolean',
'get_sources': 'boolean',
+ 'get_packages': 'boolean',
'components': 'list',
}
@@ -187,6 +189,7 @@
'get_recommends',
'get_provides',
'get_sources',
+ 'get_packages',
'include_from_task',
'exclude_from_task',
'resolve_deps_using',
@@ -200,6 +203,7 @@
'get_recommends': 'boolean',
'get_suggests': 'boolean',
'get_sources': 'boolean',
+ 'get_packages': 'boolean',
'components': 'list',
}
@@ -249,6 +253,14 @@
sectionObj = sectionType(self, section)
self.sectionObjs[section] = sectionObj
self.confs[section] = sectionObj.confs
+
+ def getBackends(self, type):
+ backends = []
+
+ for section in self.sectionObjs:
+ if isinstance(section, type):
+ backends.append(section)
+ return backends
def getOption(self, option, section='GLOBAL'):
# get a config value for a certain section. if it's not
Modified: branches/rewrite/tests/Config/good.conf
==============================================================================
--- branches/rewrite/tests/Config/good.conf (original)
+++ branches/rewrite/tests/Config/good.conf Mon Aug 2 07:52:24 2004
@@ -18,6 +18,8 @@
get_suggests = true
get_recommends = true
get_provides = true
+get_packages = true
+get_sources = false
[sarge]
server = http://ftp.debian.org/debian
Modified: branches/rewrite/tests/Config/invalid-filter.conf
==============================================================================
--- branches/rewrite/tests/Config/invalid-filter.conf (original)
+++ branches/rewrite/tests/Config/invalid-filter.conf Mon Aug 2 07:52:24 2004
@@ -19,6 +19,8 @@
get_suggests = true
get_recommends = true
get_provides = true
+get_packages = true
+get_sources = false
[sarge]
server = http://ftp.debian.org/debian
Modified: branches/rewrite/tests/Config/missing-required.conf
==============================================================================
--- branches/rewrite/tests/Config/missing-required.conf (original)
+++ branches/rewrite/tests/Config/missing-required.conf Mon Aug 2 07:52:24 2004
@@ -16,6 +16,8 @@
get_suggests = true
get_recommends = true
get_provides = true
+get_packages = true
+get_sources = false
[sarge]
server = http://ftp.debian.org/debian
Modified: branches/rewrite/tests/Config/section-types.conf
==============================================================================
--- branches/rewrite/tests/Config/section-types.conf (original)
+++ branches/rewrite/tests/Config/section-types.conf Mon Aug 2 07:52:24 2004
@@ -18,6 +18,8 @@
get_suggests = true
get_recommends = true
get_provides = true
+get_packages = true
+get_sources = false
[sid_debian-installer]
server = http://ftp.debian.org/debian