Hi, I've written an initial patch to move the tracker toward release independence/agnosticism. This is done in the hopes to avoid "flag days" for future releases, and to create a centralized location for declaring supported releases/architectures (thus making it a lot easier to make the change). If I don't get any comments, I'll commit this in a few days. Best wishes, Mike
diff --git a/Makefile b/Makefile
index 75117bb..aa73179 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,14 @@
PYTHON = python
PYTHON_MODULES = $(wildcard lib/python/*.py)
BUG_LISTS = $(wildcard data/*/list)
+MIRROR = http://ftp.debian.org/debian/
-# Adjust these if necessary. The architecture selection is rather
-# arbitrary at the moment. More architectures can be added later.
+STABLE_ARCHS = $(shell cat data/supported-releases | grep stable | grep -v unstable | cut -d[ -f2 | cut -d] -f1)
+TESTING_ARCHS = $(shell cat data/supported-releases | grep testing | cut -d[ -f2 | cut -d] -f1)
+UNSTABLE_ARCHS = $(shell cat data/supported-releases | grep unstable | cut -d[ -f2 | cut -d] -f1)
-MIRROR = http://ftp.de.debian.org/debian/
-LENNY_ARCHS = alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc
-SQUEEZE_ARCHS = amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc
-SID_ARCHS = alpha amd64 armel hppa i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc s390 sparc
-
-STABLE = lenny
-TESTING = squeeze
-
-STABLE_uc = $(shell echo "$(STABLE)" | tr "[:lower:]" "[:upper:]")
-TESTING_uc = $(shell echo "$(TESTING)" | tr "[:lower:]" "[:upper:]")
+STABLE = $(shell cat data/supported-releases | grep stable | grep -v unstable | cut -d: -f1)
+TESTING = $(shell cat data/supported-releases | grep testing | cut -d: -f1)
all:
rm -f data/security-new.db data/security-new.db.journal
@@ -24,6 +18,7 @@ all:
clean:
-rm -f data/security.db lib/python/test_security.db
+ -rm -f data/packages/*_Packages data/packages/*_Sources
-rm -f stamps/*-*
.PHONY: check check-syntax
@@ -57,7 +52,7 @@ update-packages: update-testing
$(MIRROR)/dists/$$rel/$$archive/source/Sources \
data/packages/$${rel}__$${archive}_Sources ; \
done ; \
- for arch in $(SID_ARCHS) ; do \
+ for arch in $(UNSTABLE_ARCHS) ; do \
for archive in main contrib non-free ; do \
$(PYTHON) bin/apt-update-file \
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \
@@ -73,7 +68,7 @@ update-testing:
$(MIRROR)/dists/$$rel/$$archive/source/Sources \
data/packages/$${rel}__$${archive}_Sources ; \
done ; \
- for arch in $($(TESTING_uc)_ARCHS) ; do \
+ for arch in $(TESTING_ARCHS) ; do \
for archive in main contrib non-free ; do \
$(PYTHON) bin/apt-update-file \
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \
@@ -89,7 +84,7 @@ update-stable:
$(MIRROR)/dists/$$rel/$$archive/source/Sources \
data/packages/$${rel}__$${archive}_Sources ; \
done ; \
- for arch in $($(STABLE_uc)_ARCHS) ; do \
+ for arch in $(STABLE_ARCHS) ; do \
for archive in main contrib non-free ; do \
$(PYTHON) bin/apt-update-file \
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \
@@ -104,7 +99,7 @@ ST_FILE = data/packages/$(TESTING)_security_
update-testing-security:
$(PYTHON) bin/apt-update-file \
$(ST_MIRROR)/main/source/Sources $(ST_FILE)main_Sources
- set -e ; for arch in $($(TESTING_uc)_ARCHS) ; do \
+ set -e ; for arch in $(TESTING_ARCHS) ; do \
$(PYTHON) bin/apt-update-file \
$(ST_MIRROR)/main/binary-$${arch}/Packages $(ST_FILE)main_$${arch}_Packages ; \
done
@@ -116,7 +111,7 @@ update-security: update-old-security
$(PYTHON) bin/apt-update-file \
$(SEC_MIRROR)/$$archive/updates/$$section/source/Sources \
data/packages/$${archive}_security_$${section}_Sources ; \
- for arch in $($(STABLE_uc)_ARCHS) ; do \
+ for arch in $(STABLE_ARCHS) ; do \
$(PYTHON) bin/apt-update-file \
$(SEC_MIRROR)/$$archive/updates/$$section/binary-$$arch/Packages \
data/packages/$${archive}_security_$${section}_$${arch}_Packages ; \
@@ -127,7 +122,7 @@ update-security: update-old-security
VOLATILE_MIRROR = http://volatile.debian.net/debian-volatile/dists
update-volatile:
set -e && for archive in $(STABLE) ; do \
- for arch in $(LENNY_ARCHS) ; do \
+ for arch in $(STABLE_ARCHS) ; do \
$(PYTHON) bin/apt-update-file \
$(VOLATILE_MIRROR)/$${archive}/volatile/main/binary-$$arch/Packages \
data/packages/$${archive}-volatile__main_$${arch}_Packages ; \
@@ -137,13 +132,13 @@ update-volatile:
data/packages/$${archive}-volatile__main_Sources ; \
done
$(PYTHON) bin/apt-update-file \
- $(VOLATILE_MIRROR)/lenny/volatile/main/binary-armel/Packages \
- data/packages/lenny-volatile__main_armel_Packages
+ $(VOLATILE_MIRROR)/$(STABLE)/volatile/main/binary-armel/Packages \
+ data/packages/$(STABLE)-volatile__main_armel_Packages
BACKPORTS_MIRROR = http://www.backports.org/backports.org/dists
update-backports:
set -e && for archive in $(STABLE) ; do \
- for arch in $(LENNY_ARCHS) ; do \
+ for arch in $(STABLE_ARCHS) ; do \
$(PYTHON) bin/apt-update-file \
$(BACKPORTS_MIRROR)/$${archive}-backports/main/binary-$$arch/Packages \
data/packages/$${archive}-backports__main_$${arch}_Packages ; \
@@ -153,8 +148,8 @@ update-backports:
data/packages/$${archive}-backports__main_Sources ; \
done
$(PYTHON) bin/apt-update-file \
- $(BACKPORTS_MIRROR)/lenny-backports/main/binary-armel/Packages \
- data/packages/lenny-backports__main_armel_Packages
+ $(BACKPORTS_MIRROR)/$(STABLE)-backports/main/binary-armel/Packages \
+ data/packages/$(STABLE)-backports__main_armel_Packages
update-lists:
svn update -q data
diff --git a/lib/python/dist_config.py b/lib/python/dist_config.py
index fa82dc7..3805273 100644
--- a/lib/python/dist_config.py
+++ b/lib/python/dist_config.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""
-This Python moule describes how different views of the Debian package
+This Python module describes how different views of the Debian package
database are assembled from a set of on-disk files.
Each view is labeled by a purpose. Currently defined purposes are:
@@ -30,27 +30,24 @@ Each view is labeled by a purpose. Currently defined purposes are:
entries for the release.
"""
+import os
+
######################################################################
# Configuration section
######################################################################
def apply_config():
- # Invoked at the end of the file. Edit this to suit your needs.
-
- squeeze_archs = 'amd64,armel,hppa,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,sparc'.split(',')
- lenny_archs = squeeze_archs + ['arm','alpha',]
-
- add_release(name='lenny',
- architectures=lenny_archs,
- )
-
- add_release(name='squeeze',
- architectures=squeeze_archs,
- )
-
- add_release(name='sid',
- architectures=squeeze_archs,
- )
+ freleases = open( os.getcwd().split( 'secure-testing' )[0] \
+ + 'secure-testing/data/supported-releases' , 'r' )
+ for line in freleases.readlines():
+ set = line.split( ':' )
+ release = set[0].strip()
+ info = set[1].split( '[' )
+ alias = info[0].strip()
+ if alias in ( 'oldstable', 'stable', 'testing', 'unstable' ):
+ archs = info[1].strip( ']\n' ).split()
+ add_release( release , archs )
+ freleases.close()
######################################################################
# Support routines
Attachment:
supported-releases
Description: Binary data