[ASK] Tracking Package Dependencies in /var/cache/apt/archiv

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Malsasa

[ASK] Tracking Package Dependencies in /var/cache/apt/archiv

Post by Malsasa »

Place:
/var/cache/apt/archives

Condition:
I have downloaded Netbeans after 20+ another applications (Eclipse, pbuilder, Quassel, etc.). There are hundreds of DEB there. Assume I use Nadia now.

Problem:
I don't know which DEB dependencies in the cache for Netbeans. I can't distinct which are DEB dependencies for netbeans between those hundreds of DEB there.

Wish:
I wanna track/filter/find DEB dependencies exactly for Netbeans (no others) from cache for doing sudo dpkg -i *.deb in my another PCs with same Nadia version. Assume I have 30 PCs. I wanna install Netbeans offline, because no bandwidth for downloading again.

What Makes I Brave to Wish:
When I do sudo dpkg -i *.deb in a folder contains only Netbeans and DEB dependency packages, dpkg can track which package to install first, which to next, what's next, until end. It can track dependencies of many DEB in one folder, in local directory. And this type of installation is so useful in low internet bandwidth country like Indonesia, my country.

What I Don't Wish:
Standard preparation mode for offline installation in case you can see this page for example: http://www.tuxradar.com/answers/517. I don't want that method because I have all I need in my cache, I don't want to download again. That waste my limited bandwidth.
Method of Aptoncd. I wanna Netbeans only, not whole DEB of my cache.

Question:
How to do dependency tracking only for Netbeans (only Netbeans, not others) with all file name completely shown? It should complete and not only front name like kde-standard or build-essential. I wanna command result like this:

Dependencies for Netbeans in the /var/cache/apt/archives:
anu_1.0_i386.deb
ani_1.0_i386.deb
ano_1.0_i386.deb

I know only apt-cache, apt-rdepends, apt-offline, and dpkg -l packagename. Only them. I have read some documentations like dpkg manpage, apt-offline manpage, a webupd8 page, a debianadmin manual, and more. All not satisfy my curiosity. Only apt-cache depends packagename that almost perfectly suite my wish. Any solution from you all? Thank you before.

Respect from Indonesia.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: [ASK] Tracking Package Dependencies in /var/cache/apt/ar

Post by DrHu »

http://www.debianadmin.com/recursively- ... pends.html
http://www.howtoforge.com/checking-pack ... ian-ubuntu
http://packages.qa.debian.org/a/apt-rdepends.html
  • --utility function + name of package/program..
Checkinstall helps with maintaining data on file collection (compiled files from source)
http://asic-linux.com.mx/~izto/checkinstall/
Last edited by DrHu on Fri Mar 08, 2013 2:28 pm, edited 1 time in total.
Malsasa

Re: [ASK] Tracking Package Dependencies in /var/cache/apt/ar

Post by Malsasa »

I will try this amazing software and insya Allah will come back here to inform :)

Thank you so much.
mockturtl

Re: [ASK] Tracking Package Dependencies in /var/cache/apt/ar

Post by mockturtl »

Malsasa wrote:What I Don't Wish:
Standard preparation mode for offline installation in case you can see this page for example: http://www.tuxradar.com/answers/517. I don't want that method because I have all I need in my cache, I don't want to download again. That waste my limited bandwidth.
It won't download everything -- it will generate a package list with the filenames you want. You can feed the list to sed:

Code: Select all

# erase up to the final '/' to get the filenames
sed -e 's!^http://[a-z0-9./_-]*/!!' downloads.list

# 'http://some.path/to/foo.deb' becomes 'foo.deb'
Question:
How to do dependency tracking only for Netbeans (only Netbeans, not others) with all file name completely shown? It should complete and not only front name like kde-standard or build-essential.
If the above won't work, I would simulate (no downloads!) installing with a clean cache, on a fresh machine, to find out which packages it needs.

Code: Select all

$ apt-get install -s netbeans
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated, so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  antlr3 default-jdk-doc javahelp2 junit4-doc libbeansbinding-java libbetter-appframework-java libbindex-java libbytelist-java libcommons-net1-java libemma-java libfelix-framework-java libfelix-main-java libflute-java libfreemarker-java libhamcrest-java-doc libini4j-java libjcodings-java libjemmy2-java libjna-java libjoda-convert-java libjoda-time-java libjvyamlb-java libjzlib-java libnb-absolutelayout-java libnb-apisupport3-java libnb-ide14-java libnb-java5-java libnb-javaparser-java libnb-org-openide-modules-java libnb-org-openide-util-java libnb-org-openide-util-lookup-java libnb-platform-devel-java libnb-platform13-java libnetx-java libsac-java libsac-java-gcj libsimple-validation-java libstringtemplate-java libsvn-java libsvnclientadapter-java libsvnkit-java libswing-layout-java libswingx1-java libtrilead-ssh2-java openjdk-6-doc
Suggested packages: ...
This isn't the format you want, but you can try something like this to get the matching .deb file:

Code: Select all

for packagename in ${packagelist}; do
  scp /var/cache/apt/archives/${packagename}* otherhost:~/netbeans_deps
done
You might also find useful information with debtree. The dependency graph for netbeans, as .jpg, is 14 MB.
Malsasa

Re: [ASK] Tracking Package Dependencies in /var/cache/apt/ar

Post by Malsasa »

Quote: It won't download everything -- it will generate a package list with the filenames you want. You can feed the list to sed:
Mine: Thank you so much for attention. Yes, you are right, but the list is also for downloading, right? That is my mean.

Code: Select all

# erase up to the final '/' to get the filenames
sed -e 's!^http://[a-z0-9./_-]*/!!' downloads.list

# 'http://some.path/to/foo.deb' becomes 'foo.deb'
It is great, I have done creating list then do you sed command. Wonderful, almost perfect. But this command, I have tried, it cannot track dependencies if the app has installed. For example, my Netbeans. I have do it, but the result after your sed (wow advanced command), only a netbeans package name. But thank you for giving me image for forther research.

Code: Select all

for packagename in ${packagelist}; do
  scp /var/cache/apt/archives/${packagename}* otherhost:~/netbeans_deps
done
Honestly, I dont know where to type these. In a config file? I am sorry for my little knowledge.

Quote: You might also find useful information with debtree. The dependency graph for netbeans, as .jpg, is 14 MB.[/quote]
Mine: That is great, wonderful. Thank you. It gives me more imagination for further research.
Locked

Return to “Software & Applications”