Ticket #1588: mc-rpmfs.patch

File mc-rpmfs.patch, 5.6 KB (added by arekm, 10 years ago)

rpmfs enhacement

  • mc-4.7.0-pre2/vfs/extfs/rpm

    old new  
    5050    echo "-r-xr-xr-x   1 root     root    39 $DATE INSTALL" 
    5151    echo "-r-xr-xr-x   1 root     root    39 $DATE UPGRADE" 
    5252    echo "dr-xr-xr-x   3 root     root     0 $DATE INFO" 
    53     echo "$FILEPREF 0 $DATE INFO/NAME-VERSION-RELEASE" 
     53    if [ "`$RPM -qp --qf \"%{EPOCH}\" \"$1\"`" = "(none)" ]; then 
     54            echo "$FILEPREF 0 $DATE INFO/NAME-VERSION-RELEASE" 
     55    else 
     56            echo "$FILEPREF 0 $DATE INFO/NAME-EPOCH:VERSION-RELEASE" 
     57    fi 
    5458    echo "$FILEPREF 0 $DATE INFO/GROUP" 
    5559    echo "$FILEPREF 0 $DATE INFO/BUILDHOST" 
    5660    echo "$FILEPREF 0 $DATE INFO/SOURCERPM" 
     
    6367         echo "$FILEPREF 0 $DATE INFO/DESCRIPTION" 
    6468     test "`$RPM -qp --qf \"%{SUMMARY}\" \"$f\"`" = "(none)" || 
    6569         echo "$FILEPREF 0 $DATE INFO/SUMMARY" 
    66      if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$f\"`" != "(none)(none)(none)(none)(none)"; then 
     70     if test "`$RPM -qp --qf \"%{RPMTAG_PREINPROG}%{RPMTAG_POSTINPROG}%{RPMTAG_PREUNPROG}%{RPMTAG_POSTUNPROG}%{VERIFYSCRIPTPROG}%{TRIGGERSCRIPTPROG}\" \"$1\"`" != "(none)(none)(none)(none)(none)"; then 
    6771        echo "dr-xr-xr-x   1 root     root     0 $DATE INFO/SCRIPTS" 
    6872        test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$f\"`" = '(none)' || 
    6973           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN" 
     74        test "`$RPM -qp --qf \"%{RPMTAG_PREINPROG}\" \"$1\"`" = '(none)' || 
     75           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREINPROG" 
    7076        test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$f\"`" = '(none)' || 
    7177           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN" 
     78        test "`$RPM -qp --qf \"%{RPMTAG_POSTINPROG}\" \"$1\"`" = '(none)' || 
     79           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTINPROG" 
    7280        test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$f\"`" = '(none)' || 
    7381           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN" 
     82        test "`$RPM -qp --qf \"%{RPMTAG_PREUNPROG}\" \"$1\"`" = '(none)' || 
     83           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUNPROG" 
    7484        test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$f\"`" = '(none)' || 
    7585           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN" 
     86        test "`$RPM -qp --qf \"%{RPMTAG_POSTUNPROG}\" \"$1\"`" = '(none)' || 
     87           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUNPROG" 
    7688        test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$f\"`" = '(none)' || 
    7789           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT" 
     90        test "`$RPM -qp --qf \"%{VERIFYSCRIPTPROG}\" \"$1\"`" = '(none)' || 
     91           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPTPROG" 
     92        test "`$RPM -qp --qf \"%{TRIGGERSCRIPTS}\" \"$1\"`" = '(none)' || 
     93           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/TRIGGERSCRIPTS" 
     94        test "`$RPM -qp --qf \"%{TRIGGERSCRIPTPROG}\" \"$1\"`" = '(none)' || 
     95           echo "$FILEPREF 0 $DATE INFO/SCRIPTS/TRIGGERSCRIPTPROG" 
    7896        echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL" 
    7997     fi 
    8098    else 
     
    84102     echo "$FILEPREF 0 $DATE INFO/SUMMARY" 
    85103     echo "dr-xr-xr-x   1 root     root     0 $DATE INFO/SCRIPTS" 
    86104     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN" 
     105     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREINPROG" 
    87106     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN" 
     107     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTINPROG" 
    88108     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN" 
     109     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUNPROG" 
    89110     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN" 
     111     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUNPROG" 
    90112     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT" 
     113     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPTPROG" 
     114     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/TRIGGERSCRIPTS" 
     115     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/TRIGGERSCRIPTPROG" 
    91116     echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL" 
    92117    fi 
    93118    if test "$MCFASTRPM" = 0 ; then 
     
    140165        UPGRADE) echo "# Run this to upgrade this RPM package" > "$3"; exit 0;; 
    141166        ERROR) $RPM -qip "$f" > /dev/null 2> "$3"; exit 0;; 
    142167        INFO/NAME-VERSION-RELEASE)      $RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$f" > "$3"; exit 0;; 
     168        INFO/NAME-EPOCH:VERSION-RELEASE) $RPM -qp --qf "%{NAME}-%{EPOCH}:%{VERSION}-%{RELEASE}\n" "$1" > "$3"; exit 0;; 
    143169        INFO/RELEASE)           $RPM -qp --qf "%{RELEASE}\n" "$f" > "$3"; exit 0;; 
    144170        INFO/GROUP)             $RPM -qp --qf "%{GROUP}\n" "$f" > "$3"; exit 0;; 
    145171        INFO/DISTRIBUTION)      $RPM -qp --qf "%{DISTRIBUTION}\n" "$f" > "$3"; exit 0;; 
     
    156182        INFO/REQUIRENAME)       $RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;; 
    157183        INFO/PROVIDES)          $RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;; 
    158184        INFO/SCRIPTS/PREIN)     $RPM -qp --qf "%{RPMTAG_PREIN}\n" "$f" >"$3"; exit 0;; 
     185        INFO/SCRIPTS/PREINPROG) $RPM -qp --qf "%{RPMTAG_PREINPROG}\n" "$1" >"$3"; exit 0;; 
    159186        INFO/SCRIPTS/POSTIN)    $RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$f" >"$3"; exit 0;; 
     187        INFO/SCRIPTS/POSTINPROG)        $RPM -qp --qf "%{RPMTAG_POSTINPROG}\n" "$1" >"$3"; exit 0;; 
    160188        INFO/SCRIPTS/PREUN)     $RPM -qp --qf "%{RPMTAG_PREUN}\n" "$f" >"$3"; exit 0;; 
     189        INFO/SCRIPTS/PREUNPROG) $RPM -qp --qf "%{RPMTAG_PREUNPROG}\n" "$1" >"$3"; exit 0;; 
    161190        INFO/SCRIPTS/POSTUN)    $RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$f" >"$3"; exit 0;; 
     191        INFO/SCRIPTS/POSTUNPROG)        $RPM -qp --qf "%{RPMTAG_POSTUNPROG}\n" "$1" >"$3"; exit 0;; 
    162192        INFO/SCRIPTS/VERIFYSCRIPT)      $RPM -qp --qf "%{VERIFYSCRIPT}\n" "$f" >"$3"; exit 0;; 
     193        INFO/SCRIPTS/VERIFYSCRIPTPROG)  $RPM -qp --qf "%{VERIFYSCRIPTPROG}\n" "$1" >"$3"; exit 0;; 
     194        INFO/SCRIPTS/TRIGGERSCRIPTS)    $RPM -qp --triggers "$1" > "$3"; exit 0;; 
     195        INFO/SCRIPTS/TRIGGERSCRIPTPROG) $RPM -qp --qf "%{TRIGGERSCRIPTPROG}\n" "$1" > "$3"; exit 0;; 
    163196        INFO/SCRIPTS/ALL)               $RPM -qp --scripts "$f" > "$3"; exit 0;; 
    164197        INFO/SUMMARY)           $RPM -qp --qf "%{SUMMARY}\n" "$f" > "$3"; exit 0;; 
    165198        INFO/OS)                $RPM -qp --qf "%{OS}\n" "$f" > "$3"; exit 0;;