This patch allows to check multiple trees for conflicts at once.
Useful to call like:

  $ check-conflicts -p /usr/ports/x11/kde:/usr/ports/x11/kde4

Okay?

--
  WBR,
    Vadim Zhukov


Index: bin/check-conflicts
===================================================================
RCS file: /cvs/ports/infrastructure/bin/check-conflicts,v
retrieving revision 1.2
diff -u -p -r1.2 check-conflicts
--- bin/check-conflicts 20 Aug 2010 14:09:59 -0000      1.2
+++ bin/check-conflicts 11 Aug 2013 18:21:11 -0000
@@ -206,6 +206,14 @@ sub handle_file
        handle_plist($ui, $filename, $plist);
 }
 
+sub handle_portspath
+{
+       my ($ui, $path) = @_;
+       foreach (split(/:/, $path)) {
+               handle_portsdir($ui, $_);
+       }
+}
+
 sub handle_portsdir
 {
        my ($ui, $dir) = @_;
@@ -249,7 +257,7 @@ if ($opt_d) {
                handle_file($ui, "$opt_d/$pkgname");
            });
 } elsif ($opt_p) {
-       handle_portsdir($ui, $opt_p);
+       handle_portspath($ui, $opt_p);
 } elsif (@ARGV==0) {
        @ARGV=(<*.tgz>);
 }
Index: man/man1/check-conflicts.1
===================================================================
RCS file: /cvs/ports/infrastructure/man/man1/check-conflicts.1,v
retrieving revision 1.3
diff -u -p -r1.3 check-conflicts.1
--- man/man1/check-conflicts.1  9 Sep 2010 19:17:06 -0000       1.3
+++ man/man1/check-conflicts.1  11 Aug 2013 18:21:11 -0000
@@ -78,6 +78,9 @@ in
 .It Fl p Ar portsdir
 Traverse the ports directory for packing-lists, using
 .Ar print-plist-all .
+More than one directory could be specified by delimiting them by colon,
+e.g.:
+.Pa /usr/ports/x11/kde:/usr/ports/x11/kde4 .
 .El
 .Sh SEE ALSO
 .Xr pkg_add 1 ,

Reply via email to