This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145462 - OpenBSD is not recognized as Unix
Summary: OpenBSD is not recognized as Unix
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Unix
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2008-08-28 16:45 UTC by hegjon
Modified: 2009-11-07 11:43 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Adds OpenBSD to OS_UNIX_MASK (1.52 KB, patch)
2008-08-28 17:07 UTC, hegjon
Details | Diff
API change patch. (3.25 KB, text/plain)
2008-09-09 09:29 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hegjon 2008-08-28 16:45:57 UTC
OpenBSD is not in OS_UNIX_MASK, so Unix-dependent code will not run.
Comment 1 hegjon 2008-08-28 17:07:51 UTC
Created attachment 68556 [details]
Adds OpenBSD to OS_UNIX_MASK
Comment 2 Jiri Skrivanek 2008-09-04 11:37:50 UTC
Is this correct? 

if (osName.equals("OpenBSD")) 

What does System.getProperty("os.name"); returns on OpenBSD?
Comment 3 hegjon 2008-09-04 13:14:17 UTC
On my OpenBSD 4.4-current, all of my jdk's System.getProperty("os.name") returns "OpenBSD".


$ cat avaProperties.java
import java.util.Properties;

public class JavaProperties {
  public static void main(String[] args) {
    Properties properties = System.getProperties();
    properties.list(System.out);
  }
}
$ for jdk in /usr/local/jdk*; do echo $jdk && $jdk/bin/javac JavaProperties.java && $jdk/bin/java JavaProperties | grep
^os.; done 
/usr/local/jdk-1.5.0
os.arch=amd64
os.name=OpenBSD
os.version=4.4
/usr/local/jdk-1.6.0
os.arch=amd64
os.name=OpenBSD
os.version=4.4
/usr/local/jdk-1.7.0
os.arch=amd64
os.name=OpenBSD
os.version=4.4
Comment 4 Jiri Skrivanek 2008-09-05 09:41:59 UTC
OK, thanks. Instead of changing API I added a check that if File.pathSeparatorChar == ':' it is detected as unix.

http://hg.netbeans.org/core-main/rev/eb978ede9fe9
Comment 5 Quality Engineering 2008-09-06 17:35:26 UTC
Integrated into 'main-golden', will be available in build *200809061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/eb978ede9fe9
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #145462 - If File.pathSeparatorChar == ':', detect OS as unix, if not resolved before.
Comment 6 Jiri Skrivanek 2008-09-09 09:22:33 UTC
This needs better fix with API review.
Comment 7 Jiri Skrivanek 2008-09-09 09:28:48 UTC
As jglick stated the previous change means that module code compiled against an older version of
org-openide-utilities.jar will not consider OpenBSD to be Unix if it uses OS_UNIX_MASK directly.
Please, review a new patch. It adds new public fields OS_OPENBSD and OS_UNIX_OTHER. It also deprecates OS_WINDOWS_MASK
and OS_UNIX_MASK fields and suggests to use isWindows() or isUnix() instead.
Comment 8 Jiri Skrivanek 2008-09-09 09:29:57 UTC
Created attachment 69384 [details]
API change patch.
Comment 9 Jesse Glick 2008-09-10 05:30:13 UTC
Looks OK I think.
Comment 10 Jiri Skrivanek 2008-09-15 08:44:25 UTC
Will be implemented.
Comment 11 Jiri Skrivanek 2008-09-16 08:53:00 UTC
Fixed.
Comment 12 Quality Engineering 2008-09-17 05:46:59 UTC
Integrated into 'main-golden', will be available in build *200809170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f68864248915
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #145462 - Added a new Utilities.OS_OPENBSD and OS_UNIX_OTHER fields. Deprecated OS_WINDOWS_MASK and OS_UNIX_MASK.