Issue overriding components or publishing multiple repositories with the same release

1,102 views
Skip to first unread message

Sarah Kowalik

unread,
Aug 12, 2014, 4:15:51 AM8/12/14
to aptly-...@googlegroups.com
Hi there,

We've recently come across aptly, and so far, it's been excellent!

For each ubuntu release (currently only precise, but we plan to add trusty as well), we publish:

 - packages in component main

 - packages in component experimental

Ideally, these would appear under:

deb http://packages.flapjack.io/deb precise main
deb http://packages.flapjack.io/deb precise experimental

Unfortunately, I haven't been able to get this working. 

 - I could split this into single repositories for each version (one for trusty, one for precise), but I couldn't find a way to override the component on a package-by-package basis during the aptly repo add foo.deb.

 - I've tried adding multiple repositories, one for each release-component group, but I can't publish both of them without setting a prefix:

omnibus-flapjack ➤ aptly repo show flapjack-precise-main
Name: flapjack-precise-main
Comment:
Default Distribution: precise
Default Component: main
Number of packages: 1
omnibus-flapjack ➤ aptly repo show flapjack-precise-experimental
Name: flapjack-precise-experimental
Comment:
Default Distribution: precise
Default Component: experimental
Number of packages: 1

When publishing the second repository:
aptly -config=aptly.conf -component=experimental -architectures="i386,amd64" -gpg-key="803709B6" publish repo flapjack-precise-experimental
ERROR: prefix/distribution already used by another published repo: ./precise [amd64, i386] publishes {main: [flapjack-precise-main]}

How can I do this properly?

Thanks,

Sarah

Andrey Smirnov

unread,
Aug 12, 2014, 2:39:22 PM8/12/14
to Sarah Kowalik, aptly-...@googlegroups.com
Hi Sarah!

In aptly, all package lists (mirrors, local repos and snapshots) are single-component, that is, they don't have any component at all. Component is only assigned when you publish your repositories. 

If I got your case correctly, you need something like that:

   aptly repo create -distribution=precise -component=main precise-main
   aptly repo create -distribution=precise -component=experimental precise-experimental
   
   aptly repo add ...

   aptly publish repo -component=, precise-main precise-experimental

The last line does multi-component publishing: two local repos are published under single prefix/distribution (prefix is root in this case and distribution is guessed from local repos, it would be 'precise'). The argument `-component=,` is there for aptly to know that there would be two local repos, one for each component, component name is guessed from local repo (given during creation), you can override component name by specifying it explicitly: `-component=compA,compB`. 

For trusty distribution you would need two more local repos and more multi-component publish.

If you would like to have more flexibility (and ability to do easy rollbacks), I would recommend to take snapshots of local repos (when new version is released) and publish those snapshots. 

You can update published repository in-place by using `aptly publish update`, or, if you choose to publish snapshots, `aptly publish switch`.

Hope that helps!


--
You received this message because you are subscribed to the Google Groups "aptly-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aptly-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Andrey Smirnov,
+79261724320

Sarah Kowalik

unread,
Aug 12, 2014, 11:09:28 PM8/12/14
to aptly-...@googlegroups.com, hob...@hobbsee.com
Hi Andrey,

Thanks for your response.


In aptly, all package lists (mirrors, local repos and snapshots) are single-component, that is, they don't have any component at all. Component is only assigned when you publish your repositories. 

Right, OK.

If I got your case correctly, you need something like that:

Perfect.  This is now working correctly.

For trusty distribution you would need two more local repos and more multi-component publish.

This is also working.

If you would like to have more flexibility (and ability to do easy rollbacks), I would recommend to take snapshots of local repos (when new version is released) and publish those snapshots. 

I'll look into this.

You can update published repository in-place by using `aptly publish update`, or, if you choose to publish snapshots, `aptly publish switch`.

What is the correct syntax for this?  I tried various versions, and couldn't get this to work.

➤ aptly -config=aptly.conf publish list
Published repositories:
  * 1.0/precise [amd64, i386] publishes {experimental: [flapjack-1.0-precise-experimental]}, {main: [flapjack-1.0-precise-main]}
➤ aptly -config=aptly.conf publish update 1.0/precise
ERROR: unable to update: published repo with storage:prefix/distribution ./1.0/precise not found
 
I also found the argument order for aptly publish drop confusing.  For consistency, perhaps aptly publish drop [[<endpoint>:]<prefix>]/<distribution> would work better here?

Sarah

Sarah Kowalik

unread,
Aug 12, 2014, 11:14:19 PM8/12/14
to aptly-...@googlegroups.com, hob...@hobbsee.com
Hi Andrey,


You can update published repository in-place by using `aptly publish update`, or, if you choose to publish snapshots, `aptly publish switch`.

What is the correct syntax for this?  I tried various versions, and couldn't get this to work.

➤ aptly -config=aptly.conf publish list
Published repositories:
  * 1.0/precise [amd64, i386] publishes {experimental: [flapjack-1.0-precise-experimental]}, {main: [flapjack-1.0-precise-main]}

This suddenly started working with aptly publish update precise 1.0.  Thanks!

Sarah
 
Reply all
Reply to author
Forward
0 new messages