RFE: provide a mechanism to delete duplicates after import

Bug #1589178 reported by Rolf Leggewie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
New
Undecided
Unassigned

Bug Description

It sometimes happens that files to be imported from _import are already part of the acng archive. acng then ignores them. It would be good if acng provided a mechanism to delete them, maybe similar to the mechanism when there is an error in downloading an index file.

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Log or didn't happen.

Duplication is not uncommon and happens with Debian when a Distro is accessed either via alias ("stable") or via codename of that directory or when a mirror has symlinks and users use different paths in their sources.list .

Therefore, the archive analysis code identifies the dupes and synchronizes the data contents as needed (in case where strict-path checking is not enabled, it's not even copied but they are completely skipped since the path doesn't matter and other file's processing would cover the data in another directory too).

There only showstopper is a problem with Debian (but not Stable and older) because of dropped SHA1 versions of some data in their indexes. Solved in recent 0.9.x versions.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Thank you for the reponse.

I'm not sure we are talking about the same thing. I think you are referring to the case where foo_1.2-1_all.deb is available from both stable and testing and thus a duplicate. That is not what I am talking about.

I am referring to foo_1.2-1_all.deb being in stable and available in the repo. Now I copy foo_1.2-1_all.deb one more time into _import and run the importer. I'm being told there is a HIT but that the destination exists. The deb file after that is left where it is. The request in this ticket is for acng to have a tickbox at the end of the import so those files can be deleted from _import. Or simply delete them automatically outright.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

available in the acng repo cache

Revision history for this message
Rolf Leggewie (r0lf) wrote :

This is still the same in jammy. I put a duplicate file in _import and ran the import function from the web interface. It went well and informed me about "3 files (3.6 MiB) left behind".

$ ll -i /var/cache/apt-cacher-ng/_import/dpkg_1.21.1ubuntu1_amd64.deb /var/cache/apt-cacher-ng/uburep/pool/main/d/dpkg/dpkg_1.21.1ubuntu1_amd64.deb
31787 -rw-rw-rw- 1 root root 1254452 Jan 27 11:37 /var/cache/apt-cacher-ng/_import/dpkg_1.21.1ubuntu1_amd64.deb
29355 -rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 1254452 Jan 23 22:05 /var/cache/apt-cacher-ng/uburep/pool/main/d/dpkg/dpkg_1.21.1ubuntu1_amd64.deb

$ md5sum /var/cache/apt-cacher-ng/_import/dpkg_1.21.1ubuntu1_amd64.deb /var/cache/apt-cacher-ng/uburep/pool/main/d/dpkg/dpkg_1.21.1ubuntu1_amd64.deb
6f4b706f688d72755142f820f92910f9 /var/cache/apt-cacher-ng/_import/dpkg_1.21.1ubuntu1_amd64.deb
6f4b706f688d72755142f820f92910f9 /var/cache/apt-cacher-ng/uburep/pool/main/d/dpkg/dpkg_1.21.1ubuntu1_amd64.deb

I would have expected dpkg_1.21.1ubuntu1_amd64.deb to be removed from _import after the import run.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.