#519498 approx-import: delete "original" files that were successfully imported in order to save disk space

Package:
approx
Source:
approx
Description:
caching proxy server for Debian archive files
Submitter:
Rogério Brito
Date:
2010-07-04 15:54:06 UTC
Severity:
wishlist
#519498#5
Date:
2009-03-13 04:02:50 UTC
From:
To:
Hi.

I have another suggestion: it would be nice (for the sake of saving disk
space) if approx-import provided a switch to delete the files that are
already succesfully imported into the cache.

This would make approx even better, especially for systems with limited
amount of disk space.


Thanks, Rogério Brito.

#519498#10
Date:
2010-07-04 14:57:08 UTC
From:
To:
retitle 519498 approx-import: delete "original" files that were successfully imported in order to save disk space
thanks

Hi there, once again, Eric.

I am not sure if what I wrote here is clear, but I just wanted to
retitle the bug and make an extra comment that it would be reasonably
easy to implement this feature.

approx-import could implement a command line switch such that, for each
file that were succesfully imported into the cache, it would call
unlink(2) on the original one, to help save space for those migrating to
approx from other systems (like, for instance, apt-move).

This would be very nice to have in approx.


Thanks, Rogério Brito.

#519498#17
Date:
2010-07-04 15:50:23 UTC
From:
To:
I thought I replied to the original bug filing, but I guess I didn't
-- sorry.

The implementation difficulty is because approx-import runs as the
"approx" user, so that it can write to the approx cache.
But the approx user is unlikely to be able to unlink the original
files -- they're almost certainly owned by someone else.

It's not impossible (obviously).  But the changes are a little more
far-reaching than just calling unlink after each import.

Cheers,
Eric