[Box-Admins] Wiping Eliot's versions Re: [squeak-dev] automated way to delete specific trunk packages?

Tobias Pape Das.Linux at gmx.de
Fri May 8 22:23:51 UTC 2015


Hi all,


I just tried wiping the versions Eliot asked to be removed.
I am able to remove the corresponding files from the disk and also remove
the Squeaksource version entries. 

  However, it seems that source.squeak.org is running on some kind of
Magma-backend, where wiping the versions is virtually impossible for me.
I put together the following script:

"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-"
| project projectDir rawVersions fs candidates condition mcModel | 
project := SSRepository current projects detect: [:p |  p id = 'trunk'].
mcModel := (SSRepository storage respondsTo: #mcModelFor: ) ifTrue: [
				SSRepository storage mcModelFor: project].
projectDir := SSFilesystem new projectDirectoryFor: project.
" we really want to delete the versions, so circumvent the accessor that filters them "
rawVersions := project instVarNamed: 'versions'.
condition := [:version |
	#('Collections.spur' 'Compiler.spur' 'Kernel.spur' 'System.spur')
		anySatisfy: [:pat | version fileName beginsWith: pat]].
candidates :=  (rawVersions select: condition) values.
candidates
	do: [:version| | fileName |
		fileName := version fileName.
		Transcript showln: '> ', fileName. 		
		version diffs copy keysDo: [:diffName |
			projectDir deleteFileNamed: diffName ifAbsent: ["ok"].
			Transcript showln: '    Removed ', diffName. 		
			version diffs removeKey: diffName.
			Transcript showln: '    Wiped ', diffName].
		projectDir deleteFileNamed: fileName ifAbsent: ["ok"].
		Transcript showln: '  Removed ', fileName. 
		rawVersions removeKey: fileName.
		" mcModel ifNotNil: [:m | m removeVersion: (project mcVersionFrom: version)]. " "<============== this does not work, chris"
		Transcript showln: '  Wiped ', fileName]
	displayingProgress: [:version | 'Wiping ', version fileName].
self assert: [rawVersions noneSatisfy: condition].
"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-"

At the position Indicated I tried removing the faulty version from the magma-based
data structures, but #removeVersion: tries to remove from an (magma)array, which fail.

I can't help any further here, sorry. Please somebody step in?

Best regards
	-Tobias

PS: I already backed up all affected files to ~squeaksoure/spur-backup


On 08.05.2015, at 23:42, Levente Uzonyi <leves at elte.hu> wrote:

> Hi Eliot,
> 
> On Fri, 8 May 2015, Eliot Miranda wrote:
> 
>> Hi Levente,
>> On Fri, May 8, 2015 at 2:17 PM, Levente Uzonyi <leves at elte.hu> wrote:
>>      Hi Eliot,
>> 
>>      If you can generate the files while they are in the repository (on the server), then you can save the time waiting for someone to
>>      delete them, because while you can't delete the files from the server, you can overwrite them. This wouldn't help with the .mcds, but
>>      I think those are not cached in the image, so deleting just the .mcds is probably a way easier thing to do.
>> I thought this too.  But when I tried doing this yesterday, and earlier, the files were not replaced.  I have a generated set waiting to upload as
>> soon as the old ones have been deleted.  
> 
> I just reuploaded Collections-ul.625.mcz, and the server happily accepted it. It even sent a mail about it.
> It's possible that it won't accept packages with different content, but it clearly accepts reuploads (which is a bug).
> 
> Levente
> 
>> 
>>      Levente
>> 
>>      On Fri, 8 May 2015, Eliot Miranda wrote:
>> 
>>            Hi David,
>> 
>>                and to be very clear, the *only* packages to be deleted are those matching
>> 
>>            Collections.spur*
>>            Compiler.spur*
>>            Kernel.spur*
>>            System.spur*
>> 
>>            Eliot (phone)
>> 
>>            On May 8, 2015, at 7:22 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>> 
>>                  Hi David,
>> 
>>                      it is always possible to fix it another way but it would be hugely expensive.  The only affordable way I
>>                  know is to delete the existing files and upload new ones.  Can someone who has access to the box simply login
>>                  with either ash or FTP and delete them with a single command?  If I had access to the box that is what I would
>>                  do.
>> 
>>                  Eliot (phone)
>> 
>>                  On May 7, 2015, at 7:19 PM, "David T. Lewis" <lewis at mail.msen.com> wrote:
>> 
>>                        On Thu, May 07, 2015 at 04:58:55PM -0700, Eliot Miranda wrote:
>>                              Hi All,
>> 
>>                                I need to delete all the patched Spur packages in trunk to ensure that
>>                              correctly patched versions replace them.  Is there an automated way of
>>                              deleting packages on trunk?  I've used the web interface, but it'll take
>>                              all day :-(
>>                              --
>>                              best,
>>                              Eliot
>> 
>>                        I don't know the answer to your question, but if I look at the files in
>>                        the squeaksource repository, there are quite a few:
>> 
>>                          davidlewis at squeak-box4:/home/squeaksource/sso2/ss/trunk$ ls *spur*mcz | wc -l
>>                          246
>>                          davidlewis at squeak-box4:/home/squeaksource/sso2/ss/trunk$ ls *spur*mcd | wc -l
>>                          152
>>                          davidlewis at squeak-box4:/home/squeaksource/sso2/ss/trunk$ ls *spur*mcm | wc -l
>>                          33
>>                          davidlewis at squeak-box4:/home/squeaksource/sso2/ss/trunk$ ls *spur* | wc -l
>>                          450
>> 
>>                        Is it really necessary to delete all of this stuff? Or could we keep it as is, and
>>                        work around the problems in some other way?
>> 
>>                        Dave
>> --
>> best,Eliot




More information about the Box-Admins mailing list