[php-apt-parser-maint] r30 - in /branches/des: ChangeLog parse-apt-files.inc
dleidert-guest at users.alioth.debian.org
dleidert-guest at users.alioth.debian.org
Sun Dec 23 03:14:07 UTC 2007
Author: dleidert-guest
Date: Sun Dec 23 03:14:06 2007
New Revision: 30
URL: http://svn.debian.org/wsvn/php-apt-parser/?sc=1&rev=30
Log:
* parse-apt-files.inc:
- Reverting to revision 28. IMHO the cleaner solution.
Modified:
branches/des/ChangeLog
branches/des/parse-apt-files.inc
Modified: branches/des/ChangeLog
URL: http://svn.debian.org/wsvn/php-apt-parser/branches/des/ChangeLog?rev=30&op=diff
==============================================================================
--- branches/des/ChangeLog (original)
+++ branches/des/ChangeLog Sun Dec 23 03:14:06 2007
@@ -1,8 +1,7 @@
2007-03-01 Daniel Leidert <daniel.leidert at wgdd.de>, 1.3.5:
* parse-apt-files.inc:
- - Added a reference to the global $version variable to fix
- chb_file_match() result, which gave incorrect results for .build
- and .changes files.
+ - Make $version a local variable. Seems the global thing doesn't
+ work here and leads to wrongly assumed .build and .changes files.
* LICENSE:
- Fixed copyright.
Modified: branches/des/parse-apt-files.inc
URL: http://svn.debian.org/wsvn/php-apt-parser/branches/des/parse-apt-files.inc?rev=30&op=diff
==============================================================================
--- branches/des/parse-apt-files.inc (original)
+++ branches/des/parse-apt-files.inc Sun Dec 23 03:14:06 2007
@@ -108,11 +108,8 @@
// the name of the given file. If yes, we have our
// This adds quite a bit of disk access so if your server is very busy,
// you might want to comment the function call out.
- function chb_file_match( $file, $field )
- {
- // Reference global $version variable.
- global $version;
-
+ function chb_file_match( $file, $version, $field )
+ {
$res = false;
if ( strpos( $file, $field . "_" . $version, 0 ) !== False )
return $file;
@@ -125,10 +122,6 @@
// you might want to comment the function call out.
function chb_file_link_from_directory( $dir, $ext, $myfields, $mysrcdields )
{
- // Declare $version as global. So we don't need to overhand it to
- // chb_file_match() everytime we call it.
- global $version;
-
$dhandle = false;
$version = preg_replace("/^[0-9]+\:/", "", $myfields["Version"]);
@@ -154,16 +147,16 @@
// name != binary-package name normally have a
// "Source"-field in Packages(.{gz,bz2}).
if ( isset($myfields["Source"]) )
- $chfile = chb_file_match($file, $myfields["Source"]);
+ $chfile = chb_file_match($file, $version, $myfields["Source"]);
// If there is no "Source"-field, just try to use the
// Packages-field in Sources(.{gz,bz2}).
else if ( isset($mysrcdields["Package"]) )
- $chfile = chb_file_match($file, $mysrcdields["Package"]);
+ $chfile = chb_file_match($file, $version, $mysrcdields["Package"]);
// And at least simply try the "Package"-field from
// Packages(.{gz,bz2}) for those packages, that do not
// have a Sources(.{gz,bz2}) entry.
else
- $chfile = chb_file_match($file, $myfields["Package"]);
+ $chfile = chb_file_match($file, $version, $myfields["Package"]);
}
if ( $chfile !== False )
{
More information about the php-apt-parser-maint
mailing list