Package: debpool
Version: 0.2.2
Severity: normal
Tags: patch
If "$Options{'pool_dir'}" has a value different from
"$Options{'archive_dir'}/pool/",
the generated Packages and Sources files point to the wrong directory (ie. to
pool/,
which is hard-coded in Packages.pm), making the repository unusable.
For example, if I set:
$Options{'pool_dir'} = "$Options{'archive_dir'}/pool/unstable";
Packages file contains:
Filename: pool/non-free/a/...
And Sources:
Directory: pool/non-free/a/...
Please find a patch to Packages.pm that should make debpool work as wanted. The
code is surely
perfectible! I am not sure what I proposed would work if the pool directory is
outside the
main archive directory.
Please let me know if I can help.
Cheers,
Julien
-- System Information:
Debian Release: testing/unstable
APT prefers stable
APT policy: (1100, 'stable'), (990, 'testing'), (10, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-ck5-neptune-20050806.1
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages debpool depends on:
ii perl 5.8.7-3 Larry Wall's Practical Extraction
Versions of packages debpool recommends:
ii gnupg 1.4.1-1 GNU privacy guard - a free PGP rep
ii libdigest-sha1-perl 2.10-1 NIST SHA-1 message digest algorith
ii libproc-daemon-perl 0.03-2 Run Perl program as a daemon proce
ii perl [libdigest-md5-perl] 5.8.7-3 Larry Wall's Practical Extraction
-- no debconf information
--- Packages.pm.orig 2005-08-17 17:32:07.000000000 +0200
+++ Packages.pm.new 2005-08-17 17:34:24.000000000 +0200
@@ -1051,7 +1051,9 @@
# And now, some stuff we can grab out of the parsed changes
# data far more easily than anywhere else.
- print $tmpfile_handle "Filename: pool/$pool/$file\n";
+ my($rel_pool) = $Options{'pool_dir'};
+ $rel_pool =~ s/$Options{'archive_dir'}\///;
+ print $tmpfile_handle "Filename: $rel_pool/$pool/$file\n";
print $tmpfile_handle "Size: $files[$marker]->{'Size'}\n";
print $tmpfile_handle "MD5sum: $files[$marker]->{'MD5Sum'}\n";
@@ -1080,8 +1082,10 @@
my($dsc, $dsc_data, $changes_data) = @_;
my($source) = $dsc_data->{'Source'};
- my(@files) = @{$dsc_data->{'Files'}};
-
+ my(@files) = @{$dsc_data->{'Files'}};
+ my($rel_pool) = $Options{'pool_dir'};
+ $rel_pool =~ s/$Options{'archive_dir'}\///;
+
# Figure out the priority and section, using the DSC filename and
# the Changes file data.
@@ -1123,7 +1127,7 @@
print $tmpfile_handle "Standards-Version:
$dsc_data->{'Standards-Version'}\n";
print $tmpfile_handle "Format: $dsc_data->{'Format'}\n";
print $tmpfile_handle "Directory: " . join('/',
- ('pool', PoolDir($source, $section), $source)) . "\n";
+ ("$rel_pool", PoolDir($source, $section), $source)) . "\n";
print $tmpfile_handle "Files:\n";