Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 192345

Summary: app-portage/gentoolkit-0.2.4_pre6: eclean does not accept --size-limit
Product: Portage Development Reporter: Anatoly Arzhnikov <tolich.arz>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: minor Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 170220    
Attachments: eclean patch

Description Anatoly Arzhnikov 2007-09-12 20:08:42 UTC
# eclean distfiles -s 20M
 * Building file list for distfiles cleaning...
Aborted.
// Works

# eclean distfiles --size-limit=20M
 * Wrong option on command line.

Usage:
 eclean [global-option] ... <action> [action-option] ...

Available options for the distfiles action:
 -f, --fetch-restricted   - protect fetch-restricted files (when --destructive)
 -s, --size-limit=<size>  - don't delete distfiles bigger than <size>
   <size> is a size specification: "10M" is "ten megabytes", "200K" is
   "two hundreds kilobytes", etc.  Units are: G, M, K and B.

More detailed instruction can be found in `man eclean`
// Error

# eclean distfiles --size-limit 20M
 * Wrong size specification
Size specification should be an integer followed by a single letter unit.
Available units are: G, M, K and B.
For instance: "10M" is "ten megabytes", "200K" is "two hundreds kilobytes", etc.
// Does not work too...

Why?

Reproducible: Always

Steps to Reproduce:

Actual Results:  
eclean does not work

Expected Results:  
Clean outdated distfiles, excepting bigger than 20 Megabyes

# emerge --info
Portage 2.1.3.9 (default-linux/x86/2007.0/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-gentoo-r6 i686)
=================================================================
System uname: 2.6.22-gentoo-r6 i686 Intel(R) Celeron(R) CPU 2.40GHz
Timestamp of tree: Wed, 12 Sep 2007 06:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.utf8"
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi aim alsa apache2 berkdb bitmap-fonts bzip2 cairo cdr cgi cli cracklib crypt dbus dri dvd dvdread eds emboss encode esd evo exif fam ffmpeg firefox fortran ftp gdbm gif gpm gstreamer gtk gtk2 hal iconv icq isdnlog jabber java javascript jpeg jpeg2k kde kdehiddenvisibility kerberos mad midi mikmod mime mmx mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl php png pppd python qt3support qt4 quicktime readline real reflection samba sdl session spell spl sse sse2 ssl svg tcpd threads tiff timidity truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs x86 xcomposite xine xml xorg xpm xv xvid zip zlib" ALSA_CARDS="intel8x0 seq-dummy" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LINGUAS="ru en" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Paul Varner (RETIRED) gentoo-dev 2007-09-12 23:03:01 UTC
Created attachment 130772 [details, diff]
eclean patch

Actually, you must be the first person to try to use the long options that take arguments, since none of them were working.  The attached patch will fix the issue and has been committed to subversion.

$ svn commit -m "Fix long argument processing to work correctly. (Bug #192345)"
Sending        ChangeLog
Sending        src/eclean/eclean
Transmitting file data ..
Committed revision 433.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2007-09-13 15:51:32 UTC
Released in gentoolkit-0.2.4_pre7