public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
@ 2008-04-16 11:55 Angelo Graziosi
  0 siblings, 0 replies; 11+ messages in thread
From: Angelo Graziosi @ 2008-04-16 11:55 UTC (permalink / raw)
  To: cygwin

I want to flag this for the sake of completeness

Dr. Volker Zell wrote:

 > alternatives --display gs
 > path to alternate expected in /var/lib/alternatives/gs

I have tried to reinstall ghostscrip* in a clean way.

Since uninstalling does not remove /etc/postinstall/ghostscript*.done, 
/etc/preremove/ghostscrip*.done and the links that installation creates 
(gs->gs-x11, in my case), I have cleaned all these things.

But reinstalling from scratch did not work until I removed also 
/var/lib/alternatives/gs. Only after this the links were recreated and 
now I have:

$ /usr/sbin/alternatives --display gs
gs - condizione automatica.
  il link attualmente indica a /usr/bin/gs-x11
/usr/bin/gs-native - priorit'a 10
/usr/bin/gs-x11 - priorit'a 20
La migliore versione attuale 'e /usr/bin/gs-x11.


Cheers,
    Angelo.


---
Facesti come quei che va di notte,
che porta il lume dietro e se' non giova,
ma dopo se' fa le persone dotte.
-
                   DANTE, Purgatorio, xxii 67-69

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-16 17:41             ` Charles Wilson
@ 2008-04-18 15:02               ` Dr. Volker Zell
  0 siblings, 0 replies; 11+ messages in thread
From: Dr. Volker Zell @ 2008-04-18 15:02 UTC (permalink / raw)
  To: cygwin

>>>>> Charles Wilson writes:

    > Dr. Volker Zell wrote:
    >> Thanks, will you roll a new version ?
    >> 

    > try test version 1.3.30c-1.

Works fine.

Thanks
 Volker

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-16  8:10           ` Dr. Volker Zell
@ 2008-04-16 17:41             ` Charles Wilson
  2008-04-18 15:02               ` Dr. Volker Zell
  0 siblings, 1 reply; 11+ messages in thread
From: Charles Wilson @ 2008-04-16 17:41 UTC (permalink / raw)
  To: Cygwin Mailing List

Dr. Volker Zell wrote:

> 
> Thanks, will you roll a new version ?
> 

try test version 1.3.30c-1.

--
Chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-15  3:39     ` Charles Wilson
  2008-04-15 19:46       ` Dr. Volker Zell
@ 2008-04-16  9:17       ` Tim
  1 sibling, 0 replies; 11+ messages in thread
From: Tim @ 2008-04-16  9:17 UTC (permalink / raw)
  To: cygwin

Charles Wilson <cygwin <at> cwilson.fastmail.fm> writes:
> > I just tried again:
> > 
> > I deleted /usr/bin/gs symlink, /etc/alternatives/gs symlink and
/var/lib/alternatives/gs.
> >
> > 12:13 AM [506]> update-alternatives --install /usr/bin/gs gs
/usr/bin/gs-native 10
> > 01:20 AM [507]> update-alternatives --install /usr/bin/gs gs
/usr/bin/gs-x11 20
> > path to alternate expected in /var/lib/alternatives/gs
> > 01:20 AM [508]> cat /var/lib/alternatives/gs 
> > auto
> > /usr/bin/gs
> > 
> > /usr/bin/gs-native
> > 10
> 
> Still can't reproduce:
[...]

I've had the same issue.
I solved it by rm /usr/bin/gs.exe which was actually a symlink to /usr/bin/gs
which I created for whatever reason times ago. After this, repeat the foregoing
procedure and everything should work fine.

Tim


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-16  4:49         ` Charles Wilson
@ 2008-04-16  8:10           ` Dr. Volker Zell
  2008-04-16 17:41             ` Charles Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Dr. Volker Zell @ 2008-04-16  8:10 UTC (permalink / raw)
  To: cygwin

>>>>> Charles Wilson writes:

    > Dr. Volker Zell wrote:
    >> This is the relevant code block in alternatives.c where the above
    >> file gets read by the function readConfig (buf should hold the
    >> contents of the above file after the do loop):
    >> curBufSz = READCONFIG_BUF_INITIALSZ;
    >> totalBytesRead = 0;
    >> numBytesRead = 0;
    >> buf = NULL;
    >> do
    >> {
    >> if (curBufSz < READCONFIG_BUF_BEHAVIOR_THRESH)
    >> curBufSz *= 2;
    >> else
    >> curBufSz += READCONFIG_BUF_BEHAVIOR_THRESH;
    >> buf = realloc(buf, curBufSz + 1);
    >> bufp = buf + totalBytesRead;

    > try putting
    > 	*bufp = '\0';
    > right here.

Yup. That's fixes it.

07:51 AM [525]> ./alternatives.exe --display gs
gs - status is auto.
 link currently points to /usr/bin/gs-x11
/usr/bin/gs-x11 - priority 20
Current `best' version is /usr/bin/gs-x11.

07:51 AM [526]> ./alternatives.exe --display unison
unison - status is auto.
 link currently points to /usr/bin/unison-2.27
/usr/bin/unison-2.13 - priority 2013
/usr/bin/unison-2.17 - priority 2017
/usr/bin/unison-2.27 - priority 2027
Current `best' version is /usr/bin/unison-2.27.

Thanks, will you roll a new version ?

  Volker
  

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-15 19:46       ` Dr. Volker Zell
@ 2008-04-16  4:49         ` Charles Wilson
  2008-04-16  8:10           ` Dr. Volker Zell
  0 siblings, 1 reply; 11+ messages in thread
From: Charles Wilson @ 2008-04-16  4:49 UTC (permalink / raw)
  To: cygwin

Dr. Volker Zell wrote:
> This is the relevant code block in alternatives.c where the above file 
> gets read by the function readConfig (buf should hold the contents of the above file 
> after the do loop):
> 
> 
>     curBufSz = READCONFIG_BUF_INITIALSZ;
>     totalBytesRead = 0;
>     numBytesRead = 0;
>     buf = NULL;
>     do
>     {
>        if (curBufSz < READCONFIG_BUF_BEHAVIOR_THRESH)
>           curBufSz *= 2;
>        else
>           curBufSz += READCONFIG_BUF_BEHAVIOR_THRESH;
> 
>        buf = realloc(buf, curBufSz + 1);
> 
>        bufp = buf + totalBytesRead;

try putting
	*bufp = '\0';
right here.

>        numBytesRead = read(fd, bufp, curBufSz - totalBytesRead);
> 
>        /* don't add '-1' ! */
>        if (numBytesRead > 0)
>            totalBytesRead += numBytesRead;
>     }
>     while (numBytesRead > 0);



> 
> (gdb) p bufp
> $38 = 0x664a08 "1\n20\nµ"

Whoa. That is odd. I wonder if it's an uninitialized memory thing -- 
realloc does not zero out the "new" storage; it only copies over the old 
storage up to the old storage's length.

> (gdb) p buf
> $39 = 0x6649e8 "auto\n/usr/bin/gs\n\n/usr/bin/gs-x11\n20\nµ"
> 
> and then later on in parseLine after a while:
> 
> bufp=µ
> 
> and boom...

Yep, that would do it.

> It looks like something went wrong in line 219
> 
> numBytesRead = read(fd, bufp, curBufSz - totalBytesRead);
> 
> Also numBytesRead=5, bufp="1\n20\nµ" instead of "1\n20\n"
> 
> 
> I have no idea where the µ comes from.
> 
> Running alternative on one of your packages is fine:

Memory issues are always tricky. If the fix above corrects the error, 
I've got to wonder how we've been so lucky on all the other packages 
that use the alternatives system...

--
Chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-15  3:39     ` Charles Wilson
@ 2008-04-15 19:46       ` Dr. Volker Zell
  2008-04-16  4:49         ` Charles Wilson
  2008-04-16  9:17       ` Tim
  1 sibling, 1 reply; 11+ messages in thread
From: Dr. Volker Zell @ 2008-04-15 19:46 UTC (permalink / raw)
  To: cygwin

>>>>> Charles Wilson writes:

    > I don't know what else to do here. Unless I can reproduce it, I can't
    > debug it. The only possibility I can think of is this: are you
    > actually using alternatives-1.3.29a-1, or some older version?  The
    > previous version had a serious bug in a routine called by --display...

Yes I'm using the latest.

I tried to debug this myself with the following file :
/var/lib/alternatives/gs

-------------------- snip -------------------
auto
/usr/bin/gs

/usr/bin/gs-x11
20
-------------------- snip -------------------

This is the relevant code block in alternatives.c where the above file 
gets read by the function readConfig (buf should hold the contents of the above file 
after the do loop):


    curBufSz = READCONFIG_BUF_INITIALSZ;
    totalBytesRead = 0;
    numBytesRead = 0;
    buf = NULL;
    do
    {
       if (curBufSz < READCONFIG_BUF_BEHAVIOR_THRESH)
          curBufSz *= 2;
       else
          curBufSz += READCONFIG_BUF_BEHAVIOR_THRESH;

       buf = realloc(buf, curBufSz + 1);

       bufp = buf + totalBytesRead;
       numBytesRead = read(fd, bufp, curBufSz - totalBytesRead);

       /* don't add '-1' ! */
       if (numBytesRead > 0)
           totalBytesRead += numBytesRead;
    }
    while (numBytesRead > 0);



insight --args /misc/src/alternatives-1.3.29a-1/build/alternatives.exe --display gs

(gdb) p numBytesRead 
$28 = 32

(gdb) p totalBytesRead 
$29 = 0

(gdb) p curBufSz 
$30 = 32

(gdb) p bufp
$31 = 0x6649e8 "auto\n/usr/bin/gs\n\n/usr/bin/gs-x1"

(gdb) p buf
$32 = 0x6649e8 "auto\n/usr/bin/gs\n\n/usr/bin/gs-x1"

(gdb) p totalBytesRead 
$33 = 32

(gdb) p numBytesRead 
$34 = 32

(gdb) p curBufSz
$35 = 32

(gdb) p curBufSz
$36 = 64

(gdb) p numBytesRead
$37 = 5

(gdb) p bufp
$38 = 0x664a08 "1\n20\nµ"

(gdb) p buf
$39 = 0x6649e8 "auto\n/usr/bin/gs\n\n/usr/bin/gs-x11\n20\nµ"

and then later on in parseLine after a while:

bufp=µ

and boom...



It looks like something went wrong in line 219

numBytesRead = read(fd, bufp, curBufSz - totalBytesRead);

Also numBytesRead=5, bufp="1\n20\nµ" instead of "1\n20\n"


I have no idea where the µ comes from.

Running alternative on one of your packages is fine:

03:32 PM [519]> alternatives.exe --display urxvt
urxvt - status is auto.
 link currently points to /usr/bin/urxvt-X
/usr/bin/urxvt-X - priority 30
 slave urxvtc: /usr/bin/urxvtc-X
 slave urxvtd: /usr/bin/urxvtd-X
Current `best' version is /usr/bin/urxvt-X.

whereas 

04:18 PM [520]> alternatives.exe --display unison
path to alternate expected in /var/lib/alternatives/unison

also fails for me. My Berkeley db packages are also fine.


The strange thing is it worked at one point, when I FIRST installed 
ghostscript-8.62-1 and alternatives was setup via postinstall scripts.

After the upgrade to ghostscript-8.62-2, no chance....

Ciao
  Volker

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-15  2:40   ` Dr. Volker Zell
@ 2008-04-15  3:39     ` Charles Wilson
  2008-04-15 19:46       ` Dr. Volker Zell
  2008-04-16  9:17       ` Tim
  0 siblings, 2 replies; 11+ messages in thread
From: Charles Wilson @ 2008-04-15  3:39 UTC (permalink / raw)
  To: cygwin

Dr. Volker Zell wrote:

> I just tried again:
> 
> I deleted /usr/bin/gs symlink, /etc/alternatives/gs symlink and /var/lib/alternatives/gs.
>
> 12:13 AM [506]> update-alternatives --install /usr/bin/gs gs /usr/bin/gs-native 10
> 01:20 AM [507]> update-alternatives --install /usr/bin/gs gs /usr/bin/gs-x11 20
> path to alternate expected in /var/lib/alternatives/gs
> 01:20 AM [508]> cat /var/lib/alternatives/gs 
> auto
> /usr/bin/gs
> 
> /usr/bin/gs-native
> 10

Still can't reproduce:

$ rm /usr/bin/gs
$ rm /etc/alternatives/gs
$ rm /var/lib/alternatives/gs
$ /usr/sbin/update-alternatives --install /usr/bin/gs gs 
/usr/bin/gs-native 10
$ /usr/sbin/update-alternatives --install /usr/bin/gs gs /usr/bin/gs-x11 20
$ cat /var/lib/alternatives/gs
auto
/usr/bin/gs

/usr/bin/gs-native
10
/usr/bin/gs-x11
20

As it happens, my XP machine was still using ghostscript-8.50, so I ran 
setup on it, and upgraded to gs-8.51-2 (using setup-2.573.2.2). Here's 
the last bit of that /var/log/setup.log.full:

...
2008/04/14 21:09:20 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/update-info-dir.sh
2008/04/14 21:09:33 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/fftw3.sh
2008/04/14 21:09:33 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/ghostscript.sh
2008/04/14 21:09:34 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/ghostscript-x11.sh
2008/04/14 21:09:34 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/git.sh
2008/04/14 21:09:34 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/gnupg.sh
install-info: menu item `gpg' already exists, for file `gpg'
2008/04/14 21:09:34 abnormal exit: exit code=1
2008/04/14 21:09:34 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/gv.sh
2008/04/14 21:09:35 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/libXft.sh
 >>> Processing directory /usr/lib
 >>> Processing directory /usr/X11R6/lib
2008/04/14 21:13:28 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/libtool.sh
2008/04/14 21:13:28 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/t1lib.sh
2008/04/14 21:13:28 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/xfig.sh
2008/04/14 21:13:29 running: C:\cygwin\bin\bash.exe -c 
/etc/postinstall/xpdf.sh
2008/04/14 21:17:44 note: Installation Complete
2008/04/14 21:17:44 Ending cygwin install


I don't know what else to do here. Unless I can reproduce it, I can't 
debug it. The only possibility I can think of is this: are you actually 
using alternatives-1.3.29a-1, or some older version?  The previous 
version had a serious bug in a routine called by --display...

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-14 23:26 ` Charles Wilson
@ 2008-04-15  2:40   ` Dr. Volker Zell
  2008-04-15  3:39     ` Charles Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Dr. Volker Zell @ 2008-04-15  2:40 UTC (permalink / raw)
  To: cygwin

>>>>> Charles Wilson writes:

    > Dr. Volker Zell wrote:
    >> What does this
    >> path to alternate expected in /var/lib/alternatives/gs
    >> mean ?

    > Some sort of parsing error. At that line in the code, the program
    > expects that the line contains exactly an absolute path to the target
    > program.

    > e.g.
    >   line = parseLine(&bufp);
    >   while (line && *line) {
    set-> alts = realloc(set->alts, (set->numAlts + 1) *
    > sizeof(*set->alts));

    >     if (*line != '/') {
    >       PARANOID_FREE(buf);
    >       fprintf(stderr, _("path to alternate expected in %s\n"), path);
    >       return 1;\
    >     }
    >     ...

    > So, line does not start with '/'. So, it's either somehow in the wrong
    > state when parsing that particular line, or the line has a relative
    > path or something.  What you did not post, was your actual,
    > problematic /var/lib/alternatives/gs file...


I still have a backup from after the setup run upgrading from
ghostscript-8.62-1 to -2.

------- snip -----
auto
/usr/bin/gs

/usr/bin/gs-x11
20
------- snip -----

This matches my expectation from what I see in the setup.log.

    > FWIW, I can't reproduce this. I even tried mounting
    > /var/lib/alternatives in text mode to see if that was the problem. It
    > wasn't.

    > Here is what gs SHOULD look like, if you have both ghostscript and
    > ghostscript-x11 installed:

    > ------ snip -------
    > auto
    > /usr/bin/gs

    > /usr/bin/gs-native
    > 10
    > /usr/bin/gs-x11
    > 20
    > ------ snip ------

This was exactly the content after installation of ghostscript-8.62-1. I
also remember that for example

update-alternatives --display|--config gs

worked.

I just tried again:

I deleted /usr/bin/gs symlink, /etc/alternatives/gs symlink and /var/lib/alternatives/gs.


12:13 AM [506]> update-alternatives --install /usr/bin/gs gs /usr/bin/gs-native 10
01:20 AM [507]> update-alternatives --install /usr/bin/gs gs /usr/bin/gs-x11 20
path to alternate expected in /var/lib/alternatives/gs
01:20 AM [508]> cat /var/lib/alternatives/gs 
auto
/usr/bin/gs

/usr/bin/gs-native
10


    > Chuck

Ciao
  Volker


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
  2008-04-14 23:07 Dr. Volker Zell
@ 2008-04-14 23:26 ` Charles Wilson
  2008-04-15  2:40   ` Dr. Volker Zell
  0 siblings, 1 reply; 11+ messages in thread
From: Charles Wilson @ 2008-04-14 23:26 UTC (permalink / raw)
  To: cygwin

Dr. Volker Zell wrote:

> What does this
> 
>  path to alternate expected in /var/lib/alternatives/gs
> 
> mean ?

Some sort of parsing error. At that line in the code, the program 
expects that the line contains exactly an absolute path to the target 
program.

e.g.
   line = parseLine(&bufp);
   while (line && *line) {
     set->alts = realloc(set->alts, (set->numAlts + 1) * 
sizeof(*set->alts));

     if (*line != '/') {
       PARANOID_FREE(buf);
       fprintf(stderr, _("path to alternate expected in %s\n"), path);
       return 1;\
     }
     ...

So, line does not start with '/'. So, it's either somehow in the wrong 
state when parsing that particular line, or the line has a relative path 
or something.  What you did not post, was your actual, problematic 
/var/lib/alternatives/gs file...

FWIW, I can't reproduce this. I even tried mounting 
/var/lib/alternatives in text mode to see if that was the problem. It 
wasn't.

Here is what gs SHOULD look like, if you have both ghostscript and 
ghostscript-x11 installed:

------ snip -------
auto
/usr/bin/gs

/usr/bin/gs-native
10
/usr/bin/gs-x11
20
------ snip ------

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* [Attn: alternatives maintainer] - ghostscript preremove breakage
@ 2008-04-14 23:07 Dr. Volker Zell
  2008-04-14 23:26 ` Charles Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Dr. Volker Zell @ 2008-04-14 23:07 UTC (permalink / raw)
  To: Cygwin List

Hi

This is from the setup run after updating to the latest ghostscript
package:

2008/04/13 22:27:51 Running preremove script for  ghostscript
2008/04/13 22:27:51 running: D:\\bin\bash.exe -c /etc/preremove/ghostscript.sh
2008/04/13 22:27:51 Running preremove script for  ghostscript-base
2008/04/13 22:27:51 Running preremove script for  ghostscript-x11
2008/04/13 22:27:51 running: D:\\bin\bash.exe -c /etc/preremove/ghostscript-x11.sh
path to alternate expected in /var/lib/alternatives/gs
2008/04/13 22:27:51 abnormal exit: exit code=2
2008/04/13 22:27:51 Running preremove script for  _update-info-dir
2008/04/13 22:27:51 Uninstalling ghostscript
unlink D:\/bin//gs-native.exe
2008/04/13 22:27:51 Uninstalling ghostscript-base
unlink D:\/bin//bdftops
:
:
2008/04/13 22:28:00 zsync
2008/04/13 22:28:00 running: D:\\bin\bash.exe -c /etc/postinstall/update-info-dir.sh
2008/04/13 22:28:14 running: D:\\bin\bash.exe -c /etc/postinstall/ghostscript.sh
path to alternate expected in /var/lib/alternatives/gs
2008/04/13 22:28:14 abnormal exit: exit code=2
2008/04/13 22:28:14 running: D:\\bin\bash.exe -c /etc/postinstall/ghostscript-x11.sh
path to alternate expected in /var/lib/alternatives/gs
2008/04/13 22:28:14 abnormal exit: exit code=2
2008/04/13 22:28:20 note: Installation Complete
2008/04/13 22:28:20 Ending cygwin install


What does this

 path to alternate expected in /var/lib/alternatives/gs

mean ?

I can't even do the following anymore

  > alternatives --display gs
  > path to alternate expected in /var/lib/alternatives/gs

These are the two postinstall sripts for the native and the x11 version of
ghostscript:

------------------------------ ghostscript.sh ---------------------------------
#!/bin/sh
prefix=/usr
bindir=${prefix}/bin
sbindir=${prefix}/sbin

${sbindir}/update-alternatives --install ${bindir}/gs gs ${bindir}/gs-native 10
-------------------------------------------------------------------------------

------------------------------ ghostscript-x11.sh -----------------------------
#!/bin/sh
prefix=/usr
bindir=${prefix}/bin
sbindir=${prefix}/sbin

${sbindir}/update-alternatives --install ${bindir}/gs gs ${bindir}/gs-x11 20
-------------------------------------------------------------------------------

And these are the preremove scripts:

------------------------------ ghostscript.sh ---------------------------------
#!/bin/sh
prefix=/usr
bindir=${prefix}/bin
sbindir=${prefix}/sbin

${sbindir}/update-alternatives --remove gs ${bindir}/gs-native
-------------------------------------------------------------------------------

------------------------------ ghostscript-x11.sh -----------------------------
#!/bin/sh
prefix=/usr
bindir=${prefix}/bin
sbindir=${prefix}/sbin

${sbindir}/update-alternatives --remove gs ${bindir}/gs-x11
-------------------------------------------------------------------------------


When I remove /var/lib/alternatives/gs and start from scratch I get:

12:09 AM [499]> rm /var/lib/alternatives/gs
vzell@vzell-de /tmp
12:09 AM [500]> update-alternatives --install /usr/bin/gs gs /usr/bin/gs-x11 20
vzell@vzell-de /tmp
12:10 AM [501]> update-alternatives --display gs                               
path to alternate expected in /var/lib/alternatives/gs
vzell@vzell-de /tmp
12:10 AM [502]> cat /var/lib/alternatives/gs
auto
/usr/bin/gs

/usr/bin/gs-x11
20
vzell@vzell-de /tmp
12:11 AM [505]> ls -lt /usr/bin/gs /etc/alternatives/gs /usr/bin/gs-x11*
lrwxrwxrwx 1 vzell admin       15 Apr 15 00:10 /etc/alternatives/gs -> /usr/bin/gs-x11*
lrwxrwxrwx 1 vzell admin       20 Apr 14 09:11 /usr/bin/gs -> /etc/alternatives/gs*
-rwxr-xr-x 1 vzell users 11212800 Apr 13 17:29 /usr/bin/gs-x11.exe*
vzell@vzell-de /tmp


I also found the following in the archives:

  o http://www.cygwin.com/ml/cygwin/2007-11/msg00304.html

On my machine I get:

alternatives --display unison
path to alternate expected in /var/lib/alternatives/unison

Hmmmmmmmm...

Ciao
  Volker

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2008-04-18 14:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 11:55 [Attn: alternatives maintainer] - ghostscript preremove breakage Angelo Graziosi
  -- strict thread matches above, loose matches on Subject: below --
2008-04-14 23:07 Dr. Volker Zell
2008-04-14 23:26 ` Charles Wilson
2008-04-15  2:40   ` Dr. Volker Zell
2008-04-15  3:39     ` Charles Wilson
2008-04-15 19:46       ` Dr. Volker Zell
2008-04-16  4:49         ` Charles Wilson
2008-04-16  8:10           ` Dr. Volker Zell
2008-04-16 17:41             ` Charles Wilson
2008-04-18 15:02               ` Dr. Volker Zell
2008-04-16  9:17       ` Tim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).