-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
attached is a patch which also fixes this issue; I wasn't sure either if simply changing the regex in "if ($section =~ m/$check_section\/.+/) {" has any side effects, so I added a new function to Dirs.pm which calculates the pool directory without removing any sub sections. This new function is now called from Generate_List, so it should not have any side effects in other functions ;-) Background: PoolDir() is called from different places, and usually the section also contains the sub section (e.g. "main/devel"). But when generating the index files, the sections are read from the configuration (like "main", "non-free") and therefore do not contain any subsections. Best Regards, Andreas - -- Andreas Fester mailto:[EMAIL PROTECTED] WWW: http://www.littletux.net ICQ: 326674288 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDa6Z1Z3bQVzeW+rsRAtamAKDysS1h8GRp7KmkesAFRqwSQJJZdACcDvQU L2LE9Z8kZIciUd+uaNY69r0= =FyWx -----END PGP SIGNATURE-----
diff -urN DebPool.org/Dirs.pm DebPool/Dirs.pm --- DebPool.org/Dirs.pm 2005-02-21 21:39:01.000000000 +0100 +++ DebPool/Dirs.pm 2005-11-04 18:46:30.000000000 +0100 @@ -62,13 +62,14 @@ &Create_Tree &Monitor_Incoming &PoolDir + &PoolDirFromSection &Scan_Changes &Scan_All &Strip_Subsection ); %EXPORT_TAGS = ( - 'functions' => [qw(&Archfile &Create_Tree &Monitor_Incoming &PoolDir + 'functions' => [qw(&Archfile &Create_Tree &Monitor_Incoming &PoolDir &PoolDirFromSection &Scan_Changes &Scan_All &Strip_Subsection)], 'vars' => [qw()], ); @@ -349,16 +350,13 @@ return 1; } -# PoolDir($name, $section) +# PoolDirFromSection($name, $section) # # Calculates a pool subdirectory name from the package name and the section -# (if provided; assumed to be 'main' if undefined or unrecognized). -sub PoolDir { +sub PoolDirFromSection { my($name, $section) = @_; - $section = Strip_Subsection($section); - # Pool subdirectories are normally the first letter of the package # name, unless it is a lib* package, in which case the subdir is # lib<first letter>. @@ -370,6 +368,19 @@ } } +# PoolDir($name, $section) +# +# Calculates a pool subdirectory name from the package name and section/subsection +# (if provided; assumed to be 'main' if undefined or unrecognized). + +sub PoolDir { + my($name, $section) = @_; + + $section = Strip_Subsection($section); + + return PoolDirFromSection($name, $section); +} + # Strip_Subsection($section) # # This routine could, perhaps, better named. However, the purpose is to diff -urN DebPool.org/Packages.pm DebPool/Packages.pm --- DebPool.org/Packages.pm 2005-02-23 18:47:39.000000000 +0100 +++ DebPool/Packages.pm 2005-11-04 19:00:33.000000000 +0100 @@ -548,7 +548,7 @@ if ('source' eq $arch) { foreach $source (@sources) { my($pool) = join('/', - ($Options{'pool_dir'}, PoolDir($source, $section), $source)); + ($Options{'pool_dir'}, PoolDirFromSection($source, $section), $source)); my($version) = Get_Version($distribution, $source, 'meta'); my($target) = "$pool/${source}_" . Strip_Epoch($version); $target .= '.source'; @@ -562,7 +562,7 @@ } else { foreach $source (@sources) { my($pool) = join('/', - ($Options{'pool_dir'}, PoolDir($source, $section), $source)); + ($Options{'pool_dir'}, PoolDirFromSection($source, $section), $source)); my($version) = Get_Version($distribution, $source, 'meta'); my($target) = "$pool/${source}_" . Strip_Epoch($version); $target .= '.package';