Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to publish multiples distributions with same prefix #486

Closed
chavalc opened this issue Jan 31, 2017 · 5 comments · Fixed by #1292
Closed

Impossible to publish multiples distributions with same prefix #486

chavalc opened this issue Jan 31, 2017 · 5 comments · Fixed by #1292

Comments

@chavalc
Copy link

chavalc commented Jan 31, 2017

It appears that it is impossible to publish more than one distribution on with same prefix.

Detailed Description

For my needs, I have to mirror two distributions of the same archive and publish them.

I can publish the first distribution without problem (thanks to a snapshot of the mirror). However, when the second distribution is published, the following error appears (for example) :

ERROR: unable to publish: unable to process packages: error linking file to /root/.aptly/public/hardware-mcp/pool/main/s/sblim-cmpi-devel/libcmpicppimpl0_2.0.3-0ubuntu2_amd64.deb: file already exists and is different

After verification, my two distributions contain packages unchanged from one to the other (same versions but different checksums).

A workaround I could find is to include the distribution name in the prefix but this does not seem very practical.

Possible Implementation

After some investigations, it seems that this is due to the architecture of files retained for publication and especially that of the folder pool of the published archive.

There come to mind a possible solution: create a subfolder by distribution in the pool folder (by component too ?).

Your Environment

OS : Debian Jessie 8.7
Aptly : 0.9.7

@chavalc
Copy link
Author

chavalc commented Feb 1, 2017

After reflection, the problem would come more from the original deposit of my mirrors because it does not respect the architectural conventions of the folder pool of an archive. Indeed, my original repository contains subfolders by distribution and packages of the same version have different checksums.

What do you think about that ?

@smira
Copy link
Contributor

smira commented Feb 7, 2017

The repository layout is not something invented with aptly, it's standard Debian repository format (https://wiki.debian.org/RepositoryFormat).

Debian best practices say that there should be no two packages with same version (filename) and package contents. As pool/ like you said is shared between the distributions, this restriction makes sense. Debian repository follows same structure, and this makes some sense, if you have same package shared between distributions, it would have only single file in pool/.

If you still want to have different contents for same package version, just use prefix feature of the publish commands, that way aptly would create subdirectory under public root (which will also make pool/ separate for each published repo).

@chavalc
Copy link
Author

chavalc commented Feb 7, 2017

Thank you for you reply.

The problem is due to my originals deposits : they don't respect best practices.

@chavalc chavalc closed this as completed Feb 7, 2017
@spielkind
Copy link

Is it possible add such an unsupported feature anyway? As it seems that breaking rules is more common example: https://apt.puppetlabs.com/pool/

@smira
Copy link
Contributor

smira commented Jan 26, 2018

It's certainly possible, but I don't see big difference with using separate prefix which is more clean and achieves roughly same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants