Re: Removing old versions
Horst Graffy <[email protected]> Fri, 14 Jan 2005 14:47:48 +0100
| Newsgroups | gmane.linux.conectiva.apt-rpm |
|---|---|
| Message-ID | <[email protected]> |
I've found the missing piece of my version without rvc ;)
here it is:
change this part in apt-smartclean, and you have a version without dpkg
==>
# 1: a is newer than b
# 0: a and b are the same version
# -1: b is newer than a
# 2: wrong arguments number
argz=['rvc',parsed[1],packages[parsed[0]]]
rc=os.spawnvp(os.P_WAIT,'./rvc',argz)
if rc==0:
print "skipping",fnames[parsed[0]]
continue
if rc==255:
print "\tDeleting",dir+file
if not dryrun: os.unlink(dir+file)
continue
elif rc==1:
print "\tDeleting",dir+fnames[parsed[0]]
if not dryrun: os.unlink(dir+fnames[parsed[0]])
<==
hope this helps
Toni