On Sun, Sep 26, 2010 at 2:17 PM, Joey Hess <jo...@debian.org> wrote:
> Drake, I pulled this patch into a branch of my debmirror git repository,
> and looked it over.
>
> It seems to disable cleanup of obsolete files:
>
> -cleanup_unknown_files() if ($post_cleanup);
> +cleanup_unknown_files() if ($post_cleanup && ! $debmarshal);
>
> Of course, some obsolete files will be in snapshots. But what if I want
> to delete a snapshot? I would expect to be able to rm -rf
> dists/foo/$NUMBER and on the next debmirror run, have it remove the
> deb files that were in that snapshot.

Yep.  Right now cleanup is an external process, not built into debmirror.
It's at http://code.google.com/p/debmarshal/source/browse/#svn/trunk/repository2

There are separate utilities for cleaning up unlinked dist snapshots
(cleans any that don't have a symlink to them), deb cleanup if no
dists refer to a package, and source cleanup if no debs refer to a
source.  The source and deb cleanup is still buggy, so I wouldn't
advise it just yet.  I'm only running dist cleanup right now, and
debmarshal.debian.net is without power today.

cleaning up within debmirror would wipe out all previous snapshots, so
I disabled it when doing debmarshal snapshots.  Before turning it back
on, there's need to be logic like in the separate utilities first, and
I haven't gotten them quite right yet.  Plus it would be a big patch,
and I wanted to start as small as possible on debmirror patching.

> Seems to me that this patch needs to be updated so it looks at the
> contents of Packages/Sources files in the snapshot, and adds them to its
> known file list, so it can call cleanup_unknown_files().

Yep.  That's all the separate utilities are doing.  I used to be a
database fan, but I'm getting really tired of fixing corruption all
the time, so this time I've gone luddite, and just let the computer
work harder.  :)

>
> --
> see shy jo
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIVAwUBTJ+4b8kQ2SIlEuPHAQhZBw//dvk/Oxs+KkFhQKNbs4zptI4fIrvNXxGE
> NmJHSrsavhWzb4qsa9ymUr+1cXosR/IUtYzyo82CvakUihCs8u8W2TFEI5JQdFp1
> PCUVwvpX1QhfzUWxWhBWuIgcI3WDFTy+9sEIHRxWou5g/efDPz8W3K7qppncIDrM
> 8X/0A1+NIqhIVedca2U2Cp43P92LXbMjOtW3uTUTKDOiUtFMIDukYeWvg2teoA2N
> 7Sx6pn3vyUYs/lK94TWNImYUczdfuogpVPWlg0A/2ZsVa5Feu8KwEFv6RHf0OQZO
> dcq87nQWuEBRsQU/MIaDcg45RsgN53e6zKETC86V/k+aSCZ+wbIo0E3xlVKtTYwS
> 4vmSnExixVgXL61myP/tDJ0CQ0dMI6B8GCTxTdImiC7ncW8zM/0aQY4ZD4fCednt
> wWskOe5R9ekyeImF/FwbVUL9QRm561rs7Hefux25qIRY9BUlbOZI0C9AMg1Xj8O5
> 7kM1AQHJl7qp9GvVZnDT/HvbzlyJVKatGySeL2HuGoV7UVLxu8MRQD54ZethPK4y
> RrvpY9Yp1ub2HzCz07jUGhORdmi2msx8PeLQzFAS7u/0k+nawoQeXVPQN1UEyfnc
> b+yILD8492u4DOiFCmQ8Ub84dh3iPtQdmsINH2Gj9pvOKCIcYa7BcRYXOrYCs9zt
> 1DJkWWta0zc=
> =57st
> -----END PGP SIGNATURE-----
>
>



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to