mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix problems with packp3d -r
This commit is contained in:
parent
6286526551
commit
ea40f600bb
@ -327,7 +327,7 @@ class AppRunner(DirectObject):
|
|||||||
mapped host, which is the one we should actually download
|
mapped host, which is the one we should actually download
|
||||||
from, see getHostWithAlt(). """
|
from, see getHostWithAlt(). """
|
||||||
|
|
||||||
if hostUrl is None:
|
if not hostUrl:
|
||||||
hostUrl = PandaSystem.getPackageHostUrl()
|
hostUrl = PandaSystem.getPackageHostUrl()
|
||||||
|
|
||||||
host = self.hosts.get(hostUrl, None)
|
host = self.hosts.get(hostUrl, None)
|
||||||
|
@ -2150,19 +2150,16 @@ class Packager:
|
|||||||
Returns the Package object, or None if the package cannot be
|
Returns the Package object, or None if the package cannot be
|
||||||
located. """
|
located. """
|
||||||
|
|
||||||
if not platform:
|
|
||||||
platform = self.platform
|
|
||||||
|
|
||||||
# Is it a package we already have resident?
|
# Is it a package we already have resident?
|
||||||
package = self.packages.get((packageName, platform, version, host), None)
|
package = self.packages.get((packageName, platform or self.platform, version, host), None)
|
||||||
if package:
|
if package:
|
||||||
return package
|
return package
|
||||||
|
|
||||||
# Look on the searchlist.
|
# Look on the searchlist.
|
||||||
for dirname in self.installSearch.getDirectories():
|
for dirname in self.installSearch.getDirectories():
|
||||||
package = self.__scanPackageDir(dirname, packageName, platform, version, host, requires = requires)
|
package = self.__scanPackageDir(dirname, packageName, platform or self.platform, version, host, requires = requires)
|
||||||
if not package:
|
if not package:
|
||||||
package = self.__scanPackageDir(dirname, packageName, None, version, host, requires = requires)
|
package = self.__scanPackageDir(dirname, packageName, platform, version, host, requires = requires)
|
||||||
|
|
||||||
if package:
|
if package:
|
||||||
break
|
break
|
||||||
@ -2173,7 +2170,7 @@ class Packager:
|
|||||||
|
|
||||||
if package:
|
if package:
|
||||||
package = self.packages.setdefault((package.packageName, package.platform, package.version, package.host), package)
|
package = self.packages.setdefault((package.packageName, package.platform, package.version, package.host), package)
|
||||||
self.packages[(packageName, platform, version, host)] = package
|
self.packages[(packageName, platform or self.platform, version, host)] = package
|
||||||
return package
|
return package
|
||||||
|
|
||||||
return None
|
return None
|
||||||
@ -2246,6 +2243,10 @@ class Packager:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
host = appRunner.getHost(hostUrl)
|
host = appRunner.getHost(hostUrl)
|
||||||
|
if not host.readContentsFile():
|
||||||
|
if not host.downloadContentsFile(appRunner.http):
|
||||||
|
return None
|
||||||
|
|
||||||
package = host.getPackage(packageName, version, platform = platform)
|
package = host.getPackage(packageName, version, platform = platform)
|
||||||
if not package and version is None:
|
if not package and version is None:
|
||||||
# With no version specified, find the best matching version.
|
# With no version specified, find the best matching version.
|
||||||
@ -2403,14 +2404,14 @@ class Packager:
|
|||||||
|
|
||||||
for packageName in names:
|
for packageName in names:
|
||||||
# A special case when requiring the "panda3d" package. We
|
# A special case when requiring the "panda3d" package. We
|
||||||
# supply the version number what we've been compiled with as a
|
# supply the version number which we've been compiled with
|
||||||
# default.
|
# as a default.
|
||||||
pversion = version
|
pversion = version
|
||||||
phost = host
|
phost = host
|
||||||
if packageName == 'panda3d':
|
if packageName == 'panda3d':
|
||||||
if pversion is None:
|
if not pversion:
|
||||||
pversion = PandaSystem.getPackageVersionString()
|
pversion = PandaSystem.getPackageVersionString()
|
||||||
if phost is None:
|
if not phost:
|
||||||
phost = PandaSystem.getPackageHostUrl()
|
phost = PandaSystem.getPackageHostUrl()
|
||||||
|
|
||||||
package = self.findPackage(packageName, version = pversion, host = phost,
|
package = self.findPackage(packageName, version = pversion, host = phost,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user