in my installation script I am using symbolic links on OSX (Mac) platform. I use <createsymlink> feature of the BitRock script to do that.



Everything works well, if I have only one (1) instance of my application installed on a customer's platform. However, if a customer installs a second instance of the same application (in a different location, but on the same computer as the first instance), and then uninstalls the first one, the sym link disappears, and the execution of the second install breaks, by not finding necessary files.

My link name is /usr/local/lib/libmchpusb-1.0.so , and its target depends on the {install-dir}, as follows: ${installdir}/my_app/Contents/Resources/some_ide/mplablibs/modules/lib/libusb-1.0.0.dylib

To clarify the scenario:

1) Install version X.1 in location A (sym link is created, with target at location A) 2) Install version X.2 in location B (same sym link, now with another target at location B) 3) Uninstall version X.1 which causes the symbolic link, libmchpusb-1.0.so in /usr/local/lib to disappear 4) The version X.2, which is still installed, now no longer works because the common symbolic link is gone.

How to possibly correct this using BitRock, please?

Is it at all possible for the uninstaller to see that upon X.1 uninstall, the soft link additionally points to not only the target that is to be deleted, but also to another target that still uses that soft link? And if so, then leave the soft link alone?

Thanks so much!

asked 07 May '12, 20:46

Sasha's gravatar image

accept rate: 0%

I have yet to play with symlinks, so I am guessing here.

Sounds as though you should check for the existence of another version of your software and the symlink's existence, during the preUninstallationActionList. If both exist, createSymLink in the postUninstallationActionList.

I can't say that I have done or tested this. My reasoning is that it sounds like the symlink is registered to the component that creates it. The second installation of that component (i.e. component X.2) just skipped it because it already existed. So, uninstalling the first installation, X.1, uninstalls the symlink. Uninstalling X.2 would probably leave this behind. Does that fit with what you are seeing?

You would also need to add removal of the symlink to the preUninstallationActionList if there are no other versions found to ensure that it is removed.


answered 08 May '12, 02:49

DevHopeful_2012's gravatar image

accept rate: 9%

As mentioned by DevHopeful_2012, the link is being automatically registered in the uninstaller. To solve it, you could remove it from the uninstaller after creating it:

`        `<linkname>/usr/local/lib/libmchpusb-1.0.dylib</linkname>
`        `<type>osx</type> 
`  `</rulelist>

answered 08 May '12, 06:27

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 07 May '12, 20:46

Seen: 2,881 times

Last updated: 08 May '12, 06:28