Re: [Cooker] ISO Creation
"Chris Cable" [EMAIL PROTECTED] writes: Great job to Warly for putting together the perl script. One question though. What is the easiest way to eliminate duplicate rpms, such as: name-1.0.0-2mdk.rpm name-1.0.0-3mdk.rpm which only differ by the Mandrake revision number? This script based on the file date, output the old files of a list, that you can xargs to rm: perl doble /COOL_PATH/RPMS/* | xargs rm or mv `perl doble /COOL_PATH/RPMS*` /YOUP_PATH/old/ #!/usr/bin/perl #--- # Project : Mandrake # Module : rpm-rebuilder # File: doble # Version : $Id: doble,v 1.4 2000/05/25 03:20:44 flepied Exp $ # Author : Pascal Rigaud # Created On : Thu May 25 15:08:52 2000 #--- @list = sort @ARGV; foreach (@list) { next unless /\.rpm(\.log)?$/; ($name,$ext) = m|([^/]+)-[^-]+-[^-]+\.([^.]+)\.rpm(\.log)?$|; $name="$name.$ext"; if ($name eq $last) { if ((stat($_))[9] (stat($lastfile))[9]) { print "$_ "; next; } if ((stat($_))[9] (stat($lastfile))[9]) { print "$lastfile "; } if ((stat($_))[9] == (stat($lastfile))[9]) { die "__ THIS SHOULDN't HAPP EN __ (2 different rpms with same date) $_\n" } } $last = $name; $lastfile = $_; } print "\n"; # doble ends here -- Warly
[Cooker] ISO Creation
Great job to Warly for putting together the perl script. One question though. What is the easiest way to eliminate duplicate rpms, such as: name-1.0.0-2mdk.rpm name-1.0.0-3mdk.rpm which only differ by the Mandrake revision number? Again, great job on the distro. Chris _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
[Cooker] ISO Creation
Great job to Warly for putting together the perl script. One question though. What is the easiest way to eliminate duplicate rpms, such as: name-1.0.0-2mdk.rpm name-1.0.0-3mdk.rpm which only differ by the Mandrake revision number? Again, great job on the distro. Chris _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: [Cooker] ISO Creation
If I just would have looked a little longer. rsync -av --delete does the trick. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Cable Sent: Tuesday, January 09, 2001 5:03 AM To: Cooker Subject: [Cooker] ISO Creation Great job to Warly for putting together the perl script. One question though. What is the easiest way to eliminate duplicate rpms, such as: name-1.0.0-2mdk.rpm name-1.0.0-3mdk.rpm which only differ by the Mandrake revision number? Again, great job on the distro. Chris _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com