cms-git-tools icon indicating copy to clipboard operation
cms-git-tools copied to clipboard

make addpackage check the current dir is inside of CMSSW_BASE

Open slava77 opened this issue 12 years ago • 3 comments

I sometimes forget to cmsenv before running git, after switching from another release area. Current behavior of cms git tools (cms-addpkg) will make changes to the old release area, making silently quite a mess. Please add a check that the current dir is inside of CMSSW_BASE

slava77 avatar Aug 02 '13 15:08 slava77

The code is there, albeit commented. The problem is that at FNAL they have the bad habit of creating the workarea in one place and then work in a directory mounted in a different place which makes that code (and the solution you propose) fail. I'll try to think something smarter.

ktf avatar Aug 02 '13 18:08 ktf

On 8/2/13 8:40 PM, Giulio Eulisse wrote:

The code is there, albeit commented. The problem is that at FNAL they have the bad habit of creating the workarea in one place and then work in a directory mounted in a different place which makes that code (and the solution you propose) fail. I'll try to think something smarter.

Ciao Giuliio,

If we don't want to do it by default, could you please add a switch/option. I will just need to get a habit to use that option.

Thanks

    --slava

— Reply to this email directly or view it on GitHub https://github.com/cms-sw/cms-git-tools/issues/29#issuecomment-22025150.


Vyacheslav (Slava) Krutelyov TAMU: Physics Dept Texas A&M MS4242, College Station, TX 77843-4242 CERN: 42-R-027 AIM/Skype: siava16 googleTalk: [email protected] (630) 291-5128 Cell (US) +41 76 275 7116 Cell (CERN)


slava77 avatar Aug 03 '13 11:08 slava77

ping

I find that it can be very creative: I deleted the test release area, started a new one and forgot to do cmsenv. What do you know, there was no failure doing git cms-init etc and it recreated back my old release area tree (well, only the src part of it). At least no harm in this case

slava77 avatar Oct 25 '14 10:10 slava77