[Issue#] N/A
[Problem] directory installation failed using pkgcmd command
[Cause] installation policy option is wrong using pkgcmd.
[Solution] Fixed option for pkgcmd.
[SCMRequest] N/A
switch (reqType) {
case PKGMGR_REQ_INSTALL:
m_packagePath = m_argv[4];
- m_installPolicy = WRT_WIM_POLICY_WAC;
+ struct stat info;
+ if (-1 != stat(m_argv[4], &info) && S_ISDIR(info.st_mode)) {
+ LogInfo("Installing package directly from directory");
+ m_installPolicy = WRT_WIM_POLICY_DIRECTORY_FORCE_INSTALL;
+ }
+ else
+ {
+ LogInfo("Installing from regular location");
+ m_installPolicy = WRT_WIM_POLICY_WAC;
+ }
AddStep(&WrtInstaller::installStep);
break;
case PKGMGR_REQ_UNINSTALL: