Re: [PATCH] RPM vfs ignores conflicts



Hi Leonard,

On Tue, 2006-10-31 at 20:44 +0100, Leonard den Ottolander wrote:
> Hi Jindrich,
> 
> On Tue, 2006-10-31 at 16:07 +0100, Jindrich Novy wrote:
> > 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.
> 
> While you're at it, could you provide a similar patch for rpms please?

sure :) here we go with the patched trpm vfs as well. rpms fortunately
doesn't need any changes.

Cheers,
Jindrich
--- 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;;
 	*)
 	    ;;
--- mc/vfs/extfs/trpm.rpmconf	2006-08-01 23:03:18.000000000 +0200
+++ mc/vfs/extfs/trpm	2006-11-01 09:45:42.000000000 +0100
@@ -112,12 +112,15 @@
 	echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
     $RPM -q --qf "[%{PROVIDES}\n]" -- "$1" | grep "(none)" > /dev/null ||
 	echo "$FILEPREF 0 $DATE INFO/PROVIDES"
+    $RPM -q --qf "[%{CONFLICTS}\n]" -- "$1" | grep "(none)" > /dev/null ||
+	echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
     test "`$RPM -q --qf \"%{CHANGELOGTEXT}\" -- "$1"`" = "(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
 
@@ -148,6 +151,7 @@
 	INFO/REQUIRENAME)	$RPM -q --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" -- "$1" > "$3"; exit 0;;
 	INFO/OBSOLETES)		$RPM -q --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" -- "$1" > "$3"; exit 0;;
 	INFO/PROVIDES)		$RPM -q --qf "[%{PROVIDES}\n]" -- "$1" > "$3"; exit 0;;
+	INFO/CONFLICTS)		$RPM -q --qf "[%{CONFLICTS}\n]" -- "$1" > "$3"; exit 0;;
 	INFO/SCRIPTS/PREIN)	$RPM -q --qf "%{RPMTAG_PREIN}\n" -- "$1" > "$3"; exit 0;;
 	INFO/SCRIPTS/POSTIN)	$RPM -q --qf "%{RPMTAG_POSTIN}\n" -- "$1" > "$3"; exit 0;;
 	INFO/SCRIPTS/PREUN)	$RPM -q --qf "%{RPMTAG_PREUN}\n" -- "$1" > "$3"; exit 0;;


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