Index: generic/tclPkg.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclPkg.c,v
retrieving revision 1.6
diff -u -r1.6 tclPkg.c
--- generic/tclPkg.c	2001/04/04 16:07:21	1.6
+++ generic/tclPkg.c	2001/08/06 18:47:15
@@ -505,7 +505,7 @@
 		keyString = Tcl_GetString(objv[i]);
 		hPtr = Tcl_FindHashEntry(&iPtr->packageTable, keyString);
 		if (hPtr == NULL) {
-		    return TCL_OK;
+		    continue;	
 		}
 		pkgPtr = (Package *) Tcl_GetHashValue(hPtr);
 		Tcl_DeleteHashEntry(hPtr);
Index: tests/pkg.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/pkg.test,v
retrieving revision 1.8
diff -u -r1.8 pkg.test
--- tests/pkg.test	2000/04/10 17:19:03	1.8
+++ tests/pkg.test	2001/08/06 18:47:16
@@ -301,6 +301,14 @@
     package forget a c
     lappend result [lsort [package names]]
 } {{a b c} b}
+test pkg-3.5.1 {Tcl_PackageCmd procedure, "forget" option} {
+    # Test for Bug 415273
+    package ifneeded a 1 "I should have been forgotten"
+    package forget no-such-package a
+    set x [package ifneeded a 1]
+    package forget a
+    set x
+} {}
 test pkg-3.6 {Tcl_PackageCmd procedure, "ifneeded" option} {
     list [catch {package ifneeded a} msg] $msg
 } {1 {wrong # args: should be "package ifneeded package version ?script?"}}
