{"action":"created","issue":{"url":"https://api.github.com/repos/smira/aptly/issues/329","labels_url":"https://api.github.com/repos/smira/aptly/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/smira/aptly/issues/329/comments","events_url":"https://api.github.com/repos/smira/aptly/issues/329/events","html_url":"https://github.com/smira/aptly/issues/329","id":123335268,"number":329,"title":" Unable to import file: file  already exists","user":{"login":"deutsche","id":533533,"avatar_url":"https://avatars.githubusercontent.com/u/533533?v=3","gravatar_id":"","url":"https://api.github.com/users/deutsche","html_url":"https://github.com/deutsche","followers_url":"https://api.github.com/users/deutsche/followers","following_url":"https://api.github.com/users/deutsche/following{/other_user}","gists_url":"https://api.github.com/users/deutsche/gists{/gist_id}","starred_url":"https://api.github.com/users/deutsche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deutsche/subscriptions","organizations_url":"https://api.github.com/users/deutsche/orgs","repos_url":"https://api.github.com/users/deutsche/repos","events_url":"https://api.github.com/users/deutsche/events{/privacy}","received_events_url":"https://api.github.com/users/deutsche/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-21T18:43:53Z","updated_at":"2016-01-31T21:01:59Z","closed_at":null,"body":"I try to replace  package with  same package (but different by content). Also, i have over 4000+ packages that aptly added well in one transaction (not listed here).\r\n\r\n\r\nThis is error. \r\n```\r\naptly repo add -force-replace=true xbtos-imx6ulevk-dev /var/repo/tmp/jenkins-xbt-image-20/xbtos-imx6ulevk-dev/cortexa7hf-vfp-neon/libgnutls-dbg_3.3.17.1-r0_armel.deb\r\nLoading packages...\r\n[!] Unable to import file /var/repo/tmp/jenkins-xbt-image-20/xbtos-imx6ulevk-dev/cortexa7hf-vfp-neon/libgnutls-dbg_3.3.17.1-r0_armel.deb into pool: unable to import into pool: file /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb already exists\r\n[!] Some files were skipped due to errors:\r\n  /var/repo/tmp/jenkins-xbt-image-20/xbtos-imx6ulevk-dev/cortexa7hf-vfp-neon/libgnutls-dbg_3.3.17.1-r0_armel.deb\r\n```\r\n```\r\naptly package  show -with-references=true -with-files=true libgnutls-dbg_3.3.17.1-r0_armel\r\nPackage: libgnutls-dbg\r\nPriority: optional\r\nSection: devel\r\nMaintainer: Poky <poky@yoctoproject.org>\r\nArchitecture: armel\r\nVersion: 3.3.17.1-r0\r\nProvides: gnutls-dbg\r\nRecommends: nettle-dbg, libgmp-dbg, libstdc++-dbg, libgcc-s-dbg, libz-dbg, libc6-dbg\r\nFilename: libgnutls-dbg_3.3.17.1-r0_armel.deb\r\nSize: 2198478\r\nMD5sum: 138d6b6f4bc063e563aa93ebdd71f568\r\nSHA1: 2aa132ed4e67b6d28e9a5cf2f02f171ef14f99c6\r\nSHA256: a7795602bc916a4b05d0c0f291fecd323ab3ab5230692d13b50563677851e5eb\r\nDescription: GNU Transport Layer Security Library - Debugging files\r\n GNU Transport Layer Security Library.  This package contains ELF symbols\r\n and related sources for debugging purposes.\r\nOe: gnutls\r\nHomepage: http://www.gnu.org/software/gnutls/\r\nPackagearch: cortexa7hf-vfp-neon\r\n\r\nFiles in the pool:\r\n  /var/repo/aptly/pool/13/8d/libgnutls-dbg_3.3.17.1-r0_armel.deb\r\n\r\nReferences to package:\r\n  snapshot [xbtos-imx6ulevk-dev-2015.12.19-b1]: Snapshot from local repo [xbtos-imx6ulevk-dev]: xbterminal-firmware\r\n```\r\n```\r\nls -la /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb \r\n-rw-r--r-- 2 repo repo 2198670 Dec 16 15:24 /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb\r\n```\r\nIt looks like  aptly cleanup  does not do \"Deleting unreferenced files \" - File /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb is not listed in aptly database\r\n```\r\naptly db cleanup\r\nLoading mirrors, local repos, snapshots and published repos...\r\nLoading list of all packages...\r\nDeleting unreferenced packages (0)...\r\nBuilding list of files referenced by packages...\r\nBuilding list of files in package pool...\r\nDeleting unreferenced files (0)...\r\nCompacting database...\r\nls -la /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb \r\n-rw-r--r-- 2 repo repo 2198670 Dec 16 15:24 /var/repo/aptly/pool/55/bb/libgnutls-dbg_3.3.17.1-r0_armel.deb\r\n```"},"comment":{"url":"https://api.github.com/repos/smira/aptly/issues/comments/177609727","html_url":"https://github.com/smira/aptly/issues/329#issuecomment-177609727","issue_url":"https://api.github.com/repos/smira/aptly/issues/329","id":177609727,"user":{"login":"richard-scott","id":5149834,"avatar_url":"https://avatars.githubusercontent.com/u/5149834?v=3","gravatar_id":"","url":"https://api.github.com/users/richard-scott","html_url":"https://github.com/richard-scott","followers_url":"https://api.github.com/users/richard-scott/followers","following_url":"https://api.github.com/users/richard-scott/following{/other_user}","gists_url":"https://api.github.com/users/richard-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-scott/subscriptions","organizations_url":"https://api.github.com/users/richard-scott/orgs","repos_url":"https://api.github.com/users/richard-scott/repos","events_url":"https://api.github.com/users/richard-scott/events{/privacy}","received_events_url":"https://api.github.com/users/richard-scott/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T21:01:59Z","updated_at":"2016-01-31T21:01:59Z","body":"I also get that when trying to make a snapshot from a debian mirror:\r\n```\r\nroot@localhost:~/sbin/aptly# aptly publish -skip-signing --distribution=jessie snapshot debian-1454272343 debian\r\nLoading packages...\r\nGenerating metadata files and linking package files...\r\nERROR: unable to publish: unable to process packages: error linking file to /root/.aptly/public/debian/pool/main/0/0ad/0ad_0.0.17-1_amd64.deb: file already exists and is different\r\n```\r\nThe original mirror was setup with this:\r\n```\r\naptly mirror create -architectures=amd64 -with-sources debian http://ftp.ticklers.org/debian/ jessie main\r\n```\r\nDo you think it is also an MD5 clash?"}}