OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael van Elst
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   18-Nov-2002 14:56:14
  Branch: HEAD                             Handle: 2002111813561400

  Modified files:
    openpkg-re              openpkg-index

  Log:
    support Distribution directory (SRC/PLUS/) and updates (UPD/).

  Summary:
    Revision    Changes     Path
    1.11        +22 -2      openpkg-re/openpkg-index
  ____________________________________________________________________________

  Index: openpkg-re/openpkg-index
  ============================================================
  $ cvs diff -u -r1.10 -r1.11 openpkg-index
  --- openpkg-re/openpkg-index  18 Nov 2002 11:15:02 -0000      1.10
  +++ openpkg-re/openpkg-index  18 Nov 2002 13:56:14 -0000      1.11
  @@ -403,15 +403,35 @@
   #
   sub xml_record ($$) {
       my($fh, $a) = @_;
  -    my($srcrpm);
  +    my($maj,$min,$rel,$sub, $srcrpm);
   
       $srcrpm =
           n($a,'Name').'-'.
           n($a,'Version').'-'.
           n($a,'Release').'.src.rpm';
   
  +    ($maj,$min,$rel) = n($a,'Release') =~ /^(\d+)\.(\d+)\.(\d+)/;
  +
  +    $sub = '';
  +    if (defined $min) {
  +        if ($maj > 1 || ($maj == 1 && $min > 0)) {
  +            # 1.1 or later
  +            if (n($a,'Distribution') =~ /\[PLUS\]/) {
  +                $sub = 'PLUS/';
  +            }
  +        }
  +        if ($maj > 1 || ($maj == 1 && $min >= 0)) {
  +            # 1.0 or later 
  +            if ($rel > 0) {
  +                $sub = 'UPD/';
  +            }
  +        }
  +    } else {
  +        # current
  +    }
  +    
       print $fh <<EOFEOF;
  -    <rdf:Description about="$srcrpm" href="$srcrpm">
  +    <rdf:Description about="$srcrpm" href="$sub$srcrpm">
   EOFEOF
   
       # fake Source attribute from Source\d attribtutes
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to