pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
6+ messages / 3 participants
[nested] [flat]

* BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-01-22 17:13  georgi-georgiev-pgsql@japannext.co.jp
  0 siblings, 1 reply; 6+ messages in thread

From: georgi-georgiev-pgsql@japannext.co.jp @ 2013-01-22 17:13 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7823
Logged by:          Georgi Georgiev
Email address:      georgi-georgiev-pgsql@japannext.co.jp
PostgreSQL version: 9.2.2
Operating system:   CentOS 6.3
Description:        

Updating pgadmin3_92 removes the /usr/bin/pgadmin3 symlink. There is also a
harmless warning from the post-install scriptlet when it tries to create
that symlink and it is already there (happens on an update).

....
Running Transaction
  Updating   : pgadmin3_92-1.16.1-1.rhel6.x86_64                            
                        1/2 
Non-fatal POSTIN scriptlet failure in rpm package
pgadmin3_92-1.16.1-1.rhel6.x86_64
ln: creating symbolic link `/usr/bin/pgadmin3': File exists
warning: %post(pgadmin3_92-1.16.1-1.rhel6.x86_64) scriptlet failed, exit
status 1
  Cleanup    : pgadmin3_92-1.16.0-1.rhel6.x86_64                            
                        2/2 

....

And after this /usr/bin/pgadmin3 is gone.



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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-01-23 19:11  Devrim GÜNDÜZ <devrim@gunduz.org>
  parent: georgi-georgiev-pgsql@japannext.co.jp
  0 siblings, 1 reply; 6+ messages in thread

From: Devrim GÜNDÜZ @ 2013-01-23 19:11 UTC (permalink / raw)
  To: georgi-georgiev-pgsql@japannext.co.jp; +Cc: pgsql-bugs


Hi,

On Tue, 2013-01-22 at 17:13 +0000, georgi-georgiev-pgsql@japannext.co.jp
wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      7823
> Logged by:          Georgi Georgiev
> Email address:      georgi-georgiev-pgsql@japannext.co.jp
> PostgreSQL version: 9.2.2
> Operating system:   CentOS 6.3
> Description:        
> 
> Updating pgadmin3_92 removes the /usr/bin/pgadmin3 symlink. There is also a
> harmless warning from the post-install scriptlet when it tries to create
> that symlink and it is already there (happens on an update).

Should be fixed with 1.16.1-2. Please check.

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachments:

  signature.asc (application/pgp-signature, 197B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-01-24 03:55  Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  parent: Devrim GÜNDÜZ <devrim@gunduz.org>
  0 siblings, 1 reply; 6+ messages in thread

From: Georgi Georgiev @ 2013-01-24 03:55 UTC (permalink / raw)
  To: Devrim GÜNDÜZ <devrim@gunduz.org>; +Cc: pgsql-bugs

Quoting Devrim GÜNDÜZ at 23/01/2013-21:11:09(+0200):
> 
> Hi,
> 
> On Tue, 2013-01-22 at 17:13 +0000, georgi-georgiev-pgsql@japannext.co.jp
> wrote:
> > The following bug has been logged on the website:
> > 
> > Bug reference:      7823
> > Logged by:          Georgi Georgiev
> > Email address:      georgi-georgiev-pgsql@japannext.co.jp
> > PostgreSQL version: 9.2.2
> > Operating system:   CentOS 6.3
> > Description:        
> > 
> > Updating pgadmin3_92 removes the /usr/bin/pgadmin3 symlink. There is also a
> > harmless warning from the post-install scriptlet when it tries to create
> > that symlink and it is already there (happens on an update).
> 
> 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:

$ sudo yum update pgadmin3_92
Running Transaction
  Updating   : pgadmin3_92-1.16.1-2.rhel6.x86_64                            1/2 
Non-fatal POSTIN scriptlet failure in rpm package pgadmin3_92-1.16.1-2.rhel6.x86_64
/var/tmp/rpm-tmp.uHi9h7: line 1: {_sbindir}/update-alternatives: No such file or directory
warning: %post(pgadmin3_92-1.16.1-2.rhel6.x86_64) scriptlet failed, exit status 127
...

$ rpm -q pgadmin3_92 --scripts
postinstall scriptlet (using /bin/sh):
{_sbindir}/update-alternatives --install /usr/bin/pgadmin3 pgadmin3 /usr/pgsql-9.2/bin/pgadmin3 920
preuninstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --remove pgadmin3 /usr/pgsql-9.2/bin/pgadmin3

-- 
 /   Georgi Georgiev    / I go on working for the same reason a hen   /
\     Sysadmin Head    \  goes on laying eggs. -- H.L. Mencken       \
 /   -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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-02-03 04:19  Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  parent: Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  0 siblings, 1 reply; 6+ messages in thread

From: Georgi Georgiev @ 2013-02-03 04:19 UTC (permalink / raw)
  To: Devrim GÜNDÜZ <devrim@gunduz.org>; +Cc: pgsql-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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-02-03 04:36  Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  parent: Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  0 siblings, 1 reply; 6+ messages in thread

From: Georgi Georgiev @ 2013-02-03 04:36 UTC (permalink / raw)
  To: Devrim GÜNDÜZ <devrim@gunduz.org>; +Cc: pgsql-bugs

Quoting Georgi Georgiev at 03/02/2013-13:19:52(+0900):
> 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.

By the way, I see that the postgresql92 packages do the
"update-alternatives" cleanup in "%postun". I am not sure why
pgadmin3_92 does it in "%preun", nor does it seem to make much of a
difference, but it may be a good idea to consistently do it in the same
scriptlet - either %preun or %postun.

-- 
(    Georgi Georgiev   (  Despite all appearances, your boss is a    (
 )    Sysadmin Head     ) thinking, feeling, human being.             )
(    -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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link
@ 2013-03-12 04:43  Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  parent: Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
  0 siblings, 0 replies; 6+ messages in thread

From: Georgi Georgiev @ 2013-03-12 04:43 UTC (permalink / raw)
  To: Devrim GÜNDÜZ <devrim@gunduz.org>; +Cc: pgsql-bugs

Quoting Georgi Georgiev at 03/02/2013-13:36:54(+0900):
...
> 
> By the way, I see that the postgresql92 packages do the
> "update-alternatives" cleanup in "%postun". I am not sure why
> pgadmin3_92 does it in "%preun", nor does it seem to make much of a
> difference, but it may be a good idea to consistently do it in the same
> scriptlet - either %preun or %postun.

Just to follow up that pgadmin3_92-1.16.1-4.rhel6.x86_64 has a new
problem now.

This version creates (and installs) only a pgadmin3 binary. There is no
mention of pgadmin3_92 anymore. However, the ".desktop" file is still
pointing to "/usr/bin/pgadmin3_92" (which is now missing).

-- 
\    Georgi Georgiev   \  If you fail to plan, plan to fail.         \
/     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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2013-03-12 04:43 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 17:13 BUG #7823: PGDG packaged pgadmin3_92 removes its /usr/bin/pgadmin3 link georgi-georgiev-pgsql@japannext.co.jp
2013-01-23 19:11 ` Devrim GÜNDÜZ <devrim@gunduz.org>
2013-01-24 03:55   ` Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
2013-02-03 04:19     ` Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
2013-02-03 04:36       ` Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>
2013-03-12 04:43         ` Georgi Georgiev <georgi-georgiev-pgsql@japannext.co.jp>

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