[PATCH] RPM vfs ignores conflicts

2006-10-31 Thread Jindrich Novy
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 [EMAIL PROTECTED], 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.0 +0200
+++ mc/vfs/extfs/rpm	2006-10-31 12:54:41.0 +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-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [PATCH] RPM vfs ignores conflicts

2006-10-31 Thread Leonard den Ottolander
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?
I'll commit both in one go then. Thanks :) .

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [bug #18136] MC wont work with new bash-3.2 propeply with all directories.

2006-10-31 Thread Leonard den Ottolander
Hi Pavel,

On Mon, 2006-10-30 at 11:45 +0200, Pavel Tsekov wrote:
 IMO, if you intend to work on a fix you should follow the
 suggestion of the bash maintainer to switch over to using
 printf - not only for bash but for all cases.  Of course
 a fallback may be required. After all according to bash
 maintainer:
 
Use of `echo' in portable applications has been deprecated for years.
 
 See: http://www.mail-archive.com/bug-bash@gnu.org/msg02150.html

Yes, I read that comment. However I'm not prepared to start breaking the
functionality of shells that I never use.

 I guess the bash maintainer can give you insight on how to properly
 detect the bash version (if at all necessary).

All I need to establish is whether the version is smaller than 3.2. I
think I will use BASH_VERSINFO for this. If that array doesn't exist I
will assume bash  3.2.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel