Author: geissert Date: 2010-01-05 19:27:13 +0000 (Tue, 05 Jan 2010) New Revision: 13725 Modified: Makefile Log: separate the list of archs of each release TODO: refactorise the code Modified: Makefile ==================================================================--- Makefile 2010-01-05 13:46:26 UTC (rev 13724) +++ Makefile 2010-01-05 19:27:13 UTC (rev 13725) @@ -9,7 +9,16 @@ ETCH_ARCHS = alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc 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 +OLDSTABLE = etch +STABLE = lenny +TESTING = squeeze + +OLDSTABLE_uc = $(shell echo "$(OLDSTABLE)" | tr "[:lower:]" "[:upper:]") +STABLE_uc = $(shell echo "$(STABLE)" | tr "[:lower:]" "[:upper:]") +TESTING_uc = $(shell echo "$(TESTING)" | tr "[:lower:]" "[:upper:]") + all: rm -f data/security-new.db data/security-new.db.journal if test -e data/security.db; then cp data/security.db data/security-new.db; fi @@ -43,16 +52,15 @@ serve: @bash bin/test-web-server -.PHONY: update-packages update-testing-security -RELEASES = squeeze sid experimental -update-packages: - set -e ; for rel in $(RELEASES) ; do \ +.PHONY: update-packages update-testing update-stable update-oldstable +update-packages: update-testing + set -e ; for rel in sid experimental ; do \ for archive in main contrib non-free ; do \ $(PYTHON) bin/apt-update-file \ $(MIRROR)/dists/$$rel/$$archive/source/Sources \ data/packages/$${rel}__$${archive}_Sources ; \ done ; \ - for arch in $(SQUEEZE_ARCHS) ; do \ + for arch in $(SID_ARCHS) ; do \ for archive in main contrib non-free ; do \ $(PYTHON) bin/apt-update-file \ $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ @@ -61,14 +69,14 @@ done ; \ done -update-stable: - set -e ; for rel in etch lenny ; do \ +update-testing: + set -e ; for rel in $(TESTING) ; do \ for archive in main contrib non-free ; do \ $(PYTHON) bin/apt-update-file \ $(MIRROR)/dists/$$rel/$$archive/source/Sources \ data/packages/$${rel}__$${archive}_Sources ; \ done ; \ - for arch in $(ETCH_ARCHS) ; do \ + for arch in $($(TESTING_uc)_ARCHS) ; do \ for archive in main contrib non-free ; do \ $(PYTHON) bin/apt-update-file \ $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ @@ -77,24 +85,57 @@ done ; \ done -ST_MIRROR = http://security.debian.org/dists/squeeze/updates -ST_FILE = data/packages/squeeze_security_ +update-stable: update-oldstable + set -e ; for rel in $(STABLE) ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/source/Sources \ + data/packages/$${rel}__$${archive}_Sources ; \ + done ; \ + for arch in $($(STABLE_uc)_ARCHS) ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ + data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ + done ; \ + done ; \ + done + +update-oldstable: + set -e ; for rel in $(OLDSTABLE) ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/source/Sources \ + data/packages/$${rel}__$${archive}_Sources ; \ + done ; \ + for arch in $($(OLDSTABLE_uc)_ARCHS) ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ + data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ + done ; \ + done ; \ + done + +.PHONY: update-security update-old-security update-testing-security +ST_MIRROR = http://security.debian.org/dists/$(TESTING)/updates +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 $(SQUEEZE_ARCHS) ; do \ + set -e ; for arch in $($(TESTING_uc)_ARCHS) ; do \ $(PYTHON) bin/apt-update-file \ $(ST_MIRROR)/main/binary-$${arch}/Packages $(ST_FILE)main_$${arch}_Packages ; \ done SEC_MIRROR = http://security.debian.org/dists -update-security: - for archive in etch lenny ; do \ +update-security: update-old-security + for archive in $(STABLE); do \ for section in main contrib non-free ; do \ $(PYTHON) bin/apt-update-file \ $(SEC_MIRROR)/$$archive/updates/$$section/source/Sources \ data/packages/$${archive}_security_$${section}_Sources ; \ - for arch in $(ETCH_ARCHS) ; do \ + for arch in $($(STABLE_uc)_ARCHS) ; do \ $(PYTHON) bin/apt-update-file \ $(SEC_MIRROR)/$$archive/updates/$$section/binary-$$arch/Packages \ data/packages/$${archive}_security_$${section}_$${arch}_Packages ; \ @@ -102,9 +143,23 @@ done ; \ done +update-old-security: + for archive in $(OLDSTABLE) ; do \ + for section in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(SEC_MIRROR)/$$archive/updates/$$section/source/Sources \ + data/packages/$${archive}_security_$${section}_Sources ; \ + for arch in $($(OLDSTABLE_uc)_ARCHS) ; do \ + $(PYTHON) bin/apt-update-file \ + $(SEC_MIRROR)/$$archive/updates/$$section/binary-$$arch/Packages \ + data/packages/$${archive}_security_$${section}_$${arch}_Packages ; \ + done ; \ + done ; \ + done + VOLATILE_MIRROR = http://volatile.debian.net/debian-volatile/dists update-volatile: - set -e && for archive in etch lenny ; do \ + set -e && for archive in $(OLDSTABLE) $(STABLE) ; do \ for arch in $(ETCH_ARCHS) ; do \ $(PYTHON) bin/apt-update-file \ $(VOLATILE_MIRROR)/$${archive}/volatile/main/binary-$$arch/Packages \ @@ -120,7 +175,7 @@ BACKPORTS_MIRROR = http://www.backports.org/backports.org/dists update-backports: - set -e && for archive in etch lenny ; do \ + set -e && for archive in $(OLDSTABLE) $(STABLE) ; do \ for arch in $(ETCH_ARCHS) ; do \ $(PYTHON) bin/apt-update-file \ $(BACKPORTS_MIRROR)/$${archive}-backports/main/binary-$$arch/Packages \