Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 2017 11:16:06 +1100
From:      Michelle Sullivan <michelle@sorbs.net>
To:        Dave Horsfall <dave@horsfall.org>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: portsnap temporary files
Message-ID:  <ef84c6ee-6054-a12c-bd48-475f61d63a7f@sorbs.net>
In-Reply-To: <alpine.BSF.2.20.1701071023560.86981@aneurin.horsfall.org>
References:  <alpine.BSF.2.20.1701070651050.86981@aneurin.horsfall.org> <20170106223050.0fcbed48@raksha.tavi.co.uk> <CAJuc1zMVBfHo2eL5dKH8=ZkwSzsaLK=wywuV1B0r4kcOE%2B_UYg@mail.gmail.com> <alpine.BSF.2.20.1701071023560.86981@aneurin.horsfall.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dave Horsfall wrote:
> (Many responses)
>
> I note that no-one has answered the question which caused me to post the
> message in the first place viz: why weren't the files being removed
> automatically?  Everyone appears to have missed this point...
>
I didn't and some of the answers are helpful even if not answering the 
original.

"portsnap fetch" - I wasn't aware it removed the old files at the 
beginning, but will take the other poster's word for that (especially 
after checking the remaining few remaining systems I have on FreeBSD 
would seem to indicate it as a fact)...  however "rm -r /var/db/portsnap 
&& portsnap fetch" is an easy way to clean everything up... if you think 
it's not working correctly.

The index file you will have is: /var/db/portsnap/INDEX

It is possible this was deleted/replaced at some time thereby losing the 
mapping of the files... perhaps a working directory failure (out of 
space etc).. but that should be fixed at every successful fetch as it 
finishes with the following lines of code:

# Move files into their proper locations
         rm -f tag INDEX tINDEX
         rm -rf files
         mv tag.new tag
         mv tINDEX.new tINDEX
         mv INDEX.new INDEX
         mv snap/ files/

('snap' being created new everytime)..

The other part you might not be considering is that the files have to be 
cleaned up on the portsnap server (snapshot builder) itself... but again 
looking at code it should 'just work' - unless someone has tampered with 
it since I downloaded it all and setup my own server...

Regards,

Michelle



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ef84c6ee-6054-a12c-bd48-475f61d63a7f>