Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Re: Yet Another Cleaner - v3 (yacleaner-0.3) UPDATED AGAIN!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Sat May 14, 2005 9:22 am    Post subject: Re: Yet Another Cleaner - v3 (yacleaner-0.3) UPDATED AGAIN! Reply with quote

Wiiiii!!! Another unsupported and unoffical Gentoo cleaner...

...but, with new features!: :D

    * Clean old distfiles in the $DISTDIR directory (/usr/portage/distfiles)
    * Clean old binary packages files in $PKGDIR directory (/usr/portage/packages)
    * Clean old dirs and files in $WORKDIR directory (/var/tmp/portage)
    * Clean old portage's log files in $PORT_LOGDIR (/var/log/portage)

Grab it here: yacleaner-0.3.3 and please post your comments, patches and suggestions. :-)

Yacleaner Repository: http://blog.tacvbo.net/data/files/yacleaner/
Yacleaner Mirror: http://gentoo.org.mx/yacleaner/

Code:


$ ./yacleaner-0.3.3 --help

Usage:
    yacleaner-0.3.3 [ options ] [ action ] < dist | binpkg | worktmp | log | all >
    yacleaner-0.3.3 --help

Options: [ --ask | --nocolor | --pretend | --verbose ]

Actions:  [ --delete ] [ --move=<dir> ]


Help (this screen):
       --help (-h short option)
              Displays this help

Actions:
       --delete (-d short option)
              Deletes the old files. This is the default action.

       --move=<dir> (-d short option)
              Moves the old files to the selected directory.

Options:
       --ask (-a short option)
              Before performing the clean, display what files will be deleted,
              in the same format as when using --pretend; then ask whether to
              continue with the clean or abort.

       --nocolor (-C short option)
              Make sure none of the output from yacleaner contains color.

       --pretend (-p short option)
              Instead of actually performing the clean, simply display what
              files *would* have been deleted if --pretend weren't used.

       --verbose (-v short option)
              Tell yacleaner-0.3.3 to run in verbose mode. Shows the list of files to
              delete.

       --version (-V short option)
              Displays the version of yacleaner.

Arguments:
       dist
              Remove old dist files on /usr/portage/distfiles

       binpkg
              Remove old binary files on /usr/portage/packages

       worktmp
              Remove old temporary files on /var/tmp/portage

       log
              Remove old log files on /var/log/portage

       all
              Remove old files on /usr/portage/distfiles,
              /usr/portage/packages, /var/tmp/portage,
              and /var/log/portage


* You don't need to be root in order to run the script, it will ask for the password:

Code:

$ ./yacleaner-0.3 all

These are the old files that I would delete:

  [ worktmp ]            7045 K
  [ log ]                5385 K
  [ dist ]               78872 K
  [ binpkg ]             2408 K

  [ total ]              91 M

>>> Waiting 5 seconds before starting...
>>> (Control-C + Enter to abort)...
>>> Cleaning in 1 2 3 4 5

>>> Deleting old files...

Please enter your root Password:

* /var/tmp/portage cleaned.
* /var/log/portage cleaned.
* /usr/portage/distfiles cleaned.
* /usr/portage/packages cleaned.


* The verbose mode will show you wich files are going to be deleted:

Code:

$ ./yacleaner-0.3 --verbose --ask all

These are the old files that I would delete:

  [ worktmp ]   typespeed-0.4.4-r1  297K
  [ log ]       5498-typespeed-0.4.4-r1.log  8.0K
  [ log ]       5499-typespeed-0.4.4-r1.log  4.0K
  [ dist ]      linux-2.6.10.tar.bz2  36M
  [ dist ]      linux-2.6.9.tar.bz2  36M
  [ binpkg ]    All/sandbox-1.2.8.tbz2  132K
  [ binpkg ]    All/sandbox-1.2.9.tbz2  132K
  [ binpkg ]    sys-apps/sandbox-1.2.8.tbz2  0
  [ binpkg ]    sys-apps/sandbox-1.2.9.tbz2  0

  [ total ]              71 M

Do you want me to delete these old files? [Yes/No]


Grab it here: yacleaner-0.3.3 and please post your comments, patches and suggestions. :-)


Last edited by tacvbo on Wed Jan 18, 2006 7:50 am; edited 8 times in total
Back to top
View user's profile Send private message
gwolf
Guru
Guru


Joined: 05 May 2005
Posts: 374
Location: Estonia

PostPosted: Sat May 14, 2005 9:35 am    Post subject: Reply with quote

Just tried it out and seems handy. Got rid of 640M old distfiles in 15 secs ;-)
Nice job ;-)

I wish there was something like that for binary packages (in /usr/portage/packages/All), as well.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sat May 14, 2005 10:55 am    Post subject: Reply with quote

Moved from Portage & Programming.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Conditional_Zenith
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 157
Location: Australia

PostPosted: Sun Jun 12, 2005 3:48 am    Post subject: Reply with quote

If you feel like it, I think a feature to ignore certain files you don't want removed would be useful.
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Sun Jun 12, 2005 4:47 pm    Post subject: Reply with quote

Firefox wrote:
The connection was refused when attempting to contact blog.tacvbo.net.
Back to top
View user's profile Send private message
Pseud
Apprentice
Apprentice


Joined: 19 Mar 2004
Posts: 273
Location: Bangalore, India

PostPosted: Wed Jun 15, 2005 8:50 am    Post subject: Reply with quote

Very useful; Just now cleared ~0.5GB in no time! Thanks!!
_________________
eschew obfuscation
Back to top
View user's profile Send private message
Sorcerer'sApprentice
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2005
Posts: 121
Location: Jesus College, Cambridge, England

PostPosted: Wed Jun 15, 2005 9:09 am    Post subject: Reply with quote

gwolf: The eclean script can clean both distfiles and packages.
_________________
"One of the major problems encountered in time travel is not that of accidentally becoming your own father or mother ... The major problem is quite simply one of grammar..."

Douglas Adams
Back to top
View user's profile Send private message
russianpirate
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1167
Location: Detroit, MI

PostPosted: Wed Jun 15, 2005 9:51 am    Post subject: Reply with quote

Whats the point of this script really?
rm /usr/portage/distfiles/* & rm -fdR /usr/portage/packages/*

Nice use of colors and looks good though!
Maybe add some more features, it would be cool!
Back to top
View user's profile Send private message
Sorcerer'sApprentice
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2005
Posts: 121
Location: Jesus College, Cambridge, England

PostPosted: Wed Jun 15, 2005 1:43 pm    Post subject: Reply with quote

As far as I can tell, this script does not delete the distfiles for installed packages. Say there is a new revision of a large package, such a xorg, which only requires that another patch is downloaded. If you do rm /usr/portage/distfiles/* you will have to download the whole source again, which is a pain on slower connections.
_________________
"One of the major problems encountered in time travel is not that of accidentally becoming your own father or mother ... The major problem is quite simply one of grammar..."

Douglas Adams
Back to top
View user's profile Send private message
russianpirate
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1167
Location: Detroit, MI

PostPosted: Wed Jun 15, 2005 5:29 pm    Post subject: Reply with quote

I think this should be implemented into emerge, when you emerge -C [package] all [package]-version's distfiles are removed. That would save a lot of space, and keep the packages that might be revised. However, I usually delete all my distfiles.
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Wed Jul 06, 2005 9:15 pm    Post subject: Reply with quote

New version released! :D

Thanks for all your comments and suggestions.

gwolf wrote:
I wish there was something like that for binary packages (in /usr/portage/packages/All), as well.

russianpirate wrote:
Maybe add some more features, it would be cool!

Sorcerer'sApprentice wrote:
gwolf: The eclean script can clean both distfiles and packages.


Check the new version of Yet Another Cleaner which can delete old dist and binpkg files, and also can clean temporary directories like /var/tmp/portage and /var/log/portage. :o

gwolf wrote:
Just tried it out and seems handy. Got rid of 640M old distfiles in 15 secs ;-)
Nice job ;-)

russianpirate wrote:
Nice use of colors and looks good though!

Pseud wrote:
Very useful; Just now cleared ~0.5GB in no time! Thanks!!


Thanks to all!! :)

StringCheesian wrote:
Firefox wrote:
The connection was refused when attempting to contact blog.tacvbo.net.


Sorry, fixed now, thanks.
Back to top
View user's profile Send private message
radfoj
Guru
Guru


Joined: 31 Dec 2004
Posts: 490
Location: Tísek, Czech Republic

PostPosted: Wed Jul 06, 2005 11:30 pm    Post subject: Reply with quote

Hi, thanks for it, I am giving it try. I used distclean-0.2.py before so there should be nothing to delete in my disfiles, but:
Code:
# ./yacleaner-0.2 --verbose --ask dist

These are the old dist files that I would delete:

  [ dist ]      svn-src  28M

  [ total ]              27 M

Do you want me to delete these old dist files? [Yes/No]

Code:

# emerge info | grep DIST
DISTDIR="/mnt/mandrake/opt/distfiles"

# ls -l /mnt/mandrake/opt/distfiles/svn-src
celkem 0
drwxr-xrwx  5 root root 128 Jun 24 11:29 amarok

svn-src is directory, which was created by emerging unofficial amarok-svn ebuild. Its considered to be deleted becouse amarok-svn is not in my system right now? Dont think so, becouse in cvs-src I have also (among others) directory e17 and also x11-wm/e is not emerged right now.
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Thu Jul 07, 2005 12:28 am    Post subject: Reply with quote

radfoj wrote:
Hi, thanks for it, I am giving it try. I used distclean-0.2.py before so there should be nothing to delete in my disfiles
svn-src is directory, which was created by emerging unofficial amarok-svn ebuild. Its considered to be deleted becouse amarok-svn is not in my system right now? Dont think so, becouse in cvs-src I have also (among others) directory e17 and also x11-wm/e is not emerged right now.

Excelent annotation. Well I will work on cleaning -cvs and -svn distfiles for the next release (v4), also it would be more faster.
Fixed in new version (v3). Also in v2 is fixed. :oops:


Last edited by tacvbo on Fri Jul 08, 2005 12:03 pm; edited 2 times in total
Back to top
View user's profile Send private message
MAL
n00b
n00b


Joined: 15 Jan 2003
Posts: 7

PostPosted: Thu Jul 07, 2005 8:59 am    Post subject: Reply with quote

The SHA-1 checksum for 0.2.1 is invalid

yacleaner-0.2.1.sha1 contains:

45e92d86fa77d2c169160e5279b534150cee6987

but yacleaner-0.2.1 has the following checksum:

57726243730434286d8ef1b5abc976e62980de58


... and I just noticed that 0.2.1 doesn't contain anything new over 0.2, so never mind :)

Thanks for the tool

... ok, further to the confusion ... the sha1 file for 0.2 contains the sha1sum for 0.2.1 !

:)
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Thu Jul 07, 2005 8:42 pm    Post subject: Reply with quote

MAL wrote:
... and I just noticed that 0.2.1 doesn't contain anything new over 0.2, so never mind :)


Check the new v3 (yacleaner-0.3) :-)


Last edited by tacvbo on Fri Jul 08, 2005 12:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Fri Jul 08, 2005 11:51 am    Post subject: Version 0.3 "Release early and often" is out! Reply with quote

ChangeLog

* Now it verify that the directories exist
* Now with xterm title progress hints
* Now just remove old logs and worktmp files rather than clean all the log and tmp dir.
* Show {G,K,M,B}bytes when appropiate
* Internal fixes and rewrites

Grab it here: yacleaner-0.3 and please post your comments, patches and suggestions. :-)
Back to top
View user's profile Send private message
MAL
n00b
n00b


Joined: 15 Jan 2003
Posts: 7

PostPosted: Fri Jul 08, 2005 12:16 pm    Post subject: Reply with quote

Works beautifully, even the countdown is now the right way round ;)

It's refreshing not to have to wait for python to load each time, just to do a simple task.

Only one thing to point out: you report the actual file size, not the space used on disk. Would it not be better to show the actual space used? (and thus saved), or maybe both :)
I noticed this when I tried it just now, and it reported 48 bytes to clean. The file was the cvs-src directory, which is actually using 8192 bytes on my filesystem:
Code:
# stat /usr/portage/distfiles/cvs-src
<snip>
  Size: 48              Blocks: 1          IO Block: 8192   directory
<snip>
Back to top
View user's profile Send private message
redshift
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2003
Posts: 98

PostPosted: Fri Jul 08, 2005 7:38 pm    Post subject: Reply with quote

I'd really like to try this out, but it seems the site is down. Are there any mirrors?
_________________
Tom
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Fri Jul 08, 2005 8:54 pm    Post subject: Reply with quote

redshift wrote:
I'd really like to try this out, but it seems the site is down. Are there any mirrors?

Sure, right here: http://66.221.73.173/yacleaner and http://blog.tacvbo.net/files/yacleaner
Back to top
View user's profile Send private message
radfoj
Guru
Guru


Joined: 31 Dec 2004
Posts: 490
Location: Tísek, Czech Republic

PostPosted: Fri Jul 08, 2005 9:21 pm    Post subject: Reply with quote

Hi again, its really great that you listen and improve. Thats why I am here and prefer your cleaner above other. So thanks again.

But bad news, about cvs and svn directories. Here is output from both versions:
Code:
# yacleaner-0.2.1 --ask --verbose dist

These are the old dist files that I would delete:

  [ dist ]      fluxbox-0.9.12.tar.bz2  637K
  [ dist ]      htop-0.5.tar.gz  120K

  [ total ]              0 M
# yacleaner-0.3 --ask --verbose dist

These are the old dist files that I would delete:

  [ dist ]              cvs-src  116M
  [ dist ]              fluxbox-0.9.12.tar.bz2  637K
  [ dist ]              htop-0.5.tar.gz  120K
  [ dist ]              svn-src  28M

  [ total ]              +119 M
# ls -l /mnt/mandrake/opt/distfiles/cvs-src/
celkem 2
drwxr-sr-x   5 root portage 120 Apr 17 04:16 e17
drwxr-sr-x   7 root portage 664 Jun 11 16:42 kat
drwxr-sr-x   9 root portage 680 Jul  5 19:29 kazehakase
drwxr-sr-x  11 root portage 904 Jul  5 19:28 krusader_kde3
drwxr-sr-x   7 root portage 328 Jul  1 20:28 linuxdcpp
drwxr-sr-x   9 root portage 896 Jul  6 19:38 sim

v0.2.1 will do, what I need. cvs+svn will stay. But v0.3 want delete everything. But sim, linuxdcpp krusader and kazehakase is still on system. Is it OK? New feature? Am I missing something? Thanks for reply.
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Fri Jul 08, 2005 9:44 pm    Post subject: Reply with quote

MAL wrote:
Works beautifully, even the countdown is now the right way round ;)

:D
Quote:
Only one thing to point out: you report the actual file size, not the space used on disk.

Hmmm... let me work on that.
Quote:
Code:
# stat /usr/portage/distfiles/cvs-src

Yugg, cvs-src and svn-src should not be deleted. Please Re-download yacleaner-0.3 or grab yacleaner-0.3.1 :oops:
Back to top
View user's profile Send private message
radfoj
Guru
Guru


Joined: 31 Dec 2004
Posts: 490
Location: Tísek, Czech Republic

PostPosted: Fri Jul 08, 2005 10:28 pm    Post subject: Reply with quote

I updated to v0.3.1 and am happy again. :wink:

tacvbo wrote:
Well I will work on cleaning -cvs and -svn distfiles for the next release (v4)

Before you begin work on it:

Is it what most people using cvs versions want? What about people, who love app X-cvs, but due few crashes they will go back to stable for while and cvs-repository will be lost. They have to redownload it after they decide to be on bleeding edge again. :D I still prefer to manage cvs-src myself, as its only few directories. Hope you understand me. Maybe I am alone. What do you (or others) think about it. Thanks.
Back to top
View user's profile Send private message
redshift
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2003
Posts: 98

PostPosted: Fri Jul 08, 2005 11:08 pm    Post subject: Reply with quote

tacvbo wrote:
Sure, right here: http://66.221.73.173/yacleaner and http://blog.tacvbo.net/files/yacleaner


Heh... not to be a pain, but neither of those are working right now either. Do I just have really bad timing?

edit: Nevermind, just got one of them to work.
_________________
Tom
Back to top
View user's profile Send private message
tacvbo
n00b
n00b


Joined: 28 May 2003
Posts: 39
Location: México City

PostPosted: Sat Jul 09, 2005 12:20 am    Post subject: Reply with quote

radfoj wrote:
I updated to v0.3.1 and am happy again. :wink:

:D Wiii!

radfoj wrote:

tacvbo wrote:
Well I will work on cleaning -cvs and -svn distfiles for the next release (v4)

Before you begin work on it:

Is it what most people using cvs versions want? What about people, who love app X-cvs, but due few crashes they will go back to stable for while and cvs-repository will be lost. They have to redownload it after they decide to be on bleeding edge again. :D I still prefer to manage cvs-src myself, as its only few directories. Hope you understand me. Maybe I am alone. What do you (or others) think about it. Thanks.


You are not alone :).
I was thinking on it and your statement is good enough to leave (cvs|svn)-src untouched. If other people thinks different I'm open to suggestions.
Meanwhile, that dirs will be untouched (also because I have no idea how to deal with them).
Thanks for testing and using it! :D
Back to top
View user's profile Send private message
St. Joe
Apprentice
Apprentice


Joined: 13 Apr 2005
Posts: 242
Location: USA

PostPosted: Sat Jul 09, 2005 1:20 am    Post subject: Re: Version 0.3 "Release early and often" is out! Reply with quote

tacvbo wrote:
Grab it here: yacleaner-0.3 and please post your comments, patches and suggestions. :-)

The only comment I have is THANKS!

The new version is commented perfectly, runs very fast, and has intuitive options.
Took about 170 megs off my system. Very nice job, tacvbo.
_________________
For every hammer there is a nail.
For every nail there is a thumb.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum