Преглед изворни кода

patch from Josip Rodin to improve the move from /usr/info to /usr/share/info

Wichert Akkerman пре 24 година
родитељ
комит
024777f22c
3 измењених фајлова са 20 додато и 4 уклоњено
  1. 5 0
      ChangeLog
  2. 2 1
      debian/changelog
  3. 13 3
      debian/dpkg.postinst

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Fri Jun 21 21:53:24 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
+
+  * debian/dpkg.postinst: Merge patch from Josip Rodin to improve
+    the move from /usr/info to /usr/share/info
+
 Fri Jun 21 21:11:02 CEST 2002 Wichert Akkerman <wichert@deephackmode.org>
 
   * po/ca.po: Updated

+ 2 - 1
debian/changelog

@@ -120,8 +120,9 @@ dpkg (1.10) unstable; urgency=low
     Bug#117968.
   * Fix typo in dpkg-source(1), s/-su/-sU/.  Closes: Bug#126340.
   * Add dpkg-scansources to dpkg-scanpackages(8).  Closes: Bug#147924.
+  * Change /usr/info into a symlink to /usr/share/info if possible
 
- -- Wichert Akkerman <wakkerma@debian.org>  Fri, 21 Jun 2002 21:13:10 +0200
+ -- Wichert Akkerman <wakkerma@debian.org>  Fri, 21 Jun 2002 21:53:15 +0200
 
 dpkg (1.9.21) unstable; urgency=low
 

+ 13 - 3
debian/dpkg.postinst

@@ -123,10 +123,20 @@ if [ -d /usr/doc -a ! -e /usr/doc/dpkg -a -d /usr/share/doc/dpkg ] ; then
 fi
 
 
-if [ ! -L /usr/info/dir ]; then
-	echo "Moving /usr/info/dir to /usr/share/info/dir, and creating /usr/info/dir symlink."
+if [ -d /usr/info -a ! -L /usr/info -a ! -L /usr/info/dir ]; then              
+	echo Moving /usr/info/dir to /usr/share/info/dir.
 	mv /usr/info/dir /usr/share/info/dir
-	ln -sf ../share/info/dir /usr/info/dir
+	if [ -f /usr/info/dir.old ]; then
+		mv /usr/info/dir.old /usr/share/info/dir.old
+	fi
+	if [ "`find /usr/info -empty`" = "/usr/info" ]; then
+		echo Making /usr/info a symlink to /usr/share/info.
+		rmdir /usr/info
+		ln -s share/info /usr/info
+	else
+		echo Making /usr/info/dir a symlink to /usr/share/info/dir.
+		ln -sf ../share/info/dir /usr/info/dir
+	fi
 fi