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 110273

Summary: AU should check Dependency.TYPE_NEEDS, Dependency.TYPE_RECOMMENDS and Dependency.Dependency.TYPE_JAVA
Product: platform Reporter: Jiri Rechtacek <jrechtacek>
Component: AutoupdateAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker CC: jglick
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Attachments: work copy

Description Jiri Rechtacek 2007-07-19 12:14:56 UTC
NB5.x Autoupdate checks these types of o.n.m.Dependency: TYPE_MODULE, TYPE_IDE, TYPE_REQUIRES. But should also check
TYPE_NEEDS and TYPE_RECOMMENDS.
Comment 1 Jesse Glick 2007-07-19 16:47:51 UTC
BTW, TYPE_IDE is obsolete and has not been used for years. (Attempted usages in the module system yield deprecation
warnings and translation to plain module dependencies, which in the current builds are very likely unsatisfiable
anyway.) I think you can delete any code mentioning it.

There is also TYPE_JAVA, for what it's worth. And don't forget special dependency tokens such as
org.openide.modules.os.Linux and so on.
Comment 2 Jiri Rechtacek 2007-07-19 17:29:20 UTC
> BTW, TYPE_IDE is obsolete and has not been used for years. (Attempted usages in the module system yield deprecation
> warnings and translation to plain module dependencies, which in the current builds are very likely unsatisfiable
> anyway.) I think you can delete any code mentioning it.
Ok, I'm going to delete this check.

> There is also TYPE_JAVA, for what it's worth.
I know about it. AU now logs only usage this dependency w/o any real check. I'll extend scope this issue with it.

> And don't forget special dependency tokens such as
> org.openide.modules.os.Linux and so on.
AU already reads these tokens and filters modules by that.
Comment 3 Jiri Rechtacek 2007-08-30 16:12:42 UTC
Created attachment 47824 [details]
work copy
Comment 4 Jiri Rechtacek 2007-08-30 16:12:58 UTC
I attached a work copy, some tests are needed.
Comment 5 Jiri Rechtacek 2007-09-03 10:55:08 UTC
Fixed: AU should check Dependency.TYPE_NEEDS and Dependency.TYPE_RECOMMENDS. Still open for Dependency.TYPE_JAVA.

RCS file:
/shared/data/ccvs/repository/autoupdate/services/test/unit/src/org/netbeans/modules/autoupdate/services/RequiresDependencyTest.java,v
done
Checking in test/unit/src/org/netbeans/modules/autoupdate/services/RequiresDependencyTest.java;
/shared/data/ccvs/repository/autoupdate/services/test/unit/src/org/netbeans/modules/autoupdate/services/RequiresDependencyTest.java,v
 <--  RequiresDependencyTest.java
initial revision: 1.1
done
Checking in test/unit/src/org/netbeans/modules/autoupdate/services/UpdateUnitWithOsFactoryTest.java;
/shared/data/ccvs/repository/autoupdate/services/test/unit/src/org/netbeans/modules/autoupdate/services/UpdateUnitWithOsFactoryTest.java,v
 <--  UpdateUnitWithOsFactoryTest.java
new revision: 1.8; previous revision: 1.7
done
Checking in test/unit/src/org/netbeans/modules/autoupdate/services/NbmAdvancedTestCase.java;
/shared/data/ccvs/repository/autoupdate/services/test/unit/src/org/netbeans/modules/autoupdate/services/NbmAdvancedTestCase.java,v
 <--  NbmAdvancedTestCase.java
new revision: 1.5; previous revision: 1.4
done
Checking in test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java;
/shared/data/ccvs/repository/autoupdate/services/test/unit/src/org/netbeans/modules/autoupdate/services/InstallEagerModuleTest.java,v
 <--  InstallEagerModuleTest.java
new revision: 1.7; previous revision: 1.6
done
Checking in src/org/netbeans/modules/autoupdate/services/OperationValidator.java;
/shared/data/ccvs/repository/autoupdate/services/src/org/netbeans/modules/autoupdate/services/OperationValidator.java,v
 <--  OperationValidator.java
new revision: 1.10; previous revision: 1.9
done
Checking in src/org/netbeans/modules/autoupdate/services/InstallManager.java;
/shared/data/ccvs/repository/autoupdate/services/src/org/netbeans/modules/autoupdate/services/InstallManager.java,v  <--
 InstallManager.java
new revision: 1.19; previous revision: 1.18
done
Checking in src/org/netbeans/modules/autoupdate/services/DependencyChecker.java;
/shared/data/ccvs/repository/autoupdate/services/src/org/netbeans/modules/autoupdate/services/DependencyChecker.java,v 
<--  DependencyChecker.java
new revision: 1.6; previous revision: 1.5
done