View previous topic :: View next topic |
Author |
Message |
mallchin l33t
Joined: 21 Jan 2003 Posts: 655 Location: United Kingdom
|
Posted: Fri Aug 26, 2005 3:16 pm Post subject: |
|
|
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 |
Thanks for the report. It stills happening? Could you tell me the output of a
# ls -la /var/tmp/portage/
# bash --version
? |
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 |
|
|
ssmaxss Apprentice
Joined: 28 Jun 2005 Posts: 160 Location: Moscow, Russia.
|
Posted: Fri Sep 09, 2005 1:36 pm Post subject: |
|
|
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 |
|
|
widu Guru
Joined: 05 Jun 2004 Posts: 333 Location: Freiburg
|
Posted: Wed Sep 21, 2005 6:32 pm Post subject: |
|
|
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 |
|
|
shimbob Tux's lil' helper
Joined: 13 Sep 2003 Posts: 136
|
Posted: Thu Sep 22, 2005 4:29 am Post subject: |
|
|
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 |
|
|
UncleOwen Veteran
Joined: 27 Feb 2003 Posts: 1493 Location: Germany, Hamburg
|
Posted: Thu Sep 22, 2005 9:32 am Post subject: |
|
|
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 |
|
|
SupuS n00b
Joined: 20 Apr 2004 Posts: 45 Location: Czech Republic
|
Posted: Sat Oct 08, 2005 8:47 am Post subject: |
|
|
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 |
|
Back to top |
|
|
danii n00b
Joined: 11 Sep 2004 Posts: 10 Location: Porto,Portugal
|
Posted: Tue Oct 11, 2005 11:05 pm Post subject: |
|
|
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 |
same here yacleaner-0.4.1alpha was working fine, but I had to update.... |
|
Back to top |
|
|
Smilez:) n00b
Joined: 23 Jan 2004 Posts: 58 Location: Edmonton
|
Posted: Thu Oct 13, 2005 5:38 pm Post subject: |
|
|
Holy F*$K!
this script cleared out 2GB of hdd space. Thanks a tonne. |
|
Back to top |
|
|
nonotme Guru
Joined: 29 Sep 2003 Posts: 356 Location: on.ca
|
Posted: Thu Oct 13, 2005 7:33 pm Post subject: |
|
|
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 |
|
|
danii n00b
Joined: 11 Sep 2004 Posts: 10 Location: Porto,Portugal
|
Posted: Thu Oct 27, 2005 2:45 am Post subject: |
|
|
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 |
|
Back to top |
|
|
obsrv Apprentice
Joined: 19 Aug 2005 Posts: 167 Location: Panevėžys, Lithuania
|
Posted: Tue Nov 01, 2005 4:44 pm Post subject: |
|
|
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 |
|
|
FictionPimp n00b
Joined: 24 Aug 2004 Posts: 43
|
Posted: Mon Dec 05, 2005 4:28 pm Post subject: |
|
|
Is this still in development? Or is there a better tool out there now? |
|
Back to top |
|
|
emorphix Apprentice
Joined: 09 Oct 2004 Posts: 189 Location: Earth
|
|
Back to top |
|
|
nesl247 Veteran
Joined: 15 Jun 2004 Posts: 1614 Location: Florida
|
Posted: Tue Dec 20, 2005 5:04 am Post subject: |
|
|
Any programs like this now? Possibly ones that work with the new portage 2.1? |
|
Back to top |
|
|
robgrady Apprentice
Joined: 30 Sep 2004 Posts: 199
|
Posted: Wed Jan 11, 2006 9:20 pm Post subject: |
|
|
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 |
|
|
wrc1944 Advocate
Joined: 15 Aug 2002 Posts: 3445 Location: Gainesville, Florida
|
Posted: Mon Jan 16, 2006 5:30 pm Post subject: |
|
|
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.39-r7, gcc-14
kernel-6.9.3 USE=experimental python3_12.3-final |
|
Back to top |
|
|
tacvbo n00b
Joined: 28 May 2003 Posts: 39 Location: México City
|
Posted: Wed Jan 18, 2006 6:29 pm Post subject: |
|
|
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 |
|
|
tacvbo n00b
Joined: 28 May 2003 Posts: 39 Location: México City
|
Posted: Wed Jan 18, 2006 6:33 pm Post subject: |
|
|
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 |
|
|
tacvbo n00b
Joined: 28 May 2003 Posts: 39 Location: México City
|
Posted: Wed Jan 18, 2006 6:38 pm Post subject: |
|
|
FictionPimp wrote: | Is this still in development? Or is there a better tool out there now? |
We are still alive!! |
|
Back to top |
|
|
madCoder|GN Tux's lil' helper
Joined: 06 Jun 2003 Posts: 80
|
Posted: Wed Jan 25, 2006 10:36 am Post subject: |
|
|
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 |
|
|
tacvbo n00b
Joined: 28 May 2003 Posts: 39 Location: México City
|
Posted: Thu Jan 26, 2006 12:34 am Post subject: |
|
|
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 |
|
|
madCoder|GN Tux's lil' helper
Joined: 06 Jun 2003 Posts: 80
|
Posted: Thu Jan 26, 2006 4:24 am Post subject: |
|
|
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 ?
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 |
|
|
tacvbo n00b
Joined: 28 May 2003 Posts: 39 Location: México City
|
Posted: Thu Jan 26, 2006 9:14 am Post subject: |
|
|
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 ?
|
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 |
|
|
bigmauler Apprentice
Joined: 25 Apr 2005 Posts: 177 Location: Seattle, WA
|
Posted: Thu Jan 26, 2006 6:11 pm Post subject: |
|
|
mirrors are down.
Where can we get it? _________________ Never take raisins from a rabbit |
|
Back to top |
|
|
madCoder|GN Tux's lil' helper
Joined: 06 Jun 2003 Posts: 80
|
Posted: Thu Jan 26, 2006 6:34 pm Post subject: |
|
|
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 |
|
|
|