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

Bug 395247

Summary: git-2.eclass doesn't clean up non-bare copies
Product: Gentoo Linux Reporter: Giorgos Tsiapaliwkas <terietor>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: RESOLVED CANTFIX    
Severity: major CC: dberkholz, terietor
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Clean up non-bare checkout before updating.

Description Giorgos Tsiapaliwkas 2011-12-19 08:19:16 UTC
Hello,

the EVCS_OFFLINE=1 feature is always on.

This is my make.conf file 

#These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=core2 -ggdb" 
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                                                                                  
# These are the USE flags that were used in addition to what is provided by the                                                                                                                                                              
# profile used for building.                                                                                                                                                                                                                 
USE="bluetooth apm alsa sse2 x acpi bash-completion cdda cdr dbus dvd fbcon hal ieee1394 lm_sensors modules mp3 mp4 opengl vim-syntax wifi qt3support kde qt4 semantic-desktop plasma threads xcomposite extras laptop dbus"                 
MAKEOPTS="-j5"                                                                                                                                                                                                                               
                                                                                                                                                                                                                                             
EMERGE_DEFAULT_OPTS="-avb --quiet-build=n"                                                                                                                                                                                                   
ACCEPT_KEYWORDS="~amd64"                                                                                                                                                                                                                     
ACCEPT_LICENSE="*"                                                                                                                                                                                                                           
FEATURES="candy parallel-fetch userfetch splitdebug"                                                                                                                                                                                         
VIDEO_CARDS="nvidia"                                                                                                                                                                                                                         
INPUT_DEVICES="evdev synaptics"                                                                                                                                                                                                              
LANG="el en"                                                                                                                                                                                                                                 
source /var/lib/layman/make.conf                                                                                                                                                                                                             
#PORTDIR and DISTDIR are setted in order git wrapper to work                                                                                                                                                                                 
PORTDIR=/usr/portage                                                                                                                                                                                                                         
DISTDIR=$PORTDIR/distfiles                                                                                                                                                                                                                   
#treat nice to my cpu,bad portage!                                                                                                                                                                                                           
PORTAGE_NICENESS="15"                                                                                                                                                                                                                        
# Needed by the Git wrapper                                                                                                                                                                                                                  
KDE_DEVELOPER=1 # For the KDE repos                                                                                                                                                                                                          
GENTOO_DEVELOPER=1 # For the Gentoo repos                                                                                                                                                                                                    
GITHUB=1                                                                                                                                                                                                                                     
EGIT_NONBARE=1 # This one sets the git-2 eclass to clone non-bare repos                                                                                                                                                                      
                                                                                                                                                                                                                                             
GENTOO_MIRRORS="http://files.gentoo.gr ftp://files.gentoo.gr"                                                                                                                                                                                
SYNC="rsync://rsync.gr.gentoo.org/gentoo-portage"

Reproducible: Always

Steps to Reproduce:
1.add EGIT_NONBARE=1 to make.conf
2.emerge =kdelibs-9999
3.cd /usr/portage/distdir/egit-src/kdelibs
4.mkdir terietor
5.emerge =kdelibs-9999
6.cd /usr/portage/distdir/egit-src/kdelibs/terietor
Actual Results:  
the dir exists!

Expected Results:  
the dir shouldn't exist.The git class should have deleted all the untracked files.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-20 06:38:55 UTC
Created attachment 296417 [details, diff]
Clean up non-bare checkout before updating.

Fixes:
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-20 06:39:31 UTC
Please test that patch.
Comment 3 Giorgos Tsiapaliwkas 2011-12-20 16:10:05 UTC
in which overlay should i apply the patch?
The tree is in cvs,am I wrong?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-20 18:02:36 UTC
(In reply to comment #3)
> in which overlay should i apply the patch?
> The tree is in cvs,am I wrong?

Apply it to the tree. I'm using working with patches using git because it's nicer than cvs.
Comment 5 Giorgos Tsiapaliwkas 2011-12-21 12:42:44 UTC
I don't know from cvs.
I can't test the patch.

sorry
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-21 15:20:28 UTC
(In reply to comment #5)
> I don't know from cvs.
> I can't test the patch.

patch /usr/portage/eclass/git-2.eclass where-you-downloaded-the-patch.patch
Comment 7 Giorgos Tsiapaliwkas 2011-12-22 18:12:12 UTC
$ sudo patch /usr/portage/eclass/git-2.eclass a.patch                                                                                                                                                          
patching file /usr/portage/eclass/git-2.eclass
Hunk #1 FAILED at 344.
1 out of 1 hunk FAILED -- saving rejects to file /usr/portage/eclass/git-2.eclass.rej
patch unexpectedly ends in middle of line

error :(
Comment 8 Giorgos Tsiapaliwkas 2011-12-23 11:09:04 UTC
I tested it with vim.

It works.!
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-19 17:59:27 UTC
Comment on attachment 296417 [details, diff]
Clean up non-bare checkout before updating.

This patch could result in some damage.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-28 07:37:39 UTC
As it was pointed out, some people actually work on those copies and forced cleanup would destroy their work.