[php-apt-parser-maint] r32 - in /trunk: ChangeLog LICENSE README examples/ packages.cgi parse-apt-files.inc

dleidert-guest at users.alioth.debian.org dleidert-guest at users.alioth.debian.org
Tue Jan 8 13:17:58 UTC 2008


Author: dleidert-guest
Date: Tue Jan  8 13:17:58 2008
New Revision: 32

URL: http://svn.debian.org/wsvn/php-apt-parser/?sc=1&rev=32
Log:
* Merged des branch into trunk. I think, this is stable enough.

* Fixed ChangeLog timestamps.


Added:
    trunk/examples/
      - copied from r31, branches/des/examples/
    trunk/packages.cgi
      - copied unchanged from r31, branches/des/packages.cgi
Modified:
    trunk/ChangeLog
    trunk/LICENSE
    trunk/README
    trunk/parse-apt-files.inc   (contents, props changed)

Modified: trunk/ChangeLog
URL: http://svn.debian.org/wsvn/php-apt-parser/trunk/ChangeLog?rev=32&op=diff
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Tue Jan  8 13:17:58 2008
@@ -1,17 +1,122 @@
-2006-06-24  Damián Viano  <debian at damianv.com.ar>
-	* README: added info from parse-apt-files.inc
-	* ChangeLog: added entries from parse-apt-files.inc
-	* LICENSE: added MIT license, and Jarno Elonen copyright notice
-	* parse-apt-files.inc: removed all that (now) redundant info
+2008-01-08  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.6:
+	* Merged des branch into trunk. I think, this is stable enough.
 
-2004-10-17  Jarno Elonen  <elonen at debian.org>
-	Version 1.2
+2008-01-08  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.6:
+	* parse-apt-files.inc (chb_file_link_from_directory):
+	  - Added missing "global $base_url;". Thanks to Janek Thomaschewski
+	    for the hint.
+
+2007-12-23  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.5:
+	* parse-apt-files.inc:
+	  - 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.
+
+2007-03-01  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.4:
+	* parse-apt-files.inc:
+	  - Added some more classes to allow more customization.
+
+2007-02-28  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.3:
+	* parse-apt-files.inc:
+	  - Moved the .changes and .build detection into two functions:
+	    chb_file_link_from_directory() opens the given directory and reads
+	    all files with the given extension. To check, if the file belongs
+	    to a package, it calls chb_file_match(). This function creates a
+	    string from the given values and tests, if the filename begings
+	    with this string. This change was made, because the code to check
+	    for .changes and .build files was very simlar.
+	    This code change also reverts a change made to link-target
+	    creation, made by Damián Viano (read Alioth bug #304089 for more
+	    information). Because I also did not find out, for what $some_bin
+	    was used, this part was also removed and the code to determine the
+	    search path simplified.
+	  - I further "fixed" the indentation for function parse_section.
+	  - Added some more documentation.
+
+2007-02-28  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.2:
+	* ChangeLog: Added missing entries for last change.
+	* parse-apt-files.inc:
+	  - Fixed bugs in the .build files search/link creation code
+	    introduced in revision 21 (1.3.1).
+	  - Reorganized the steps we do without further code-changes.
+	  - Added some information to the header comment.
+
+2006-11-19  Daniel Leidert  <daniel.leidert at wgdd.de>, 1.3.1:
+	* parse-apt-files.inc:
+	  - Fixed Alioth bug #304143. I tried to read a non-existing field in
+	    Sources and it seems, this confused the script a bit.
+	    (http://alioth.debian.org/tracker/?func=detail&aid=304143&group_id=30953&atid=412507)
+
+2006-06-24  Damián Viano  <debian at damianv.com.ar>, 1.3.0:
+	* README: added info from parse-apt-files.inc, and mention to debarchiver
+	  specific usage
+	* ChangeLog: added entries from parse-apt-files.inc, make it consistent
+	* LICENSE: added MIT license, and Jarno Elonen, Daniel Leidert and Damián
+	  Viano copyright notice
+	* parse-apt-files.inc: 
+	  - bring file up to date, 
+	  - removed all that (now) redundant info
+	* examples/: 
+	  - added example packages.cgi
+	  - added example packages.css
+
+2006-04-27, Damián Viano <debian at damianv.com.ar>, 1.2.9:
+	* parse-apt-files.inc: 
+	  - added span, and class declarations for css, also removed hardcoded
+	    formating
+	  - improved html formating
+
+2006-04-26, Damián Viano <debian at damianv.com.ar.>, 1.2.8:
+	* parse-apt-files.inc: 
+	  - added support for a $base_url global to make links absolutes, useful
+	    when runned as cgi
+	  - smart striping absolute paths from changes and buildlog files based on
+	    $base_url
+	  - fix typo in parsing that messed descriptions with two spaces in the
+	    beggining of a description line
+
+2006-01-04, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.7:
+	* parse-apt-files.inc: 
+	  - when searching for .changes and .build files, the search failed, if
+	  	version number contained x:up_ver-deb_ver (e.g.  3:3.0.5-1). We now
+	  	remove a leading 'x:' from the version number and finally find our
+	  	files.
+
+2005-09-21, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.6:
+	* parse-apt-files.inc: 
+	  - removed id from package description fields (reverts 1.2.5 changes)
+
+2005-06-27, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.5:
+	* parse-apt-files.inc: 
+	  - add id to package description fields <b id= "MD5SUM_PACKAGE_VERSION"></b>
+
+2005-06-23, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.4:
+	* parse-apt-files.inc: 
+	  - output section after version if contrib or non-free
+	  - fix XHTML output (validated against http://schneegans.de/sv/)
+
+2005-06-18, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.3:
+	* parse-apt-files.inc: 
+	  - links to .build files can be included in overview (found similiar to
+	    .changes files)
+
+2005-06-08, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.2:
+	* parse-apt-files.inc: 
+	  - .changes files of binary-only uploads are now detected
+
+2005-04-20, Daniel Leidert <daniel.leidert at wgdd.de>, 1.2.1:
+	* parse-apt-files.inc: 
+	  - added support for multiple Sources.gz files in parse_and_list()
+	  - added support for shared directory containing.changes files
+	  - quick fix for html link regex
+
+2004-10-17  Jarno Elonen  <elonen at debian.org>, 1.2.0:
 	* parse-apt-files.inc: 
 	  - search for .changes file and print a link if possible
 	  - support for non-compressed Packages and Sources files
 
-2004-08-09  Jarno Elonen  <elonen at debian.org>
-	Version 1.1
+2004-08-09  Jarno Elonen  <elonen at debian.org>, 1.1.0:
 	* parse-apt-files.inc: 
 	  - added support for multiple architectures (thanks to  Djoumé Salvetti)
 	  - added support for multiple versions of the same package

Modified: trunk/LICENSE
URL: http://svn.debian.org/wsvn/php-apt-parser/trunk/LICENSE?rev=32&op=diff
==============================================================================
--- trunk/LICENSE (original)
+++ trunk/LICENSE Tue Jan  8 13:17:58 2008
@@ -1,7 +1,21 @@
 Copyright (c) 2003-2006 Jarno Elonen <elonen at iki.fi>
+Copyright (c) 2005-2007 Daniel Leidert <daniel.leidert at wgdd.de> 
+Copyright (c) 2006 Damián Viano <debian at damianv.com.ar> 
 
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. 

Modified: trunk/README
URL: http://svn.debian.org/wsvn/php-apt-parser/trunk/README?rev=32&op=diff
==============================================================================
--- trunk/README (original)
+++ trunk/README Tue Jan  8 13:17:58 2008
@@ -8,4 +8,20 @@
 ... or if the repository consist of multiple Packages files:
 
  include_once("parse-apt-files.inc");
- parse_and_list( Array("i386/Packages.gz", "powerpc/Packages.gz"), "Sources.gz" );
+ parse_and_list( 
+     Array("i386/Packages.gz", 
+           "powerpc/Packages.gz"), 
+     "Sources.gz" );
+
+... or especially for debarchiver:
+
+ include_once("parse-apt-files.inc");
+ parse_and_list(
+     Array("dists/sid/main/binary-i386/Packages.gz",
+           "dists/sid/contrib/binary-i386/Packages.gz",
+           "dists/sid/non-free/binary-i386/Packages.gz"),
+     Array("dists/sid/main/source/Sources.gz",
+           "dists/sid/contrib/source/Sources.gz",
+           "dists/sid/non-free/source/Sources.gz"),
+     "dists/sid/installed",
+     "build_logs");

Modified: trunk/parse-apt-files.inc
URL: http://svn.debian.org/wsvn/php-apt-parser/trunk/parse-apt-files.inc?rev=32&op=diff
==============================================================================
--- trunk/parse-apt-files.inc (original)
+++ trunk/parse-apt-files.inc Tue Jan  8 13:17:58 2008
@@ -1,11 +1,20 @@
 <?php
     //////////////////////////////////////////////////////////////////
-    // PHP Apt-file parser, Version 1.2
+    // PHP Apt-file parser, Version 1.3.6
+    // $Id$
     //
     // The following PHP functions parse Debian APT-repository files
     // (Packages.gz, Sources.gz) and generate an XHTML summary of them.
     //
     // Written by Jarno Elonen in 2003, 2004
+    // Written by Daniel Leidert in 2005-2007
+    // Written by Damian Viano in 2006
+    //
+    // Visit or join us at
+    //   http://alioth.debian.org/projects/php-apt-parser.
+    //
+    // For licensing information see the LICENSE file.
+    //
     //////////////////////////////////////////////////////////////////
 
     // Parse Packages.gz or Sources.gz file and return an array of format
@@ -13,7 +22,7 @@
     // Note that the result may contain several versions of the same package
     function parse_packages( $filename )
     {
-        $lines = (strpos( $filename, '.gz' ) !== False)
+        $lines = (strpos($filename, ".gz") !== False)
           ? gzfile($filename) : file($filename);
 
         $i = -1;
@@ -24,7 +33,7 @@
         foreach( $lines as $line )
         {
             $matches = Array();
-            if ( preg_match( "/^([^ ]*):( )?(.*)$/", $line, $matches ))
+            if ( preg_match("/^([^ ]*):( )?(.*)$/", $line, $matches) )
             {
                 if ( $curtag !== false && $i >= 0 )
                     $res[$i][1][$curtag] = $value;
@@ -40,11 +49,11 @@
             {
                 if ( trim($line) !== "." )
                 {
-                    if ( $newtag || substr( 0,2 ) == "  " )
+                    if ( $newtag || substr($line, 0, 2) == "  " )
                         $value .= "\n";
                     else
                         $value .= " ";
-                    $value .= trim( $line );
+                    $value .= trim($line);
                 }
                 else $value .= "\n\n";
                 $newtag = false;
@@ -59,9 +68,10 @@
     // Convert given byte-size to more human readable format
     function human_format_size( $bytes )
     {
-        $formats = Array("%d Bytes", "%.1f KB", "%.1f MB", "%.1f GB", "%.1f TB");
+        $formats = Array("%d Bytes", "%.1f KB", "%.1f MB", "%.1f GB",
+                         "%.1f TB");
         $logsize = min((int)(log($bytes)/log(1024)), count($formats)-1);
-        return sprintf( $formats[$logsize], $bytes/pow(1024, $logsize));
+        return sprintf($formats[$logsize], $bytes/pow(1024, $logsize));
     }
 
     // Extract URLs from text, make them links and output
@@ -69,112 +79,211 @@
     function link_aware_htmlize( $txt )
     {
         $res = "";
-        $linkpattern = '!([a-z]+://[^ $]+)!is';
-        $frags = preg_split( $linkpattern, $txt, -1, PREG_SPLIT_DELIM_CAPTURE);
+        $linkpattern = "!([a-z]+://[^ \n    \)$]+)!is";
+        $frags = preg_split($linkpattern, $txt, -1, PREG_SPLIT_DELIM_CAPTURE);
         foreach( $frags as $f )
         {
-            if ( preg_match( $linkpattern, $f ))
-                $res .= '<a href="' . htmlentities($f) . '">' . htmlentities($f) . '</a>';
+            if ( preg_match($linkpattern, $f) )
+                $res .= "<a href=\"" . htmlentities($f) . "\">" .
+                        htmlentities($f) . "</a>";
             else
-                $res .= htmlentities( $f );
-        }
-        return str_replace( "\n", "<br/>", $res );
-    }
-
-    // Parse given files and write out a nice summary in HTML
-    function parse_and_list( $packagesgzfiles, $sourcesgzfile )
-    {
-        $sources_temp = parse_packages( $sourcesgzfile );
-
-    // Rebuild sources array
+                $res .= htmlentities($f);
+        }
+        return str_replace("\n", "<br/>\n", $res);
+    }
+
+    function parse_section( $section )
+    {
+        $res = "<span class=\"section\">";
+        if ( preg_match("!(contrib/[a-z]+)!is", $section) )
+            $res .= ", <span class=\"contrib\">contrib</span>";
+        else if ( preg_match("!(non-free/[a-z]+)!is", $section) )
+            $res .= ", <span class=\"nonfree\">non-free</span>";
+        else
+            $res .= ", <span class=\"main\">main</span>";
+        return $res . "</span>";
+    }
+
+    // We simply check, if the created filename fits exactly the beginning of
+    // 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, $version, $field )
+    {
+        $res = false;
+        if ( strpos( $file, $field . "_" . $version, 0 ) !== False )
+          return $file;
+        else
+          return $res;
+    }
+
+    // Get a directory and which files to search for. Try to make a file link.
+    // 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_link_from_directory( $dir, $ext, $myfields, $mysrcdields )
+    {
+        global $base_url;
+        $dhandle = false;
+        $version = preg_replace("/^[0-9]+\:/", "", $myfields["Version"]);
+
+        // If no special directory was given, we set the directory found in
+        // the "Directory" field of the Sources(.gz) entry as search path.
+        if ( $dir == False )
+            $dir = $mysrcdields["Directory"];
+
+        if ( $dir !== False && $dhandle = opendir($dir) )
+        {
+            $chfile = False;
+            
+            while ( false !== ($file = readdir($dhandle)) )
+            {
+                $fileinfo = pathinfo($file);
+                // Only check files, that are not '.' or '..' and have the
+                // necessary file extension. This maybe reduces the workload.
+                if ( $file != "."
+                     && $file != ".."
+                     && $fileinfo["extension"] == $ext )
+                { 
+                    // Packages with multiple binaries or a source-package
+                    // name != binary-package name normally have a
+                    // "Source"-field in Packages(.{gz,bz2}).
+                    if ( isset($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, $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, $version, $myfields["Package"]);
+                }
+                if ( $chfile !== False )
+                {
+                        print "| <span class=\"" .
+                        $ext .
+                        "\"><a href=\"" .
+                        htmlentities($base_url) .
+                        htmlentities($dir) .
+                        "/" .
+                        htmlentities($chfile) .
+                        "\">" . "." .
+                        htmlentities($ext) .
+                        "</a></span>" . "\n";
+                    break;
+                }
+            }
+            closedir($dhandle);
+        }
+    }
+
+    // Parse given files and write out a nice summary in HTML.
+    // This is the main function.
+    function parse_and_list( $packagesgzfiles, $sourcesgzfile,
+                             $shared_changesdir = False,
+                             $shared_buildlogsdir = False )
+    {
+        global $base_url;
+        if ( !is_array($sourcesgzfile) )
+            $sourcesgzfile = Array($sourcesgzfile);
+        
+        // Rebuild sources array
         $sources = Array();
-        while( list($i, $p) = each( $sources_temp ))
-            $sources[$p[0]] = $p[1];
-
-        if (!is_array($packagesgzfiles))
+        foreach( $sourcesgzfile as $f )
+        {
+            $sources_temp = parse_packages($f);
+            while( list($i, $p) = each($sources_temp) )
+                    $sources[$p[0]] = $p[1];
+        }
+
+        if ( !is_array($packagesgzfiles) )
             $packagesgzfiles = Array($packagesgzfiles);
 
         // Merge different architectures into one $packages array
         $packages = Array();
         foreach( $packagesgzfiles as $f )
         {
-            $pkgs = parse_packages( $f );
-            while( list($i, $p) = each( $pkgs ))
-            {
-                $name_and_ver = $p[0] . '-' . $p[1]['Version'];
-                if (!isset($packages[$name_and_ver]))
+            $pkgs = parse_packages($f);
+            while( list($i, $p) = each($pkgs) )
+            {
+                $name_and_ver = $p[0] . "-" . $p[1]["Version"];
+                if ( !isset($packages[$name_and_ver]) )
                     $packages[$name_and_ver] = Array();
-                $packages[$name_and_ver][$p[1]['Architecture']] = $p;
+                $packages[$name_and_ver][$p[1]["Architecture"]] = $p;
             }
         }
 
         // Walk through the packages and print out the info
-        $first = true;
-        while( list($name_and_ver, $archs) = each( $packages ))
-        {
-            print '<div>';
-
-            if ( !$first )
-                print "<br/>\n";
-            $first = false;
-
+        while( list($name_and_ver, $archs) = each($packages) )
+        {
+            print "<div class=\"package\">\n";
+
+            // $first = false;
             // use the first arch for description etc.
-            ksort( $archs );
+            ksort($archs);
             list($pkg, $fields) = reset($archs);
 
             $srcfields = false;
-            if ( isset( $fields["Source"] ) &&
-                 isset( $sources[$fields["Source"]] ))
+            if ( isset($fields["Source"]) &&
+                 isset($sources[$fields["Source"]]) )
                     $srcfields = $sources[$fields["Source"]];
-            else if ( isset( $sources[$pkg] ))
+            else if ( isset($sources[$pkg]) )
                 $srcfields = $sources[$pkg];
 
-            print '<b>' . htmlentities( $fields["Package"] ) . '</b> '.
-                  '<small>(' . htmlentities( $fields["Version"] ) . ')</small>' . "\n";
-
-            if ( strlen(trim($fields["Description"])))
-                print ' - ' . htmlentities( preg_replace( '/[\n].*/', '',
-                    $fields["Description"] ));
-            print "<br/><small>\n";
+            print "<span class=\"name\">" .
+                  htmlentities($fields["Package"]) .
+                  "</span> " .
+                  "<span class=\"version\">(" .
+                  htmlentities($fields["Version"]) .
+                  parse_section($fields["Section"]) .
+                  ")</span>" .
+                  "\n";
+
+            if ( strlen(trim($fields["Description"])) )
+                print " - <span class=\"short_description\">" .
+                      htmlentities(preg_replace("/[\n].*/", "",
+                        $fields["Description"]));
+            print "</span><br/>\n";
 
             $archlinks = Array();
-            while( list($arch_name, list(, $arch_fields)) = each( $archs ))
-                $archlinks[] = '<a href="' .
-                    htmlentities( $arch_fields["Filename"] ) . '">' .
-                    htmlentities( $arch_name ) . ' (' .
-                    human_format_size( $arch_fields["Size"]) . ")</a>\n";
-            print 'Binary for arch ' . join(', ', $archlinks);
-
-            if ( isset( $srcfields["Directory"] ))
-            {
-                print '| <a href="' .
-                    htmlentities( $srcfields["Directory"] ) .
-                    '">Source dir</a>' . "\n";
-
-                // Try to make a changes file link. This adds quite a bit
-                // of disk access so if your server is very busy, you might
-                // want to comment this out.
-                if ($dhandle = opendir( $srcfields["Directory"] ))
-                {
-                    $chfile = False;
-                    while (false !== ($file = readdir($dhandle)))
-                        if (strpos($file, $srcfields["Package"] . '_' . $srcfields["Version"] . '_') !== False &&
-                            strpos($file, '.changes') !== False )
-                        {
-                          print '| <a href="' . htmlentities( $srcfields["Directory"] . '/' . $file ) .
-                                '">Changes</a>' . "\n";
-                          break;
-                        }
-                    closedir($dhandle);
-                }
-            }
-
-            print "<br/><br/></small></div>\n" .
-                  "<blockquote><div><small>\n" .
+            while( list($arch_name, list(, $arch_fields)) = each($archs) )
+                $archlinks[] = "<a href=\"" .
+                               htmlentities($base_url) .
+                               htmlentities($arch_fields["Filename"]) .
+                               "\">" .
+                               htmlentities($arch_name) .
+                               " (" .
+                               human_format_size($arch_fields["Size"]) .
+                               ")</a>";
+            print "<span class=\"linkline\">Binary for arch <span class=\"archs\">" .
+                  join(", ", $archlinks) . "</span>\n";
+
+            // If sources are available, print out location.
+            if ( isset($srcfields["Directory"]) )
+            {
+                print "| <span class=\"source\"><a href=\"" .
+                    htmlentities($base_url) .
+                    htmlentities($srcfields["Directory"]) .
+                    "\">Source dir</a></span>" . "\n";
+
+            }
+  
+            // Now create .changes and .build file links.
+            chb_file_link_from_directory( $shared_changesdir, "changes", $fields, $srcfields );
+            // The file extenion for build-log should be changeable. For the
+            // moment we set it to the debuild/pdebuild default '.build'.
+            chb_file_link_from_directory( $shared_buildlogsdir, "build", $fields, $srcfields );
+            
+            print "</span>";
+            
+            // Output the package description.
+            print "<br/><br/>\n" .
+                  "<blockquote><p class=\"description\">\n" .
                   link_aware_htmlize(
-                      preg_replace( '/^[^\n]*\n/', '',
-                          $fields["Description"] )) .
-                   "\n</small></div></blockquote>\n\n\n";
+                    preg_replace("/^[^\n]*\n/", "", $fields["Description"])) .
+                  "\n</p>\n" .
+                  "</blockquote>\n</div>\n";
         }
     }
 ?>

Propchange: trunk/parse-apt-files.inc
------------------------------------------------------------------------------
    svn:keywords = Id




More information about the php-apt-parser-maint mailing list