Publishing to an empty repository fails #55

Closed
mkoval opened this Issue May 16, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@mkoval
Contributor

mkoval commented May 16, 2014

Publishing an empty repository currently produces an error. This makes it difficult to automate the setup of our aptly repositories (using Puppet) because the repository's skeleton is not created until the first .deb is added. There is a similar issue with source packages: running an apt-get update against a fresh aptly repository fails on a missing Source file until a .dsc file is committed. It would be convenient if aptly created the full directory structure by default.

Also, I just wanted to share that we really appreciate the development and documentation effort you put into Aptly. We've been struggling with the nightmare of debarchiver, mini-dinstall, and reprepro never managed to get a satisfactory solution. We made more progress with aptly in a night than with the other tools in over a month. Thanks!

@nightlyone

This comment has been minimized.

Show comment
Hide comment
@nightlyone

nightlyone May 16, 2014

@mkoval could you share the puppet code you use to automate aptly? We plan to replace our debmirrot setup (https://github.com/Jimdo/puppet-debmirror) with aptly and would love some code to get started.

@mkoval could you share the puppet code you use to automate aptly? We plan to replace our debmirrot setup (https://github.com/Jimdo/puppet-debmirror) with aptly and would love some code to get started.

@smira smira added the enhancement label May 17, 2014

@smira smira added this to the v0.6 milestone May 17, 2014

@smira

This comment has been minimized.

Show comment
Hide comment
@smira

smira May 17, 2014

Member

That's something I missed. Publishing to empty repository should be possible.

Member

smira commented May 17, 2014

That's something I missed. Publishing to empty repository should be possible.

@mkoval

This comment has been minimized.

Show comment
Hide comment
@mkoval

mkoval May 18, 2014

Contributor

@smira Thanks for the quick response.

@nightlyone I only use Puppet to create the empty repository. Ideally, once this issue is fixed, I will add another exec command to publish the repository if it does not already exist.

There's not much to see, but here is our manifest entry:

include ::apt
::apt::source { 'aptly':
    location    => 'http://repo.aptly.info',
    repos       => 'main',
    release     => 'squeeze',
    key         => '2A194991',
    key_server  => 'keys.gnupg.net',
    include_src => false,
}
->
package { 'aptly':
    ensure   => 'latest',
    provider => 'apt',
}
->
exec { "aptly repo create ${aptly_repo}":
    command     => "aptly repo create ${aptly_repo}",
    unless      => "aptly repo show ${aptly_repo}",
    path        => [ '/usr/bin' ],
    user        => $aptly_home,
    environment => [ "HOME=${aptly_home}", ],
}
Contributor

mkoval commented May 18, 2014

@smira Thanks for the quick response.

@nightlyone I only use Puppet to create the empty repository. Ideally, once this issue is fixed, I will add another exec command to publish the repository if it does not already exist.

There's not much to see, but here is our manifest entry:

include ::apt
::apt::source { 'aptly':
    location    => 'http://repo.aptly.info',
    repos       => 'main',
    release     => 'squeeze',
    key         => '2A194991',
    key_server  => 'keys.gnupg.net',
    include_src => false,
}
->
package { 'aptly':
    ensure   => 'latest',
    provider => 'apt',
}
->
exec { "aptly repo create ${aptly_repo}":
    command     => "aptly repo create ${aptly_repo}",
    unless      => "aptly repo show ${aptly_repo}",
    path        => [ '/usr/bin' ],
    user        => $aptly_home,
    environment => [ "HOME=${aptly_home}", ],
}
@smira

This comment has been minimized.

Show comment
Hide comment
@smira

smira May 31, 2014

Member

Now empty snapshots and local repos are publishable. There's one restriction: architectures list should be specified on command line using -architectures flag, as it can't be changed when doing publish update or publish switch.

Member

smira commented May 31, 2014

Now empty snapshots and local repos are publishable. There's one restriction: architectures list should be specified on command line using -architectures flag, as it can't be changed when doing publish update or publish switch.

smira added a commit that referenced this issue May 31, 2014

@smira smira closed this May 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment