tags 457714 + patch
thanks

Hi,

Patch attached.

-- 
Adrien Cunin aka Adri2000
--- apt-mirror-0.4.5.orig/apt-mirror
+++ apt-mirror-0.4.5/apt-mirror
@@ -254,6 +253,14 @@
 
 die("Please explicitly specify 'defaultarch' in mirror.list") unless get_variable("defaultarch");
 
+######################################################################################
+## Create the 3 needed directories if they don't exist yet
+my @needed_directories = (get_variable("mirror_path"), get_variable("skel_path"), get_variable("var_path"));
+foreach my $needed_directory (@needed_directories) {
+    unless (-d $needed_directory) {
+        mkdir($needed_directory) or die("apt-mirror: can't create $needed_directory directory");
+    }
+}
 
 ######################################################################################
 ## Skel download
diff -u apt-mirror-0.4.5/debian/Debian-mirror.list apt-mirror-0.4.5/debian/Debian-mirror.list
--- apt-mirror-0.4.5/debian/Debian-mirror.list
+++ apt-mirror-0.4.5/debian/Debian-mirror.list
@@ -2,8 +2,6 @@
 #
 # set base_path    /var/spool/apt-mirror
 #
-# if you change the base path you must create the directories below with write privlages
-#
 # set mirror_path  $base_path/mirror
 # set skel_path    $base_path/skel
 # set var_path     $base_path/var
diff -u apt-mirror-0.4.5/debian/Ubuntu-mirror.list apt-mirror-0.4.5/debian/Ubuntu-mirror.list
--- apt-mirror-0.4.5/debian/Ubuntu-mirror.list
+++ apt-mirror-0.4.5/debian/Ubuntu-mirror.list
@@ -2,8 +2,6 @@
 #
 # set base_path    /var/spool/apt-mirror
 #
-# if you change the base path you must create the directories below with write privlages
-#
 # set mirror_path  $base_path/mirror
 # set skel_path    $base_path/skel
 # set var_path     $base_path/var

Attachment: signature.asc
Description: Digital signature

Reply via email to