3

I manage a few apps that depend on specific versions of some packages. To make sure that I always have the correct versions, I created my own Apt repository. Now, I'm concerned that some of the packages I depend on will break because the packages they depend on will be up-revved. Is there an easy way to download a package (say, tomcat6) and all of the packages it depends on so that I can add them to my private repository?

Ubuntu 10.04 Reprepro

EDIT

To clarify a point that was made below, I'm looking to automate this process so that it's easily repeatable.

Right now, I'm manually running "sudo apt-cache depends [package]", then using "sudo apt-get -d install [package package2 package3 package4... package*]". I'm looking to see if there's a streamlined way of doing this before I script my own solution

GregB
  • 1,382
  • 2
  • 13
  • 22

2 Answers2

2

use apt and the -d switch to only dowload the packages

luke@home:~/$sudo apt-get -d install [whatever]

They will be stored in

/var/cache/apt/archives
LukeR
  • 3,126
  • 2
  • 30
  • 25
  • What I'd like to do is automate that process. Right now, I'm manually running "sudo apt-cache depends [package]", then using "sudo apt-get -d install [package package2 package3 package4... package*]". I'm looking to see if there's a streamlined way of doing this before I script my own solution. – GregB Feb 02 '12 at 23:26
  • Ah, fair enough. Might want to include that info in the question, it wasn't really clear (to me anyway). – LukeR Feb 02 '12 at 23:31
  • I see your point. I'll update the question. Thanks. – GregB Feb 03 '12 at 00:30
2

If you start with a clean install of ubuntu I think you might be able to use apt-offline like so:

apt-offline set /tmp/apt-offline.sig --update
apt-offline set --install-packages tomcat6 -- /tmp/apt-offline.sig
apt-offline get --bundle apt-offline-bundle.zip -- /tmp/apt-offline.sig
Mark Wagner
  • 18,019
  • 2
  • 32
  • 47