Bug#317390: debpool: improper [GENERAL/ERROR] Skipping package entry
-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.0 +0100 +++ DebPool/Dirs.pm 2005-11-04 18:46:30.0 +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. @@ -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.0 +0100 +++ DebPool/Packages.pm 2005-11-04 19:00:33.0 +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';
Bug#317390: debpool: improper [GENERAL/ERROR] Skipping package entry
On Thu, Aug 11, 2005 at 05:29:03AM +0200, Andreas Pakulat wrote: > Package: debpool > Version: 0.2.2 > Followup-For: Bug #317390 > > Hi, > > I found the place where the problem eventually sits. It's line 396 in > /usr/share/debpool/perl5/DebPool/Dirs.pm, the line reads: > > if ($section =~ m/$check_section\/.+/) { > > Now, I'm not absolutely sure what happens here, but when using a clean > repository and having > > $Options{'sections'} = [ 'main', 'non-free']; > > This fails, i.e. somehow Perl find "non-free" not to be identical to > "non-free", I guess because of the "\/.+" at the end of the Regexp. At > the point where this match happens (from the Packages.pm Module) there > is no complex section anymore (like non-free/web) but only the foremost > part is visible here (Line 567 in Packages.pm). I guess debpool is > removing the rest before reaching this point. > > I think the correct fix would be to change that line to read > > if ($section =~ m/($check_section|$check_section\/.+)/) { > > or if the second part (with the \/.+) is not used anymore it can be > reduced to just $check_section. Thanks for the additional information. Sorry things have been slow on the Debian front for me, recently; my employer is heading into the potential for a labor strike, and we've all been rather busy. I'll need to check on whether $check_section having a trailing part at this stage in the code is a "must", "must not", or "may"; you've covered the first two, if the latter is actually what's up then it should probably be something like '$check_section(\/.+)?' In any case, I'll try to followup on this soon, if I don't end up being away for several weeks... -- Joel Aelwyn <[EMAIL PROTECTED]> ,''`. : :' : `. `' `- signature.asc Description: Digital signature
Bug#317390: debpool: improper [GENERAL/ERROR] Skipping package entry
Package: debpool Version: 0.2.2 Followup-For: Bug #317390 Hi, I found the place where the problem eventually sits. It's line 396 in /usr/share/debpool/perl5/DebPool/Dirs.pm, the line reads: if ($section =~ m/$check_section\/.+/) { Now, I'm not absolutely sure what happens here, but when using a clean repository and having $Options{'sections'} = [ 'main', 'non-free']; This fails, i.e. somehow Perl find "non-free" not to be identical to "non-free", I guess because of the "\/.+" at the end of the Regexp. At the point where this match happens (from the Packages.pm Module) there is no complex section anymore (like non-free/web) but only the foremost part is visible here (Line 567 in Packages.pm). I guess debpool is removing the rest before reaching this point. I think the correct fix would be to change that line to read if ($section =~ m/($check_section|$check_section\/.+)/) { or if the second part (with the \/.+) is not used anymore it can be reduced to just $check_section. HTH Andreas -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-cherry+noradeon+8139c+ Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages debpool depends on: ii perl 5.8.7-4Larry Wall's Practical Extraction Versions of packages debpool recommends: ii gnupg 1.4.1-1GNU privacy guard - a free PGP rep ii libdigest-sha1-perl 2.10-1 NIST SHA-1 message digest algorith pn libproc-daemon-perl(no description available) ii perl [libdigest-md5-perl] 5.8.7-4Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#317390: debpool: improper [GENERAL/ERROR] Skipping package entry ...
Package: debpool Version: 0.2.2 Severity: important Tags: experimental I get the following when trying to create a local package set for 3270: 2005-07-07 22:39:11 [GENERAL/DEBUG] Starting processing run 2005-07-07 22:39:11 [GENERAL/INFO] Processing changefile '3270_3.3.4p4-1_i386.changes' 2005-07-07 22:39:12 [INSTALL/INFO] Installed 3270 (3.3.4p4-1) to distribution(s): sid 2005-07-07 22:39:13 [GENERAL/ERROR] Skipping package entry for all packages from 3270: couldn't open '/var/cache/debpool/pool/main/3/3270/3270_3.3.4p4-1.package' for reading: No such file or directory Which is odd, since main is not referenced anywhere ! $ egrep -e '(Package|Section):' /var/cache/debpool/pool/non-free/3/3270/3270_3.3.4p4-1.package Package: c3270 Section: non-free/net Package: s3270 Section: non-free/net Package: x3270-htmldoc Section: non-free/doc Package: pr3287 Section: non-free/net Package: x3270 Section: non-free/x11 Package: tcl3270 Section: non-free/net Package: xfonts-x3270-misc Section: non-free/x11 Package: 3270-common Section: non-free/net Now, if I cheat and symlink non-free to main (in the pool), things work just fine! -- System Information: Debian Release: testing/unstable APT prefers testing-proposed-updates APT policy: (500, 'testing-proposed-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-rc5-mm1 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages debpool depends on: ii perl 5.8.7-3Larry Wall's Practical Extraction Versions of packages debpool recommends: ii gnupg 1.4.1-1GNU privacy guard - a free PGP rep ii libdigest-sha1-perl 2.10-1 NIST SHA-1 message digest algorith pn libproc-daemon-perl(no description available) ii perl [libdigest-md5-perl] 5.8.7-3Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]