pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
To: Devrim GÜNDÜZ <devrim@gunduz.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
Date: Sun, 3 Feb 2013 13:19:52 +0900
Message-ID: <20130203041952.GD14929@jnext-0060.corp.japannext.co.jp> (raw)
In-Reply-To: <20130124035531.GA18407@jnext-0060.corp.japannext.co.jp>
References: <E1TxhPs-0000Pl-O5@wrigleys.postgresql.org>
	<1358968269.19842.4.camel@lenovo01-laptop03.gunduz.org>
	<20130124035531.GA18407@jnext-0060.corp.japannext.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Quoting Georgi Georgiev at 24/01/2013-12:55:31(+0900):
> Quoting Devrim GÜNDÜZ at 23/01/2013-21:11:09(+0200):
...
> > 
> > Should be fixed with 1.16.1-2. Please check.
> 
> 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" = 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/pgsql-9.2/bin/pgadmin3 920
preuninstall scriptlet (using /bin/sh):
if [ "$1" = 0 ]; then
  /usr/sbin/update-alternatives --remove pgadmin3 /usr/pgsql-9.2/bin/pgadmin3
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 pending
issues.

-- 
()   Georgi Georgiev   () Writing software is more fun than working. ()
()    Sysadmin Head    ()                                            ()
()   -SBI Japannext-   ()                                            ()


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)  latest in thread

Message-ID: <20130203041952.GD14929@jnext-0060.corp.japannext.co.jp>
Permalink:  ../20130203041952.GD14929@jnext-0060.corp.japannext.co.jp/
Also on:    postgresql.org/message-id/20130203041952.GD14929@jnext-0060.corp.japannext.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: georgi-georgiev-pgsql@japannext.co.jp, devrim@gunduz.org
  Subject: Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
  In-Reply-To: <20130203041952.GD14929@jnext-0060.corp.japannext.co.jp>
  References: <E1TxhPs-0000Pl-O5@wrigleys.postgresql.org> <1358968269.19842.4.camel@lenovo01-laptop03.gunduz.org> <20130124035531.GA18407@jnext-0060.corp.japannext.co.jp> <20130203041952.GD14929@jnext-0060.corp.japannext.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox