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

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
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
  • 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 2 '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 2 '12 at 23:31
  • I see your point. I'll update the question. Thanks. – GregB Feb 3 '12 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.