[PATCH] RPM vfs ignores conflicts



Hi all,

the current RPM vfs allows to see RPM package requires/provides and
obsoletes but lacks an implementation of conflicts. The attached patch
adds INFO/CONFLICTS to the RPM vfs so that conflicts are no more hidden.

Jindrich

-- 
Jindrich Novy <jnovy redhat com>, http://people.redhat.com/jnovy/
(o_                                                           _o)
//\      The worst evil in the world is refusal to think.     //\
V_/_                                                         _\_V

--- mc/vfs/extfs/rpm.rpmconf	2006-08-01 23:03:18.000000000 +0200
+++ mc/vfs/extfs/rpm	2006-10-31 12:54:41.000000000 +0100
@@ -122,12 +122,15 @@
 	echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
     $RPM -qp --qf "[%{PROVIDES}\n]" "$f" | grep "(none)" > /dev/null ||
 	echo "$FILEPREF 0 $DATE INFO/PROVIDES"
+    $RPM -qp --qf "[%{CONFLICTS}\n]" "$f" | grep "(none)" > /dev/null ||
+	echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
     test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$f\"`" = "(none)" ||
        echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
     else 
 	echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
 	echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
 	echo "$FILEPREF 0 $DATE INFO/PROVIDES"
+	echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
         echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
     fi
 
@@ -171,6 +174,7 @@
 	INFO/CHANGELOG)		$RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$f" > "$3"; exit 0;;
 	INFO/SIZE)		$RPM -qp --qf "%{SIZE} bytes\n" "$f" > "$3"; exit 0;;
 	INFO/OBSOLETES)		$RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$f" > "$3"; exit 0;;
+	INFO/CONFLICTS)		$RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$f" >"$3"; exit 0;;
 	CONTENTS.cpio)		$RPM2CPIO "$1" > "$3"; exit 0;;
 	*)
 	    ;;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]