Bug 56430 - ship a readlink outside of tetex
ship a readlink outside of tetex
Status: CLOSED WONTFIX
Product: Red Hat Raw Hide
Classification: Retired
Component: netscape (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-17 16:43 EST by Bill Crawford
Modified: 2014-03-16 22:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:48:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Bill Crawford 2001-11-17 16:43:05 EST
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 16:44:14 EST
Created attachment 37842 [details]
Fix to /usr/bin/netscape to not break with updated fileutils
Comment 2 Bill Nottingham 2001-11-28 01:02:16 EST
FWIW, the ls behavior has been reverted in a later build.
Comment 3 Bill Crawford 2001-11-28 14:05:52 EST
Glad to hear it :o)

It broke the Unreal Tournament launcher as well.
Comment 4 Bill Crawford 2001-12-18 16:23:21 EST
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 01:37:31 EST
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 01:22:43 EST
The netscape shellcode will be changed in 4.79-1 anyway, FWIW.
Changing subject accordingly.
Comment 7 Bill Nottingham 2002-06-12 02:34:29 EDT
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 13:48:15 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.
Comment 9 Vivek Shah 2010-09-02 04:30:45 EDT
*** Bug 599835 has been marked as a duplicate of this bug. ***
Comment 10 Vivek Shah 2010-09-02 04:33:43 EDT
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.