aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.57k stars 375 forks source link

Can't import deb filename with % #323

Closed xuanngo2001 closed 8 years ago

xuanngo2001 commented 8 years ago

Examples:

[!] Some files were skipped due to errors:
  /var/cache/apt/archives/g++_4%3a4.9.2-2_amd64.deb
  /var/cache/apt/archives/libx11-dev_2%3a1.6.2-3_amd64.deb
  /var/cache/apt/archives/libxau-dev_1%3a1.0.8-1_amd64.deb
  /var/cache/apt/archives/libxdmcp-dev_1%3a1.1.1-1+b1_amd64.deb
  /var/cache/apt/archives/libxext-dev_2%3a1.3.3-1_amd64.deb
  /var/cache/apt/archives/xorg-sgml-doctools_1%3a1.11-1_all.deb
smira commented 8 years ago

@limelime files with % work perfectly in my testing, do you have something to reproduce this issue?

xuanngo2001 commented 8 years ago

After further investigation, the cause of the error is not due to the %. There are conflicts. When I saw all files listed at the end as errors, they all have %. I concluded that was the cause. I was obviously too quick to jump to that conclusion.

However, having said that. Error message from Aptly is not helpful. It displayed conflict but what conflict:

[!] Unable to add package to repo libx11-dev_2:1.6.2-3_amd64: conflict in package libx11-dev_2:1.6.2-3_amd64
[!] Unable to add package to repo libxau-dev_1:1.0.8-1_amd64: conflict in package libxau-dev_1:1.0.8-1_amd64
[!] Unable to add package to repo libxdmcp-dev_1:1.1.1-1+b1_amd64: conflict in package libxdmcp-dev_1:1.1.1-1+b1_amd64
[!] Unable to add package to repo xorg-sgml-doctools_1:1.11-1_all: conflict in package xorg-sgml-doctools_1:1.11-1_all

I was getting all my packages from the following sources:


deb http://www.deb-multimedia.org jessie main non-free

deb http://http.debian.net/debian jessie-backports main
deb http://repo.aptly.info/ nightly main

deb http://ftp.debian.org/debian jessie main contrib non-free
deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free

I'm using aptly version: 0.9.6~dev. Here is the steps that I did that got errors:

aptly repo create local

apt-get update
apt-get -d install libx11-dev

aptly repo add local /var/cache/apt/archives/
smira commented 8 years ago

@limelime message tells that you have already in the same repo package with exactly same name, version and arch. You can't have two conflicting packages in one repo (but you can have them in multiple repos). If you want to replace one package with another, use -force-replace.

See: http://www.aptly.info/doc/aptly/repo/add/ and http://www.aptly.info/doc/feature/duplicate/