Bug 56430 - ship a readlink outside of tetex
Summary: ship a readlink outside of tetex
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: netscape
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-17 21:43 UTC by Bill Crawford
Modified: 2014-03-17 02:24 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:48:15 UTC
Embargoed:


Attachments (Terms of Use)
Fix to /usr/bin/netscape to not break with updated fileutils (414 bytes, patch)
2001-11-17 21:44 UTC, Bill Crawford
no flags Details | Diff

Description Bill Crawford 2001-11-17 21:43:05 UTC
Description of Problem:
Since "ls" output format has changed recently, the /usr/bin/netscape script
no longer opens a new browser window when given a URL, but always kills the
existing instance.

Version-Release number of selected component (if applicable):
netscape-common-4.78-2

How Reproducible:
Upgrade to fileutils-4.1.1-1, use the /usr/bin/netscape script to try to
open a new browser window

Steps to Reproduce:
1. Upgrade to fileutils-4.1.1-1
2. Click on the "netscape" icon on a GNOME panel (if you still have
netscape on it :o)
3. Existing netscape window disappears

Actual Results:
Existing netscape window disappears

Expected Results:
New browser window should appear

Additional Information:
This is due to a change in format of the "ls -l" output (I'm using en_GB
locale, didn't try others) and the line in /usr/bin/netscape which attempts
to read the ~/.netscape/lock link fails because the number of fileds in the
output has changed.

A fix will be attached in a moment, which uses "$NF" instead of "$11" to
make awk print the last field on the line; "readlink" would be more
appropriate but that's part of the tetex package.

Comment 1 Bill Crawford 2001-11-17 21:44:14 UTC
Created attachment 37842 [details]
Fix to /usr/bin/netscape to not break with updated fileutils

Comment 2 Bill Nottingham 2001-11-28 06:02:16 UTC
FWIW, the ls behavior has been reverted in a later build.

Comment 3 Bill Crawford 2001-11-28 19:05:52 UTC
Glad to hear it :o)

It broke the Unreal Tournament launcher as well.


Comment 4 Bill Crawford 2001-12-18 21:23:21 UTC
Actually the real solution to stuff like this is for those handly little shell
scripts to be rewritten in perl, or for something like the "readlink" from tetex
to be imported into sh-utils or fileutils.

Either way you can close this one now :o)


Comment 5 Bill Crawford 2002-01-25 06:37:31 UTC
Could the "readlink" utility be pulled out of tetex?  Or this little "C" version
be added to fileutils or sh-utils?

#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <stdio.h>
#include <errno.h>

int
main (int ac, char **av)
{
	char *buffer;
	long pathLength;

	if (ac != 2) {
		(void) fprintf (stderr, "usage: readlink path\n");
		return EXIT_FAILURE;
	}

	pathLength = pathconf (av[1], _PC_PATH_MAX);
	if (pathLength < 0) {
		perror ("pathconf");
		return EXIT_FAILURE;
	}
	if (!pathLength)
		pathLength = _POSIX_PATH_MAX;
	if (!(buffer = malloc (pathLength + 1))) {
		perror ("malloc");
		return EXIT_FAILURE;
	}
	if (0 > (pathLength = readlink (av[1], buffer, pathLength + 1))) {
		perror ("readlink");
		return EXIT_FAILURE;
	}
	if (EOF == puts (buffer)) {
		perror ("fputs");
		return EXIT_FAILURE;
	}
	return EXIT_SUCCESS;
}


Comment 6 Bill Nottingham 2002-01-28 06:22:43 UTC
The netscape shellcode will be changed in 4.79-1 anyway, FWIW.
Changing subject accordingly.

Comment 7 Bill Nottingham 2002-06-12 06:34:29 UTC
netscape will not be in future Red Hat Linux products; hence, these issues will
most likely not be fixed.

Comment 8 Red Hat Bugzilla 2006-02-21 18:48:15 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Comment 9 Vivek Shah 2010-09-02 08:30:45 UTC
*** Bug 599835 has been marked as a duplicate of this bug. ***

Comment 10 Vivek Shah 2010-09-02 08:33:43 UTC
Please ignore the previous comment as during the duplicate resolution I messed up the bug number


Note You need to log in before you can comment on or make changes to this bug.