Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2QUb-0002Uc-Gq for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Feb 2013 18:10:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2QUa-0004S3-HI for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Feb 2013 18:10:08 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U1r3g-0001Ln-Sw for pgsql-bugs@postgresql.org; Sun, 03 Feb 2013 04:20:01 +0000 Received: from mx02.japannext.co.jp ([61.125.130.80]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U1r3c-0002cy-DF for pgsql-bugs@postgresql.org; Sun, 03 Feb 2013 04:19:58 +0000 Received: from localhost (localhost [127.0.0.1]) by mx02.japannext.co.jp (Postfix) with ESMTP id D5317140483; Sun, 3 Feb 2013 13:19:52 +0900 (JST) Received: from mx02.japannext.co.jp ([127.0.0.1]) by localhost (mmemx02.tk.japannext.co.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OH4ymKA66VmR; Sun, 3 Feb 2013 13:19:52 +0900 (JST) Received: from mmimap01.tk.japannext.co.jp (mmimap01.tk.japannext.co.jp [10.67.16.66]) by mx02.japannext.co.jp (Postfix) with ESMTP; Sun, 3 Feb 2013 13:19:52 +0900 (JST) Received: from jnext-0060.corp.japannext.co.jp (jnext-0060.corp.japannext.co.jp [10.67.17.49]) by mmimap01.tk.japannext.co.jp (Postfix) with ESMTP id 9D6341B6404A; Sun, 3 Feb 2013 13:19:52 +0900 (JST) Date: Sun, 3 Feb 2013 13:19:52 +0900 From: Georgi Georgiev To: Devrim =?iso-8859-1?B?R9xORNxa?= Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link Message-ID: <20130203041952.GD14929@jnext-0060.corp.japannext.co.jp> References: <1358968269.19842.4.camel@lenovo01-laptop03.gunduz.org> <20130124035531.GA18407@jnext-0060.corp.japannext.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130124035531.GA18407@jnext-0060.corp.japannext.co.jp> User-Agent: Mutt/1.5.20 (2009-12-10) Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Quoting Georgi Georgiev at 24/01/2013-12:55:31(+0900): > Quoting Devrim G=DCND=DCZ at 23/01/2013-21:11:09(+0200): ... > >=20 > > Should be fixed with 1.16.1-2. Please check. >=20 > Thanks for the quick turnaround. But there seems to be a typo now, so > the %post is not working: .... 1.16.1-3 does not throw errors, but it still reliably wipes out the symlink on an upgrade. A fresh install or a reinstall would create the symlink, but that is only because the %preun does not run in that case (there is no old version to "uninstall" in this case). This can be fixed with a 'if [ "$1" =3D 0 ]; then' in the %preun. To test all these cases, I used rpmrebuild to create different releases of = this package. I made a "-2.5" which is identical to -3. And I made a "-2.8" with the %preun modified like this: $ rpm -q pgadmin3_92-1.16.1-2.8.rhel6.x86_64 --scripts postinstall scriptlet (using /bin/sh): /usr/sbin/update-alternatives --install /usr/bin/pgadmin3 pgadmin3 /usr/pgs= ql-9.2/bin/pgadmin3 920 preuninstall scriptlet (using /bin/sh): if [ "$1" =3D 0 ]; then /usr/sbin/update-alternatives --remove pgadmin3 /usr/pgsql-9.2/bin/pgadmi= n3 fi Test results: - Upgrade from 2.5 - symlink missing (wrong) - Upgrade from 2.8 - symlink present (correct) - Fresh install of any version - symlink present (correct) - Uninstall any version - symlink missing (correct) So, please, if you can fix the %preun as above, that should solve all pendi= ng issues. --=20 () Georgi Georgiev () Writing software is more fun than working. () () Sysadmin Head () () () -SBI Japannext- () () --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs