Browse Source

Fetch Packages-all and Contents-all if they exist

Closes: #904927
merge-requests/7/head
Colin Watson 4 years ago
parent
commit
82bf56b224
  1. 4
      debian/changelog
  2. 6
      debmirror
  3. 6
      test/script-data/debian-template/dists/sid/main/Contents-all
  4. 3
      test/script-data/debian-template/dists/sid/main/Contents-amd64
  5. 3
      test/script-data/debian-template/dists/sid/main/Contents-i386
  6. 32
      test/script-data/debian-template/dists/sid/main/binary-all/Packages
  7. 5
      test/script-data/debian-template/dists/sid/main/binary-all/Release
  8. 32
      test/script-data/debian-template/dists/sid/main/binary-amd64/Packages
  9. 1
      test/script-data/files-to-gzip-early.dat
  10. 1
      test/script-data/files-to-gzip.dat
  11. 6
      test/script/build-mock-archive

4
debian/changelog vendored

@ -1,8 +1,12 @@
debmirror (1:2.31) UNRELEASED; urgency=medium
[ Ondřej Nový ]
* d/copyright: Use https protocol in Format field
* d/changelog: Remove trailing whitespaces
[ Colin Watson ]
* Fetch Packages-all and Contents-all if they exist (closes: #904927).
-- Ondřej Nový <onovy@debian.org> Mon, 01 Oct 2018 10:31:31 +0200
debmirror (1:2.30) unstable; urgency=medium

6
debmirror

@ -1087,7 +1087,7 @@ sub add_bytes {
foreach my $dist (keys %distset) {
next unless exists $distset{$dist}{mirror};
foreach my $section (@sections) {
foreach my $arch (@arches) {
foreach my $arch (@arches, "all") {
add_bytes("dists/$dist/$section/binary-$arch/Packages");
add_bytes("dists/$dist/$section/binary-$arch/Packages.gz");
add_bytes("dists/$dist/$section/binary-$arch/Packages.xz");
@ -1117,7 +1117,7 @@ foreach my $dist (keys %distset) {
foreach my $section (@sections) {
# some suites don't have d-i
next if ($section =~ /debian-installer/ && di_skip_dist($dist) );
foreach my $arch (@arches) {
foreach my $arch (@arches, "all") {
get_index("dists/$dist/$section/binary-$arch", "Packages");
link_index($dist,$section,$arch) if $debmarshal;
}
@ -3101,7 +3101,7 @@ sub do_contents_for_each_dist_arch_sect {
foreach my $dist (keys %distset) {
next if $dist=~/\bexperimental\b|-proposed-updates\b/o;
next unless exists $distset{$dist}{mirror};
foreach my $arch (@arches) {
foreach my $arch (@arches, "all") {
my %op_params = %$operational_params;
$op_params{is_source} = $arch=~/\bsource\b/o;
unless ($op_params{is_source} && !$op_params{do_for_source}) {

6
test/script-data/debian-template/dists/sid/main/Contents-all

@ -0,0 +1,6 @@
This file pretends to be a Contents file.
FILE LOCATION
usr/bin/bar test/bar
usr/share/foo-data test/foo-data
usr/share/foo-data/data.dat test/foo-data

3
test/script-data/debian-template/dists/sid/main/Contents-amd64

@ -1,7 +1,4 @@
This file pretends to be a Contents file.
FILE LOCATION
usr/bin/bar test/bar
usr/bin/foo test/foo
usr/share/foo-data test/foo-data
usr/share/foo-data/data.dat test/foo-data

3
test/script-data/debian-template/dists/sid/main/Contents-i386

@ -1,7 +1,4 @@
This file pretends to be a Contents file for i386.
FILE LOCATION
usr/bin/bar test/bar
usr/bin/foo test/foo
usr/share/foo-data test/foo-data
usr/share/foo-data/data.dat test/foo-data

32
test/script-data/debian-template/dists/sid/main/binary-all/Packages

@ -0,0 +1,32 @@
Package: bar
Version: 1.0-7
Installed-Size: 0
Maintainer: James Bar <jamesbar@debian.org>
Architecture: all
Description: a package that exists for test purposes
Description-md5: 00000000000000000000000000000000
Section: test
Priority: optional
Filename: pool/main/b/bar/bar_1.0-7_all.deb
Size: 0
MD5sum: 00000000000000000000000000000000
SHA1: 0000000000000000000000000000000000000000
SHA256: 0000000000000000000000000000000000000000000000000000000000000000
Package: foo-data
Source: foo
Version: 1.23-4
Installed-Size: 0
Maintainer: John Foo <johnfoo@debian.org>
Architecture: all
Depends: bar (>= 1.0), foo-data
Description: data for an imaginary software suite
Description-md5: 00000000000000000000000000000000
Section: test
Priority: optional
Filename: pool/main/f/foo/foo-data_1.23-4_all.deb
Size: 0
MD5sum: 00000000000000000000000000000000
SHA1: 0000000000000000000000000000000000000000
SHA256: 0000000000000000000000000000000000000000000000000000000000000000

5
test/script-data/debian-template/dists/sid/main/binary-all/Release

@ -0,0 +1,5 @@
Archive: unstable
Origin: Debian
Label: Debian
Component: main
Architecture: all

32
test/script-data/debian-template/dists/sid/main/binary-amd64/Packages

@ -1,18 +1,3 @@
Package: bar
Version: 1.0-7
Installed-Size: 0
Maintainer: James Bar <jamesbar@debian.org>
Architecture: all
Description: a package that exists for test purposes
Description-md5: 00000000000000000000000000000000
Section: test
Priority: optional
Filename: pool/main/b/bar/bar_1.0-7_all.deb
Size: 0
MD5sum: 00000000000000000000000000000000
SHA1: 0000000000000000000000000000000000000000
SHA256: 0000000000000000000000000000000000000000000000000000000000000000
Package: foo
Version: 1.23-4
Installed-Size: 0
@ -29,20 +14,3 @@ MD5sum: 00000000000000000000000000000000
SHA1: 0000000000000000000000000000000000000000
SHA256: 0000000000000000000000000000000000000000000000000000000000000000
Package: foo-data
Source: foo
Version: 1.23-4
Installed-Size: 0
Maintainer: John Foo <johnfoo@debian.org>
Architecture: all
Depends: bar (>= 1.0), foo-data
Description: data for an imaginary software suite
Description-md5: 00000000000000000000000000000000
Section: test
Priority: optional
Filename: pool/main/f/foo/foo-data_1.23-4_all.deb
Size: 0
MD5sum: 00000000000000000000000000000000
SHA1: 0000000000000000000000000000000000000000
SHA256: 0000000000000000000000000000000000000000000000000000000000000000

1
test/script-data/files-to-gzip-early.dat

@ -1,4 +1,5 @@
dists/sid/main/Contents-source
dists/sid/main/Contents-all
dists/sid/main/Contents-amd64
dists/sid/main/Contents-i386
dists/sid/main/Contents-udeb-amd64

1
test/script-data/files-to-gzip.dat

@ -1,4 +1,5 @@
dists/sid/main/source/Sources
dists/sid/main/binary-all/Packages
dists/sid/main/binary-amd64/Packages
dists/sid/main/binary-i386/Packages
dists/sid/main/debian-installer/binary-amd64/Packages

6
test/script/build-mock-archive

@ -46,6 +46,12 @@ script/sum-packages\
debian/dists/sid/main/binary-amd64/Packages\
debian/dists/sid/main/i18n\
debian
script/sum-packages\
script-data/debian-template/dists/sid/main/binary-all/Packages\
script-data/debian-template/dists/sid/main/i18n\
debian/dists/sid/main/binary-all/Packages\
debian/dists/sid/main/i18n\
debian
script/sum-packages\
script-data/debian-template/dists/sid/main/debian-installer/binary-amd64/Packages\
script-data/debian-template/dists/sid/main/i18n\

Loading…
Cancel
Save