diff -r 9671e50fd14c debianFiles/debian/postinst
--- a/debianFiles/debian/postinst	Tue Jun 14 06:10:05 2011 +0200
+++ b/debianFiles/debian/postinst	Sun Jun 19 14:47:07 2011 +0200
@@ -27,37 +27,55 @@
     source="/opt/pymp/data/icons/16x16/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
     target="/usr/share/icons/hicolor/26x26/apps/pymp.png"
     source="/opt/pymp/data/icons/26x26/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
     target="/usr/share/icons/hicolor/40x40/apps/pymp.png"
     source="/opt/pymp/data/icons/40x40/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
     target="/usr/share/icons/hicolor/48x48/apps/pymp.png"
     source="/opt/pymp/data/icons/48x48/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
     target="/usr/share/icons/hicolor/64x64/apps/pymp.png"
     source="/opt/pymp/data/icons/64x64/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
     target="/usr/share/icons/hicolor/scalable/apps/pymp.png"
     source="/opt/pymp/data/icons/scalable/pymp.png"
     if [[ ! -f "$target" ]]
     then
-      ln -s $source $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $source $target
+      fi
     fi
   fi
 }
@@ -75,7 +93,10 @@
     target="$sharedir/$shortDirName/apps/$fileName"
     if [[ ! -f "$target" ]]
     then
-      ln -s $i $target
+      if [[ -f "$i" ]]
+      then
+        ln -s $i $target
+      fi
     fi
   done
 }
diff -r 9671e50fd14c debianFiles/debian/postrm
--- a/debianFiles/debian/postrm	Tue Jun 14 06:10:05 2011 +0200
+++ b/debianFiles/debian/postrm	Sun Jun 19 14:47:07 2011 +0200
@@ -21,9 +21,13 @@
 #echo $0 $* > /tmp/`basename $0``date +%s`
 
 case "$1" in
-    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    purge|failed-upgrade|abort-install|abort-upgrade|disappear)
     ;;
-
+    
+    upgrade)
+      rm -rf /opt/pymp/
+    ;;
+    
     remove)
       rm -rf /home/user/.pymp.py
       rm -rf /opt/pymp/
diff -r 9671e50fd14c debianFiles/debian/rules
--- a/debianFiles/debian/rules	Tue Jun 14 06:10:05 2011 +0200
+++ b/debianFiles/debian/rules	Sun Jun 19 14:47:07 2011 +0200
@@ -58,8 +58,11 @@
 
 	# Add here commands to install the package into debian/pymp.
 	#$(MAKE) DESTDIR=$(CURDIR)/debian/pymp install
+	#$(CURDIR) refers to /sandbox/something/
+	#$(CURDIR)/debian/pymp refers to the root directory ('/')
 	mkdir -p $(CURDIR)/debian/pymp
 	cp -r src/* $(CURDIR)/debian/pymp/opt/pymp
+	#now all the stuff should be there - 'real' paths are now possible
 	ln -s /opt/pymp/pymp.py $(CURDIR)/debian/pymp/usr/bin/pymp.py
 
 	#copy the menu file
