Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-13 Thread Dominique Devriese
David Pashley writes:
>> Also, as domi said when you use svn you should move the file not
>> add/remove so that changes can be tracked. :)
>>
> I did an svn move check-conflicts.pl check-replaces. that is what it
> did. Not sure if it kept the history.

Oh, sorry, it didn't look like that in the commit log message.

cheers
domi



Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-13 Thread Chris Cheney
On Fri, Feb 13, 2004 at 11:35:12AM +, David Pashley wrote:
> I did an svn move check-conflicts.pl check-replaces. that is what it
> did. Not sure if it kept the history.

Ah ok, I didn't look at it via svn log so it might have kept the
history. It does show the history under viewcvs, but it sucks for svn
anyway. :\

Chris


signature.asc
Description: Digital signature


Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-13 Thread Achim Bohnet
On Friday 13 February 2004 12:35, David Pashley wrote:
> On Feb 12, 2004 at 23:15, Chris Cheney praised the llamas by saying:
> > On Thu, Feb 12, 2004 at 05:53:52PM +0100, David Pashley wrote:
> > > Author: jd-guest
> > > Date: 2004-02-12 17:53:52 +0100 (Thu, 12 Feb 2004)
> > > New Revision: 33
> > > 
> > > Added:
> > >people/jd/scripts/check-replaces
> > > Removed:
> > >people/jd/scripts/check-conflicts.pl
> > > Log:
> > > It has come to my attention that I want to use Replaces, not Conflicts.
> > > script renamed and altered to read Replaces. The concept that a package
> > > conflicts with another package if they contain the same file is kept.
[..]
> > Also, as domi said when you use svn you should move the file not
> > add/remove so that changes can be tracked. :)
> > 
> I did an svn move check-conflicts.pl check-replaces. that is what it
> did. Not sure if it kept the history.

I was curious: yes history is kept.

svn -v svn also list that A comes from a rename


r33 | jd-guest | 2004-02-12 17:53:52 +0100 (Thu, 12 Feb 2004) | 4 lines
Changed paths:
   D /people/jd/scripts/check-conflicts.pl
   A /people/jd/scripts/check-replaces (from 
/people/jd/scripts/check-conflicts.pl:31)

It has come to my attention that I want to use Replaces, not Conflicts.
script renamed and altered to read Replaces. The concept that a package
conflicts with another package if they contain the same file is kept.


...

Can't be svn -v log -r used for the commit mails
(without ^---)? Or is the transaction not commited at this time?

Achim
> 
> > Chris
> 
> 
> 
> -- 
> David Pashley
> [EMAIL PROTECTED]
> Nihil curo de ista tua stulta superstitione.
> 

-- 
  To me vi is Zen.  To use vi is to practice zen. Every command is
  a koan. Profound to the user, unintelligible to the uninitiated.
  You discover truth everytime you use it.
  -- [EMAIL PROTECTED]



Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-13 Thread David Pashley
On Feb 12, 2004 at 23:15, Chris Cheney praised the llamas by saying:
> On Thu, Feb 12, 2004 at 05:53:52PM +0100, David Pashley wrote:
> > Author: jd-guest
> > Date: 2004-02-12 17:53:52 +0100 (Thu, 12 Feb 2004)
> > New Revision: 33
> > 
> > Added:
> >people/jd/scripts/check-replaces
> > Removed:
> >people/jd/scripts/check-conflicts.pl
> > Log:
> > It has come to my attention that I want to use Replaces, not Conflicts.
> > script renamed and altered to read Replaces. The concept that a package
> > conflicts with another package if they contain the same file is kept.
> 
> I haven't looked at the new script in detail but I wanted to make sure
> you know the following information. If you need to take over a file
> from a package that still exists, but no longer ships that file, just
> use replaces. If you have a file that needs your version and the other
> package still exists and contains that file you need a conflicts. If
> you have a file that needs to take over a file from a package that no
> longer exists then it should be a Conflicts and Replaces, this insures
> that the old package does not stay installed on the system. At least as
> I understand it. ;)

I think I need to do a bit more work in parsing various Packages.gz
files and getting the versions out. I've sure we can work out writing
the conflicts and replaces for us.
> 
> Also, as domi said when you use svn you should move the file not
> add/remove so that changes can be tracked. :)
> 
I did an svn move check-conflicts.pl check-replaces. that is what it
did. Not sure if it kept the history.

> Chris



-- 
David Pashley
[EMAIL PROTECTED]
Nihil curo de ista tua stulta superstitione.


pgp5kL8YPcxi5.pgp
Description: PGP signature


Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-12 Thread Chris Cheney
On Thu, Feb 12, 2004 at 05:53:52PM +0100, David Pashley wrote:
> Author: jd-guest
> Date: 2004-02-12 17:53:52 +0100 (Thu, 12 Feb 2004)
> New Revision: 33
> 
> Added:
>people/jd/scripts/check-replaces
> Removed:
>people/jd/scripts/check-conflicts.pl
> Log:
> It has come to my attention that I want to use Replaces, not Conflicts.
> script renamed and altered to read Replaces. The concept that a package
> conflicts with another package if they contain the same file is kept.

I haven't looked at the new script in detail but I wanted to make sure
you know the following information. If you need to take over a file
from a package that still exists, but no longer ships that file, just
use replaces. If you have a file that needs your version and the other
package still exists and contains that file you need a conflicts. If
you have a file that needs to take over a file from a package that no
longer exists then it should be a Conflicts and Replaces, this insures
that the old package does not stay installed on the system. At least as
I understand it. ;)

Also, as domi said when you use svn you should move the file not
add/remove so that changes can be tracked. :)

Chris


signature.asc
Description: Digital signature


Re: pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-12 Thread Dominique Devriese
David Pashley writes:

> Added:
>people/jd/scripts/check-replaces
> Removed:
>people/jd/scripts/check-conflicts.pl

Isn't one of svn's advantages that you can move a file without
copying+deleting ? :)

cheers
domi



pkg-kde: commit - rev 33 - people/jd/scripts

2004-02-12 Thread David Pashley
Author: jd-guest
Date: 2004-02-12 17:53:52 +0100 (Thu, 12 Feb 2004)
New Revision: 33

Added:
   people/jd/scripts/check-replaces
Removed:
   people/jd/scripts/check-conflicts.pl
Log:
It has come to my attention that I want to use Replaces, not Conflicts.
script renamed and altered to read Replaces. The concept that a package
conflicts with another package if they contain the same file is kept.


Deleted: people/jd/scripts/check-conflicts.pl
===
--- people/jd/scripts/check-conflicts.pl2004-02-11 23:11:04 UTC (rev 32)
+++ people/jd/scripts/check-conflicts.pl2004-02-12 16:53:52 UTC (rev 33)
@@ -1,135 +0,0 @@
-#!/usr/bin/perl
-
-#
-# check-conflicts - Checks for conflicting files in packages currently
-# in stable, testing and unstable.
-#
-# (c) 2004 David Pashley <[EMAIL PROTECTED]>
-# $Id:$
-#
-#
-# This package is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 dated June, 1991.
-#
-# This package is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this package; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-
-
-use warnings;
-use strict;
-use File::Find;
-use Data::Dumper;
-use Cwd;
-
-$|=1;
-
-my %filelist;
-my %conflicts;
-my %control_conflicts;
-my $dir = getcwd;
-
-sub dh_listpackages { # {{{
-   my @packages;
-   my $current_package;
-   open CONTROL, "debian/control" or die "could not open debian/control: $!\n";
-   while () {
-  chomp;
-  if (m/Package: (.*)$/) {
- push @packages, $1;
- $current_package = $1;
-  }
-  if (m/Conflicts: (.*)$/) {
- my %temp;
- for my $conflict ( split /, /, $1) {
-$conflict =~ m/^([\-a-zA-Z0-9]+)( .*)?/;
-$temp{$1} = $conflict;
- }
- $control_conflicts{$current_package} = \%temp;
-  }
-   }
-   close CONTROL;
-   return @packages;
-} # }}}
-
-sub load_filelists { # {{{
-
-   for my $package (dh_listpackages) {
-  find(\&wanted, "debian/$package");
-   }
-} # }}}
-
-sub wanted { # {{{
-   if (my ($package,$file) = $File::Find::name =~ m|debian/(.*?)/(.*)|) {
-  return if $file =~ m/^DEBIAN/;
-  return unless -f "$dir/$File::Find::name"; 
-  if (exists $filelist{$file}) { 
- print STDERR "$file is in $package and " .$filelist{$file} ."\n"; 
-  } else {
- # TODO You may actually want this to be true.
- $filelist{$file} = $package;
-  }
-   }
-} # }}}
-
-sub check_Contents { # {{{
-# Yes I kow it is hacky, but it is also the fastest method 
-#Benchmark: timing 10 iterations of Compress::Zlib, IO::Zlib, zcat...
-#Compress::Zlib:  55 wallclock secs ( 54.84 usr +  0.19 sys
 =  55.03 CPU) @  0.18/s (n=10)
-#  IO::Zlib: 115 wallclock secs (114.48 usr +  0.20 sys
 = 114.68 CPU) @  0.09/s (n=10)
-#  zcat:  23 wallclock secs ( 14.10 usr0.57 sys +  7.16 cusr  0.65 
csys =  22.48 CPU) @  0.68/s (n=10)
-   my $dist = shift;
-   my $contents 
="/var/cache/apt/ftp.uk.debian.org_debian_dists_${dist}_Contents-i386.gz";
-   open ZCAT, "zcat $contents|" or die "could not open $contents: $!\n";
-   while (){ last if m/^FILE   /; } # Skip the preamble
-   my ($file, $packages); 
-   while (my $line = ){
-  ($file) = $line =~ m/^(.*?)\s/;
-  if (exists $filelist{$file}) {
- ($file, $packages) = $line =~ m/^(.*?)\s+(.*)$/;
- my @packages;
- for my $package (split /,/, $packages) {
-$package =~ s#^.*/##;
-push @packages,  $package;
- }
- if (@packages = grep !/\Q$filelist{$file}\E/, @packages) {
-#print $filelist{$file} . " conflicts with ". join (', ', 
@packages) . " $file\n";
-for my $package (@packages) {
-   ${ $conflicts{ $filelist{$file} } }->{$package} = $dist;
-}
- }
-  }
-   }
-   close ZCAT;
-} # }}}
-
-
-load_filelists;
-
-print "parsing Contents.gz: ";
-for my $dist ("stable", "testing", "unstable") {
-   print "$dist ";
-   check_Contents $dist;
-}
-print "done\n";
-
-#print Dumper(\%conflicts);
-for my $package (sort keys %conflicts) {
-   print "$package:\n";
-   for my $pkg (sort keys %${$conflicts{$package}}) {
-  print "\tconflicts with $pkg in " . ${ $conflicts{ $package } }->{$pkg};
-  if (exists $control_conflicts{$package}->{$pkg}) {
- print " currently listed as: $control_conflicts{$package}->{$pkg}";
-  }
-  print "\n";
-   }
-}
-

Copied: people/jd/scripts/check-replaces (from rev 31, 
pe