cms-sw / cms-git-tools

CMS Git Helpers
34 stars 26 forks source link

The return of cms-rmpkg #96

Closed kpedro88 closed 6 years ago

kpedro88 commented 6 years ago

cms-rmpkg was originally introduced in #80, but then removed in #83. The problems were:

  • rmpkg can be used to delete a package which was part of a cms-merge-topic. In this case things can fail.
  • when we delete a package (after it has been built once) then it leaves the newly generated files e.g. package/python/*.pyc files in the area. This can also cause problems.
  • SCRAM/build rules also needs update to support rmpkg as it still create lib/$SCRAM_ARCH/.poisonededmplugincache file for the deleted plugins.

This PR addresses the first two concerns by:

Other changes in this PR:

Questions for others (@smuzaffar, @fwyzard, @davidlange6, anybody else who cares):

  1. Are the messages printed for the special cases sufficient? (see below)
  2. Right now, if given packages A and B, cms-rmpkg won't remove A if B triggers an error (because nonexistent, containing untracked files, or modified). Should we try to make it more permissive (e.g. remove anything it can remove)?
  3. I don't know how to fix the SCRAM build rules to deal with packages that were removed but not deleted. Any ideas?

Tested as follows:

cmsrel CMSSW_10_1_0_pre2
cd CMSSW_10_1_0_pre2/src
cmsenv
git cms-addpkg RecoEgamma/PhotonIdentification Configuration/PyReleaseValidation
scram b -j 8
(add random comment to file in Configuration/PyReleaseValidation, commit change)

First test:

git cms-rmpkg RecoEgamma Configuration/PyReleaseValidation

gives:


These packages contain untracked files
RecoEgamma
Configuration/PyReleaseValidation

These packages have been modified from the base release
Configuration/PyReleaseValidation

Second test:

git cms-rmpkg -o RecoEgamma Configuration/PyReleaseValidation

gives:


These packages contain untracked files
RecoEgamma
Configuration/PyReleaseValidation

These packages have been modified from the base release
Configuration/PyReleaseValidation

Removing packages
RecoEgamma
Configuration/PyReleaseValidation
cmsbuild commented 6 years ago

A new Pull Request was created by @kpedro88 (Kevin Pedro) for branch master.

@cmsbuild, @smuzaffar, @gudrutis, @mrodozov can you please review it and eventually sign? Thanks. You can sign-off by replying to this message having '+1' in the first line of your reply. You can reject by replying to this message having '-1' in the first line of your reply.

external issue cms-sw/cmsdist#3828

cmsbuild commented 6 years ago

Pull request #96 was updated.

external issue cms-sw/cmsdist#3828

kpedro88 commented 6 years ago

rebased on top of #95 due to doc/Makefile changes