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 Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Fri Aug 26, 2005 3:16 pm    Post subject: Reply with quote

tacvbo wrote:
Smoothhound wrote:
I think I have found a buglet:
Code:
[root@haggis util]\$ ./yacleaner-0.4.1alpha --pretend --delete worktmp

These are the old worktmp files that I would delete:

  [ worktmp ]              B
./yacleaner-0.4.1alpha: line 353: 0 + 0 + 0 +  : syntax error: operand expected (error token is " ")
[root@haggis util]\$ ./yacleaner-0.3 --pretend --delete worktmp

These are the old worktmp files that I would delete:

  [ worktmp ]              B
./yacleaner-0.3: line 335: 0 + 0 + 0 +  : syntax error: operand expected (error token is " ")


Apart from that, cheers! I cleared out ~0.8G of stuff with it 8)


:D

Thanks for the report. It stills happening? Could you tell me the output of a
# ls -la /var/tmp/portage/
# bash --version
? :oops:


I get this too. I am running amd64.

Code:

titan gentoo_scripts # bash --version
GNU bash, version 3.00.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.


ls -la /var/tmp/portage/ -- 3353 results, can post somewhere if needed
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Fri Sep 09, 2005 1:36 pm    Post subject: Reply with quote

I whant to give my distfile to another person or write it to cd. So I whant yacleaner to only outdated packages and keep most up to date sources even corresponding package is not installed. How can I do it? Will it be available in next versions?
Back to top
View user's profile Send private message
widu
Guru
Guru


Joined: 05 Jun 2004
Posts: 333
Location: Freiburg

PostPosted: Wed Sep 21, 2005 6:32 pm    Post subject: Reply with quote

found your script in the gentoo script repository, but there's still the 0.2 version.
Great script, works flawless here.
THANKS
_________________
nature is a heterosexual fiction
Back to top
View user's profile Send private message
shimbob
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2003
Posts: 134

PostPosted: Thu Sep 22, 2005 4:29 am    Post subject: Reply with quote

huh? nothing happens except:

Code:
azuz ~ # yacleaner  all

These are the old files that I would delete:

generate_filelist binpkg
generate_filelist dist
generate_filelist log
generate_filelist worktmp
azuz ~ #


yacleaner 0.4.2alpha
[/quote]
Back to top
View user's profile Send private message
UncleOwen
Veteran
Veteran


Joined: 27 Feb 2003
Posts: 1493
Location: Germany, Hamburg

PostPosted: Thu Sep 22, 2005 9:32 am    Post subject: Reply with quote

Code:
get_GMKB() {
  if [[ "${#1}" -ge "10" ]]; then
    echo "$(( ${1}/1073741824 )) G"
  elif [[ "${#1}" -ge "7" ]]; then
    echo "$(( ${1}/1048576 )) M"
  elif [[ "${#1}" -ge "4" ]]; then
    echo "$(( ${1}/1024 )) K"
  else
    echo "${1} B"
  fi
}


You might want to change G, M, K to GiB, MiB, KiB. Or simply change the calculations to use powers of 10, as you are checking for the number of decimal digits anyway.
Back to top
View user's profile Send private message
SupuS
n00b
n00b


Joined: 20 Apr 2004
Posts: 45
Location: Czech Republic

PostPosted: Sat Oct 08, 2005 8:47 am    Post subject: Reply with quote

shimbob wrote:
huh? nothing happens except:

Code:
azuz ~ # yacleaner  all

These are the old files that I would delete:

generate_filelist binpkg
generate_filelist dist
generate_filelist log
generate_filelist worktmp
azuz ~ #


yacleaner 0.4.2alpha


same situation :roll:
Back to top
View user's profile Send private message
danii
n00b
n00b


Joined: 11 Sep 2004
Posts: 10
Location: Porto,Portugal

PostPosted: Tue Oct 11, 2005 11:05 pm    Post subject: Reply with quote

SupuS wrote:
shimbob wrote:
huh? nothing happens except:

Code:
azuz ~ # yacleaner  all

These are the old files that I would delete:

generate_filelist binpkg
generate_filelist dist
generate_filelist log
generate_filelist worktmp
azuz ~ #


yacleaner 0.4.2alpha


same situation :roll:



same here :( yacleaner-0.4.1alpha was working fine, but I had to update....
Back to top
View user's profile Send private message
Smilez:)
n00b
n00b


Joined: 23 Jan 2004
Posts: 58
Location: Edmonton

PostPosted: Thu Oct 13, 2005 5:38 pm    Post subject: Reply with quote

Holy F*$K!

this script cleared out 2GB of hdd space. Thanks a tonne.
Back to top
View user's profile Send private message
nonotme
Guru
Guru


Joined: 29 Sep 2003
Posts: 356
Location: on.ca

PostPosted: Thu Oct 13, 2005 7:33 pm    Post subject: Reply with quote

i'm glad i tried the new version before i deleted the old one ;)
for lack of a better idea, i pastebin'd yacleaner-0.4.1alpha. http://gentoo.pastebin.com/392617
a temporary solution i realize, but i wasn't sure about posting it here (522 lines).
_________________
Please append [Solved] to your thread if appropriate, it helps everyone.
Back to top
View user's profile Send private message
danii
n00b
n00b


Joined: 11 Sep 2004
Posts: 10
Location: Porto,Portugal

PostPosted: Thu Oct 27, 2005 2:45 am    Post subject: Reply with quote

nonotme wrote:
i'm glad i tried the new version before i deleted the old one ;)
for lack of a better idea, i pastebin'd yacleaner-0.4.1alpha. http://gentoo.pastebin.com/392617
a temporary solution i realize, but i wasn't sure about posting it here (522 lines).



thanks It's working fine, next time I should test the new version :oops:
Back to top
View user's profile Send private message
obsrv
Apprentice
Apprentice


Joined: 19 Aug 2005
Posts: 167
Location: Panevėžys, Lithuania

PostPosted: Tue Nov 01, 2005 4:44 pm    Post subject: Reply with quote

It would be nice to have qt GUI for this app. I think this app also should be included as a part of base installation.
Back to top
View user's profile Send private message
FictionPimp
n00b
n00b


Joined: 24 Aug 2004
Posts: 43

PostPosted: Mon Dec 05, 2005 4:28 pm    Post subject: Reply with quote

Is this still in development? Or is there a better tool out there now?
Back to top
View user's profile Send private message
emorphix
Apprentice
Apprentice


Joined: 09 Oct 2004
Posts: 189
Location: Earth

PostPosted: Tue Dec 06, 2005 1:19 am    Post subject: Reply with quote

hi Just found your script and I downloaded it from http://blog.tacvbo.net/data/files/yacleaner/ the script and many links keep pointing to the http://gentoo.org.mx/yacleaner/ which does not work for me.

Nice script and thanks
_________________
Ebuild Exchange
http://www.ebuildexchange.org
The Portage Tree For Gentoo Users
Created By Gentoo Users
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Tue Dec 20, 2005 5:04 am    Post subject: Reply with quote

Any programs like this now? Possibly ones that work with the new portage 2.1?
Back to top
View user's profile Send private message
robgrady
Apprentice
Apprentice


Joined: 30 Sep 2004
Posts: 199

PostPosted: Wed Jan 11, 2006 9:20 pm    Post subject: Reply with quote

nesl247 wrote:
Any programs like this now? Possibly ones that work with the new portage 2.1?

Check out eclean (part of >=gentoolkit-2.1* ). It cleans distfiles (/usr/portage/distfiles) and packages (/usr/portage/packages) but not /var/tmp/portage or /var/log/portage.
_________________
A patient man has great understanding, but a quick-tempered man displays folly. - Proverbs 14:29
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3432
Location: Gainesville, Florida

PostPosted: Mon Jan 16, 2006 5:30 pm    Post subject: Reply with quote

tacvbo,
I used yacleaner for some time, and think it's the best and fastest for doing the job. However, since I changed my /usr/portage, /var, and /tmp directories to non-standard locations for better performance and less fragmentation (see below), I can't get yacleaner to function correctly, even after trying to edit yacleaner, or for that matter, any other distfile cleaner script I've seen.

Is it possible? ( know it must be- I'm just ignorant of the syntax to use). I notice you have in the yacleaner "ToDo" list something about this (Don't use `portageq`, read config files). I assume this means the /etc/make.conf portage entries.

I'd be really grateful if you would please clue me in on the correct edits to make, or maybe just release a yacleaner version for non-standard portage setups (user definable directory locations). More and more users seem to be trying the non-standard portage directory locations (partitions) these days, and for them cleaning out these directories has become a problem.

Thanks for the great yacleaner script!
--------------------------------------------------------------------------------------------------------------------
# PORTAGE_TMPDIR is the location portage will use for compilations and
# temporary storage of data. This can get VERY large depending upon
# the application being installed.
PORTAGE_TMPDIR=/mnt/rwstorage/var/tmp
#
# PORTDIR is the location of the portage tree. This is the repository
# for all profile information as well as all ebuilds. This directory
# itself can reach 200M. WE DO NOT RECOMMEND that you change this.
PORTDIR=/mnt/portage
#
# DISTDIR is where all of the source code tarballs will be placed for
# emerges. The source code is maintained here unless you delete
# it. The entire repository of tarballs for gentoo is 9G. This is
# considerably more than any user will ever download. 2-3G is
# a large DISTDIR.
DISTDIR=/mnt/dump/distfiles
#
# PKGDIR is the location of binary packages that you can have created
# with '--buildpkg' or '-b' while emerging a package. This can get
# upto several hundred megs, or even a few gigs.
PKGDIR=/mnt/portage/packages
#
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
# concern that they will be deleted by rsync updates. Default is not
# defined.
PORTDIR_OVERLAY=/usr/local/portage
#
# PORT_LOGDIR is the location where portage will store all the logs it
# creates from each individual merge. They are stored as YYMMDD-$PF.log
# in the directory specified. This is disabled until you enable it by
# providing a directory. Permissions will be modified as needed IF the
# directory exists, otherwise logging will be disabled.
PORT_LOGDIR=/mnt/rwstorage/var/log/portage
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.7.2 USE=experimental python3_11
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 Jan 18, 2006 6:29 pm    Post subject: Reply with quote

UncleOwen wrote:
Code:
get_GMKB() {
  if [[ "${#1}" -ge "10" ]]; then
    echo "$(( ${1}/1073741824 )) G"
  elif [[ "${#1}" -ge "7" ]]; then
    echo "$(( ${1}/1048576 )) M"
  elif [[ "${#1}" -ge "4" ]]; then
    echo "$(( ${1}/1024 )) K"
  else
    echo "${1} B"
  fi
}


You might want to change G, M, K to GiB, MiB, KiB. Or simply change the calculations to use powers of 10, as you are checking for the number of decimal digits anyway.


Ready!, :) Thanks. (http://en.wikipedia.org/wiki/Binary_prefix)
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 Jan 18, 2006 6:33 pm    Post subject: Reply with quote

wrc1944 wrote:
tacvbo,
I used yacleaner for some time, and think it's the best and fastest for doing the job. However, since I changed my /usr/portage, /var, and /tmp directories to non-standard locations for better performance and less fragmentation (see below), I can't get yacleaner to function correctly, even after trying to edit yacleaner, or for that matter, any other distfile cleaner script I've seen.


Thanks :)

wrc1944 wrote:

Is it possible? ( know it must be- I'm just ignorant of the syntax to use). I notice you have in the yacleaner "ToDo" list something about this (Don't use `portageq`, read config files). I assume this means the /etc/make.conf portage entries.


Humm, i'm starting the .5 beta version, so I will verify that issue. :)

wrc1944 wrote:

PORTAGE_TMPDIR=/mnt/rwstorage/var/tmp
PORTDIR=/mnt/portage
DISTDIR=/mnt/dump/distfiles or even a few gigs.
PKGDIR=/mnt/portage/packages
PORTDIR_OVERLAY=/usr/local/portage
PORT_LOGDIR=/mnt/rwstorage/var/log/portage
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 Jan 18, 2006 6:38 pm    Post subject: Reply with quote

FictionPimp wrote:
Is this still in development? Or is there a better tool out there now?


We are still alive!! :)
Back to top
View user's profile Send private message
madCoder|GN
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2003
Posts: 80

PostPosted: Wed Jan 25, 2006 10:36 am    Post subject: Reply with quote

You say it deletes "old" files, yet I get this:
Code:
# yacleaner -p -v all

These are the old files that I would delete:

  [ binpkg ]    All/mysql-4.0.25-r2.tbz2  6.2M
  [ binpkg ]    dev-db/mysql-4.0.25-r2.tbz2  0
  [ dist ]      OOO_2_0_0-core.tar.bz2  150M
  [ dist ]      OOO_2_0_0-lang.tar.bz2  32M
  [ dist ]      OOO_2_0_0-system.tar.bz2  19M
  [ dist ]      OOO_2_0_1-core.tar.bz2  105M
  [ dist ]      OOO_2_0_1-lang.tar.bz2  53M
  [ dist ]      OOO_2_0_1-system.tar.bz2  22M
  [ dist ]      extras-2.tar.bz2  100K
  [ dist ]      libwpd-0.8.3.tar.gz  476K
  [ dist ]      mysql-4.0.25.tar.gz  11M
  [ dist ]      mysql-extras-20050920.tar.bz2  56K
  [ dist ]      ooo-build-2.0.0.2.tar.gz  4.2M
  [ dist ]      ooo-build-2.0.1.1.tar.gz  4.3M
  [ dist ]      ooo_crystal_images-6.tar.bz2  1.3M
  [ dist ]      xchat-2.4.5.tar.bz2  1.3M
  [ dist ]      xine-lib-1.1.1.tar.gz  7.7M
  [ dist ]      xine-lib-patches-24.tar.bz2  20K
It wants to delete the OpenOffice.org files for both 2.0.0 and 2.0.1. I just installed 2.0.0 about 2-3 weeks ago, and ..... 2.0.1 is merging right now! Those files were just downloaded less than 30 minutes ago when I started the emerge. Why is it trying to delete files that I just downloaded 30 minutes ago, when you say it deletes *old* files? :)

Other than that, it looks like a nice script, thanks. I think I'm going to wait until OOo is finished, and then compare it to eclean.
_________________
madCoder <madCoder@gamesurge.net>
Abuse Manager
http://www.gamesurge.net/
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 Jan 26, 2006 12:34 am    Post subject: Reply with quote

madCoder|GN wrote:
You say it deletes "old" files, yet I get this:

Code:
# yacleaner -p -v all
<... truncated ... >
  [ dist ]      OOO_2_0_0-core.tar.bz2  150M
  [ dist ]      OOO_2_0_0-lang.tar.bz2  32M
  [ dist ]      OOO_2_0_0-system.tar.bz2  19M
  [ dist ]      OOO_2_0_1-core.tar.bz2  105M
  [ dist ]      OOO_2_0_1-lang.tar.bz2  53M
  [ dist ]      OOO_2_0_1-system.tar.bz2  22M
<... truncated ... >

I just installed 2.0.0 about 2-3 weeks ago, and ..... 2.0.1 is merging right now!
Other than that, it looks like a nice script, thanks. I think I'm going to wait until OOo is finished, and then compare it to eclean.

OOO_2_0_1-system.tar.bz2 is considered an old file beacuse there is no package _installed_ related to that file.
You should not use Yacleaner (eclean either) when you are emerging things. Next release will verify that, so it will refuse to work if there is a working merge.

:)
Back to top
View user's profile Send private message
madCoder|GN
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2003
Posts: 80

PostPosted: Thu Jan 26, 2006 4:24 am    Post subject: Reply with quote

tacvbo wrote:
madCoder|GN wrote:
Code:
# yacleaner -p -v all
<... truncated ... >
  [ dist ]      OOO_2_0_0-core.tar.bz2  150M
  [ dist ]      OOO_2_0_0-lang.tar.bz2  32M
  [ dist ]      OOO_2_0_0-system.tar.bz2  19M
  [ dist ]      OOO_2_0_1-core.tar.bz2  105M
  [ dist ]      OOO_2_0_1-lang.tar.bz2  53M
  [ dist ]      OOO_2_0_1-system.tar.bz2  22M
<... truncated ... >

OOO_2_0_1-system.tar.bz2 is considered an old file beacuse there is no package _installed_ related to that file.
You should not use Yacleaner (eclean either) when you are emerging things. Next release will verify that, so it will refuse to work if there is a working merge.
Ok, I understand that, and I didn't run it, I used the --pretend option. But your suggestion only explains why it wants to delete the 2.0.1 files. Why is it wanting to delete the 2.0.0 files, when they were only installed a few weeks ago :o?

It's also not finding very old packages to delete. ie:
-rw-rw-r-- 1 root portage 587947 Mar 25 2002 imlib-1.9.14.tar.bz2
That file is almost 4 years old. Is that simply because it's still installed? If so, I'll stick to my usual method:
Code:
ls -t /usr/portage/distfiles | tail -n50 | xargs rm -f
;)
_________________
madCoder <madCoder@gamesurge.net>
Abuse Manager
http://www.gamesurge.net/
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 Jan 26, 2006 9:14 am    Post subject: Reply with quote

madCoder|GN wrote:
Ok, I understand that, and I didn't run it, I used the --pretend option.

When I say run, I mean with or without any options (incluiding --pretend).

madCoder|GN wrote:

But your suggestion only explains why it wants to delete the 2.0.1 files.
Why is it wanting to delete the 2.0.0 files, when they were only installed a few weeks ago :o?

Maybe because 2.0.0 is not installed anymore either. I don't have a crystall ball.

madCoder|GN wrote:

It's also not finding very old packages to delete. ie:
-rw-rw-r-- 1 root portage 587947 Mar 25 2002 imlib-1.9.14.tar.bz2
That file is almost 4 years old. Is that simply because it's still installed? If so, I'll stick to my usual method:
Code:
ls -t /usr/portage/distfiles | tail -n50 | xargs rm -f
;)

I think you don't undertand the "old files" concept in Yacleaner. Old files means files that you dont need anymore in your system. There are not used, orphaned and most probably old beacause there is no installed package which have a reference to that file.

If you want to delete really OLD files no matter if they can be used by some re-emerge, you can do something like that.
Code:
find /usr/portage/distfiles -type f -atime +365 -exec rm {} \;

or your "usual" and IMHO -no sense- method, cos' both methods above doesn't work to proper maintain distfiles without downloading the same file many times.

It's not just about space, is about a relation between download time/data transfer AND space.
Back to top
View user's profile Send private message
bigmauler
Apprentice
Apprentice


Joined: 25 Apr 2005
Posts: 177
Location: Seattle, WA

PostPosted: Thu Jan 26, 2006 6:11 pm    Post subject: Reply with quote

mirrors are down.

Where can we get it?
_________________
Never take raisins from a rabbit
Back to top
View user's profile Send private message
madCoder|GN
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2003
Posts: 80

PostPosted: Thu Jan 26, 2006 6:34 pm    Post subject: Reply with quote

tacvbo wrote:
or your "usual" and IMHO -no sense- method
... Don't worry about me, I can take care of myself.
_________________
madCoder <madCoder@gamesurge.net>
Abuse Manager
http://www.gamesurge.net/
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 Previous  1, 2, 3, 4, 5, 6  Next
Page 4 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