×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Dealing with dependancies

  • Posts: 193
  • Thank you received: 46
So, I started running into dependancy issues, short back story.

Yesterday I build indi from source, and installed it all. Later, I added the ppa for kstars here, and installed with apt-get install kstars-bleeding. It dragged along the entire indi system, which I did not really want, but, that's what apt-get is going to do for satisfying dependancies.

The issue I run into now, I want to be able to get kstars from the ppa on a regular basis, but, I want my indi setup here to be my own, built from sources that I'll be making changes to. Problem, kstars is dependant on a bunch of things, and every time the ppa gets updated, if I run 'apt-get upgrade', a bunch of my own stuff gets over-written. And to make matters somewhat worse, I dont always install into the same directory trees, so there are multiple versions, which turns into a multitude of problems when compiling and linking.

To get around this problem, I want apt-get to think everything is installed nicely, when in fact, I've removed it and replaced with all my own builds in the places I want them. I wrote some scripts to deal with this.

After installing kstars-bleeding, along with all it's dependancies that drag along all the indi bits and pieces, I first started with apt-mark and put all the indi packages on hold, so that an apt-get upgrade will no longer update them.
apt-mark hold fliusb-dkms indi-aagcloudwatcher indi-asicam indi-bin indi-dsi indi-eqmod indi-ffmv indi-fishcamp indi-fli indi-full indi-maxdomeii indi-qhy indi-sbig libapogee3 libfishcamp libfli1 libindi-data libindi1 libqhy libqsi7 libsbigudrv2 indi-apogee indi-gphoto indi-qsi
The next step, find all the files that were installed by those packages, and delete them. There are two steps to the process. First we use dpkg to find all the files.
dpkg -L fliusb-dkms indi-aagcloudwatcher indi-asicam indi-bin indi-dsi indi-eqmod indi-ffmv indi-fishcamp indi-fli indi-full indi-maxdomeii indi-qhy indi-sbig libapogee3 libfishcamp libfli1 libindi-data libindi1 libqhy libqsi7 libsbigudrv2 > removelist

This leaves me with a text file that lists all the files and directories that were installed by those files. To delete only files from that bunch, a quick bash script that'll read the list, and delete any items that are regular files, ignoring directories etc. This script needs to be run as root (or sudo) in order to delete files out of your home tree.
#!/bin/sh
while IFS='' read -r line
do
 if [ -f "$line" ]
 then 
  echo $line
  rm -f $line
 fi
done < removelist
After these steps are completed, now I can go into my own build tree, make install the pieces I need, and no longer will an apt-get upgrade start replacing my in progress work with stuff from the ppa.

I _think_ I got all the packages, it's possible I missed some, and when the next set of builds show up on the ppa, I'll see if there is anything I missed that ended up re-installed instead of held.
The following user(s) said Thank You: Philippe
Last edit: 8 years 2 months ago by Gerry Rozema. Reason: add a couple more packages to the list
8 years 6 months ago #5230

Please Log in or Create an account to join the conversation.

  • Posts: 193
  • Thank you received: 46
I see folks in other threads are struggling with intermixed versions and dependancies again.

I'm bumping this thread back to the top page, so folks with dependancy issues can see a quick and easy way to clean the old indi off of a system if you want to compile fresh from sources, and not end up with various mixed versions in different directories.
8 years 2 months ago #6467

Please Log in or Create an account to join the conversation.

  • Posts: 193
  • Thank you received: 46
I have added a couple more packages to the list, which got missed the first time thru.

This should now be a fairly definitive way of dealing with intermixed dependancies if you have installed from repositories, and are now trying to build from local sources, but install directories end up different, so path options send you into the land of intermixed dependancies.
8 years 2 months ago #6468

Please Log in or Create an account to join the conversation.

Time to create page: 0.640 seconds