You are not logged in.

#1 2008-04-30 12:06:43

urandom
Member
From: Russia
Registered: 2007-10-01
Posts: 19
Website

Old packages cleaning utility.

Hi, all.

I wrote small program for cleaning local repository from old packages (usually I save cached packages). May be it will be useful.

Project page - http://code.google.com/p/repo-clean/
In AUR:
repo-clean - http://aur.archlinux.org/packages.php?ID=16692
repo-clean-svn - http://aur.archlinux.org/packages.php?ID=16670

Offline

#2 2008-04-30 12:20:53

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Old packages cleaning utility.

neat!
i dont like the fact that scons is a makedepend.
also i assume its written in some programming language (assume c++ and python) in which it should depend to


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#3 2008-04-30 13:48:31

urandom
Member
From: Russia
Registered: 2007-10-01
Posts: 19
Website

Re: Old packages cleaning utility.

dolby wrote:

neat!
i dont like the fact that scons is a makedepend.
also i assume its written in some programming language (assume c++ and python) in which it should depend to

Scons must be in makedepend, because this project builds with scons smile Dependencies about gcc in makedepend fixed now.

Last edited by urandom (2008-04-30 13:52:36)

Offline

#4 2008-04-30 15:57:32

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Old packages cleaning utility.

Hello,

thank you for your contribution. I think the makedependency to gcc is not needed, because gcc is in base-devel and everyone who uses AUR is adviced to have these packages installed. The dependency to pacman also is not needed - everyone who wants to use a package has to have pacman.

I also suggest to put || return 1 behind the scons line and the cp line.

I have a problem: in my repo there are the following packages:

[haawda@bertrand repo-clean]$ ls /opt/repo/cow*
/opt/repo/cowbell-0.2.7.1-4-i686.pkg.tar.gz
/opt/repo/cowbell-svn-30-1-i686.pkg.tar.gz
/opt/repo/cowbell-svn-33-1-i686.pkg.tar.gz
[haawda@bertrand repo-clean]$

So I suppose repo-clean should delete /opt/repo/cowbell-svn-30-1-i686.pkg.tar.gz, since it is an older version of /opt/repo/cowbell-svn-33-1-i686.pkg.tar.gz. But it does not.

Offline

#5 2008-04-30 16:22:42

urandom
Member
From: Russia
Registered: 2007-10-01
Posts: 19
Website

Re: Old packages cleaning utility.

Stefan Husmann wrote:

Hello,

thank you for your contribution. I think the makedependency to gcc is not needed, because gcc is in base-devel and everyone who uses AUR is adviced to have these packages installed. The dependency to pacman also is not needed - everyone who wants to use a package has to have pacman.

I also suggest to put || return 1 behind the scons line and the cp line.

Thanks for advice. I take notice to it.

Stefan Husmann wrote:

I have a problem: in my repo there are the following packages:

[haawda@bertrand repo-clean]$ ls /opt/repo/cow*
/opt/repo/cowbell-0.2.7.1-4-i686.pkg.tar.gz
/opt/repo/cowbell-svn-30-1-i686.pkg.tar.gz
/opt/repo/cowbell-svn-33-1-i686.pkg.tar.gz
[haawda@bertrand repo-clean]$

So I suppose repo-clean should delete /opt/repo/cowbell-svn-30-1-i686.pkg.tar.gz, since it is an older version of /opt/repo/cowbell-svn-33-1-i686.pkg.tar.gz. But it does not.

By default repo-clean run in dry-run mode - only show packages with more than one versions and mark newest. For  cleaning you must use -mc flag.

Offline

#6 2008-04-30 19:49:21

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Old packages cleaning utility.

Sorry, I was not clear enough: it does not show them up.

[haawda@bertrand webkitgtk-svn]$ repo-clean /opt/repo/
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.
[haawda@bertrand webkitgtk-svn]$ repo-clean -s /opt/repo 
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.
[haawda@bertrand webkitgtk-svn]$ repo-clean my
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.

Offline

#7 2008-04-30 20:55:38

urandom
Member
From: Russia
Registered: 2007-10-01
Posts: 19
Website

Re: Old packages cleaning utility.

Stefan Husmann wrote:

Sorry, I was not clear enough: it does not show them up.

[haawda@bertrand webkitgtk-svn]$ repo-clean /opt/repo/
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.
[haawda@bertrand webkitgtk-svn]$ repo-clean -s /opt/repo 
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.
[haawda@bertrand webkitgtk-svn]$ repo-clean my
Total: 0  Ignored: 0  Corrupted: 0
Can not find packages with several versions. Nothing to do.

Now I see too. Fixed in svn. Must work now.

Offline

#8 2008-05-07 13:17:46

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Old packages cleaning utility.

Sorry for the late reply. Works fine now. smile

Offline

#9 2008-05-22 11:24:59

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: Old packages cleaning utility.

But sometimes downgrade happens http://bbs.archlinux.org/viewtopic.php?id=48969...

Offline

Board footer

Powered by FluxBB