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

Bug 622938

Summary: app-portage/gentoolkit-0.3.3: eclean-dist should additionally handle git checkouts in $DISTDIR/git3-src
Product: Portage Development Reporter: Till Schäfer <till2.schaefer>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: normal CC: kingjon3377, poncho, xsiddhanthrathod
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 922455    
Bug Blocks:    

Description Till Schäfer 2017-06-28 15:56:49 UTC
I have noticed that there are many git checkouts in my $DISTDIR/git3-src folder albeit I am running "eclean-dist -d" on a weekly basis and the packages associated with the git checkouts are no longer installed as a git version.

I expect the following behavior: 
- "eclean-dist" should clear all git checkouts from uninstalled packages
- "eclean-dist -d" should clear all git checkouts of packages that no longer use  a git version of the package.



Reproducible: Always

Steps to Reproduce:
1. install git/live package 
2. downgrade git/live package to a package that does use regular archived sources.
3. run eclean-dist -d



# emerge --info
Portage 2.3.6 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r4, 4.9.34-gentoo x86_64)
=================================================================
System uname: Linux-4.9.34-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.3
KiB Mem:    15955080 total,  12670900 free
KiB Swap:   16801788 total,  16801788 free
Timestamp of repository gentoo: Wed, 28 Jun 2017 12:44:55 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28 p1.2) 2.28
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo
    priority: 1000

Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/portage/package.accept_keywords/zz_autounmask /etc/portage/package.unmask/zz_autounmask /etc/portage/package.use/zz_autounmask /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write --autounmask-continue --jobs=5 --load-average=2.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="64bit X a52 aac acl acpi aes alsa amd64 avx bash-completion berkdb bluetooth branding bzip2 cairo cdaudio cdda cddb cdio cdr cli consolekit cracklib crypt css cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor glib glibc gpg gpm gtk haskell iconv icu id3tag ieee1394 imagemagick inotify ipv4 ipv6 irc java jpeg jpeg2k kde kipi kwallet lame latex lcms ldap libnotify libsamplerate lzma mad mmx mmxext mng modules mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl ntp ogg okteta opengl openmp otr pam pango pcre pdf phonon plasma pm-utils png policykit popcnt ppds pulseaudio qemu qml qt3support qt4 qt5 quicktime rar readline real rss sdl seccomp semantic-desktop session spell spice sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg syslog taglib tcpd threads tiff truetype udev udisks uefi unicode upower usb v41 v412 v4l vaapi vcd vim-syntax visualization vorbis wavpack widgets wifi wma wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="de en-US en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en_US en_GB en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Larry the Git Cow gentoo-dev 2023-12-03 07:51:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=87912b460c533f8b010617018fdad42246db85f0

commit 87912b460c533f8b010617018fdad42246db85f0
Author:     Siddhanth Rathod <xsiddhanthrathod@gmail.com>
AuthorDate: 2023-09-21 20:20:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-03 07:51:44 +0000

    Enhancement: eclean-dist handle git checkouts
    
    A new feature for eclean-dist to clean git3-src.
    Optionally, cleaning the vcs-src can be skipped with --skip-vcs.
    
    Bug: https://bugs.gentoo.org/622938
    
    Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
    Closes: https://github.com/gentoo/gentoolkit/pull/33
    Signed-off-by: Sam James <sam@gentoo.org>

 pym/gentoolkit/eclean/clean.py  | 35 ++++++++++++++++++++++++++++++++--
 pym/gentoolkit/eclean/cli.py    | 42 ++++++++++++++++++++++++++++-------------
 pym/gentoolkit/eclean/search.py | 28 ++++++++++++++++++++++++++-
 3 files changed, 89 insertions(+), 16 deletions(-)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-03 08:03:55 UTC
hypersyd did great work on this and it's in git now, not yet in a release.