Package: debmirror
Version: 1:2.46
Severity: normal
Tags: patch

Dear Maintainer,

when using the option to mirror d-i files, some index files (MANIFEST
and MD5SUMS) are missing in the first mirror run. The root cause of this
situations is, that the files are downloaded or moved into non-existing
directories. If you run the debmirror a second time, everything is fine,
because the directories are created later on the first run.

I created a patch to fix this situation.

Cheers,
Christoph

-- System Information:
Debian Release: 13.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.33+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From a32b23c67eeae44fd0828c8387112934be562b0e Mon Sep 17 00:00:00 2001
From: Christoph Goehre <[email protected]>
Date: Fri, 8 Dec 2023 08:22:35 +0100
Subject: [PATCH] create directories for installer before using them

On a newly created mirror, it's important to create the directories for
the installer before copy files into them. Otherwise files at top level
(e.g. dists/trixie/main/installer-amd64/current/images/MANIFEST) will
copy into nowhere and are missing on the mirror.
---
 debmirror | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debmirror b/debmirror
index e162a9d..a6dd865 100755
--- a/debmirror
+++ b/debmirror
@@ -3078,6 +3078,8 @@ sub di_get_files {
 
   foreach my $image_dir (sort keys %di_files) {
     my $lres = 1;
+    make_dir ("$tdir/$image_dir");
+    make_dir ("$image_dir");
     foreach my $file (sort keys %{ $di_files{$image_dir} }) {
       next unless $di_files{$image_dir}{$file}{status} == 0;
       # Fetch images into a temporary location
-- 
2.50.0

Reply via email to