initializing process whenever launching a project.
- Smack rule was set by sdbd before but it will be set by IDE now. So,
pkg launcher set smack rule after installing packages.
- Do not need to initialized repositories whenever launching a project
Change-Id: Ice8915c20542e5fc3af494c18acd2d9894c6bd7c
Signed-off-by: donghyuk.yang <donghyuk.yang@samsung.com>
import org.tizen.nativeplatform.build.PlatformProjectDependentBuilder;
import org.tizen.nativeplatform.build.PlatformProjectDependentPackager;
import org.tizen.nativeplatform.command.launcher.CommandUtil;
+import org.tizen.nativeplatform.command.launcher.DeviceChangeListener;
import org.tizen.nativeplatform.preferences.PreferencesManager;
+import org.tizen.sdblib.SmartDevelopmentBridge;
/**
* The activator class controls the plug-in life cycle
PlatformResourceChangeListener listener = new PlatformResourceChangeListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
listener, IResourceChangeEvent.PRE_DELETE);
+ SmartDevelopmentBridge.addDeviceChangeListener(new DeviceChangeListener(), true);
}
/*
--- /dev/null
+package org.tizen.nativeplatform.command.launcher;
+
+import java.io.IOException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.nativeplatform.pkg.commander.PkgCommandTarget;
+import org.tizen.nativeplatform.pkg.commander.rpm.RpmCommanderCommon;
+import org.tizen.nativeplatform.util.PlatformProjectUtil;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.IDeviceChangeListener;
+import org.tizen.sdblib.exception.SdbCommandRejectedException;
+import org.tizen.sdblib.exception.TimeoutException;
+import org.tizen.sdblib.util.DeviceUtil;
+
+public class DeviceChangeListener implements IDeviceChangeListener {
+
+ protected final Logger logger = LoggerFactory.getLogger(DeviceChangeListener.class);
+
+ @Override
+ public void onConnected(IDevice device) {
+ if (!DeviceUtil.isOnline(device)) {
+ return;
+ }
+ PkgCommandTarget target = new PkgCommandTarget(PlatformProjectUtil.getPkgType(), device);
+ try {
+ device.becomeSuperUser(true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ logger.error("Faile to root on device", e);
+ }
+
+ target.getDeviceCommander().actionBeforeUsingZypper();
+ }
+
+ @Override
+ public void onDisconnected(IDevice device) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void onChanged(IDevice device, int changeMask) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
import org.tizen.nativeplatform.types.LaunchTypes;
import org.tizen.nativeplatform.util.IPackageUtil;
import org.tizen.nativeplatform.util.PkgUtilFactory;
+import org.tizen.nativeplatform.util.PlatformLaunchUtil;
import org.tizen.nativeplatform.util.PlatformProjectUtil;
import org.tizen.nativeplatform.util.PlatformUserInteraction;
import org.tizen.nativeplatform.util.SSHUtil;
descMsg = "Installation seems to be failed. Check package installation log.";
}
UserLogger.end(UserInteraction.CATE_PLATFORM_LAUNCH, PlatformUserInteraction.PRE_LAUNCH);
- if (!setLaunchConfigurationForEFL(new SubProgressMonitor(monitor, 1), descMsg, isEflApp)) {
+ if (!setLaunchConfiguration(new SubProgressMonitor(monitor, 1), descMsg, isEflApp)) {
return false;
}
} finally {
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
pkgLauncher.debugLaunchPkgs(LaunchTypes.NONE, shell, new SubProgressMonitor(
monitor, 1));
+ setSmackRule();
} else {
pkgLauncher.launchPkgs(shell, new SubProgressMonitor(monitor, 1));
}
}
return true;
+ }
+
+ private void setSmackRule() {
+ String[] programPaths = PlatformLaunchUtil.getProgramPath(project);
+ if (programPaths == null || programPaths.length <= 0) {
+ return;
+ }
+ IPkgCommander commander = target.getDeviceCommander();
+ StringBuffer pathlist = new StringBuffer();
+ for (String path : programPaths) {
+ pathlist.append(path);
+ pathlist.append(" ");
+ }
+ String list = pathlist.toString().trim();
+ Map<String, String[]> smackInfo = PlatformLaunchUtil.getSmackInfo(commander, list);
+ if (smackInfo == null) {
+ return;
+ }
+ for (String filepath : smackInfo.keySet()) {
+ String[] labels = smackInfo.get(filepath);
+ String a_label = labels[0];
+ if (a_label != null && !a_label.isEmpty()) {
+ commander.executeBinary(getSmackRuleCommand(a_label));
+ }
+ commander.setSmackExecute(filepath, "\"\"");
+ }
+ }
+ private String getSmackRuleCommand(String value) {
+ value = value.replaceAll("\"", "");
+ String cmd = String.format("echo \"sdbd::home %s rwx\" | smackload", value);
+ return cmd;
}
@SuppressWarnings("unchecked")
}
}
- private boolean setLaunchConfigurationForEFL(IProgressMonitor monitor, final String descMsg,
+ private boolean setLaunchConfiguration(IProgressMonitor monitor, final String descMsg,
final boolean isEflApp) throws CoreException {
monitor.beginTask("", 1);
}
PackageManagerOutputReceiver getOutputReceiver();
+
+ void actionBeforeUsingZypper();
void setHttpProxy(String proxy);
ICommandStatus getSmack(String paths);
+ ICommandStatus setSmackExecute(String path, String e_label);
+
CmdTargetTypes getCommandType();
boolean isRunningApp(String appId);
// TODO Auto-generated method stub
return null;
}
+
+ @Override
+ public void actionBeforeUsingZypper() {
+ }
+
+ @Override
+ public ICommandStatus setSmackExecute(String path, String e_label) {
+ return null;
+ }
}
abstract protected void changeUpdateMode();
- abstract protected void actionBeforeUsingZypper();
+ public void actionBeforeUsingZypper() {
+ return;
+ }
public RpmCommanderCommon() {
setConsole(true, null);
}
public String[] getArch(String pkg) {
+ /*
if (!checkPkgInstalled(pkg)) {
return new String[0];
}
+ */
String command = makeCommand(getResetRpmDb(), RpmTool.pkgArchCommand(pkg));
PackageManagerOutputReceiver hrec = getNewOuputReceiver();
ICommandStatus status = execute(command, hrec, null);
}
public String[] getName(String pkg) {
+ /*
if (!checkPkgInstalled(pkg)) {
return new String[0];
}
+ */
String command = makeCommand(getResetRpmDb(), RpmTool.pkgNameCommand(pkg));
PackageManagerOutputReceiver hrec = getNewOuputReceiver();
ICommandStatus status = execute(command, hrec, null);
}
}
} else if (tool.equals(TOOL.RPM)) {
+ /*
if (!checkPkgInstalled(pkg)) {
return new String[0];
}
+ */
String command = makeCommand(getResetRpmDb(), RpmTool.pkgFullVerCommand(pkg));
PackageManagerOutputReceiver hrec = getNewOuputReceiver();
ICommandStatus status = execute(command, hrec, null);
List<String> value = status.getValues();
if (value != null && value.size() > 0) {
- changeUpdateMode();
+ // changeUpdateMode();
UserLogger.start(PlatformUserInteraction.INSTALL_PKG);
if (type == TOOL.RPM) {
String command = makeCommand(getResetRpmDb(),
monitor.beginTask("", 1);
}
- changeUpdateMode();
+ // changeUpdateMode();
String command = makeCommand(getProxyCommand(), getResetRpmDb(),
ZypperTool.installRemoteCommand(pkgs));
ICommandStatus status = execute(command, monitor);
monitor.beginTask("", 1);
}
- changeUpdateMode();
+ // changeUpdateMode();
String command = makeCommand(getResetRpmDb(), RpmTool.uninstallCommand(pkgs));
ICommandStatus status = execute(command, monitor);
}
public ICommandStatus addRepo(String name, String url) {
- changeUpdateMode();
+ // changeUpdateMode();
// addRepoXmlOut(name, url);
String command = makeCommand(getProxyCommand(), getResetRpmDb(),
ZypperTool.addRemoteRepoCommand(name, url));
}
public ICommandStatus addLocalRepo(String name, String path) {
- changeUpdateMode();
+ // changeUpdateMode();
// addLocalRepoXmlOut(name, path);
String command = makeCommand(getProxyCommand(), getResetRpmDb(),
ZypperTool.addLocalRepoCommand(name, path));
}
public ICommandStatus removeRepo(String name) {
- changeUpdateMode();
+ // changeUpdateMode();
// removeRepoXmlOut(name);
String command = makeCommand(getProxyCommand(), getResetRpmDb(),
ZypperTool.removeRepoCommand(name));
public RpmCommanderDevice(IDevice device, boolean useConsoleLog) {
super(useConsoleLog, CONSOLE_NAME);
this.device = device;
- actionBeforeUsingZypper();
}
public RpmCommanderDevice(IDevice device) {
super(CONSOLE_NAME);
this.device = device;
- actionBeforeUsingZypper();
}
public ICommandStatus copyFile(String srcPath, String dstPath) {
List<String> value = status.getValues();
if (value != null && value.size() > 0) {
- changeUpdateMode();
+ // changeUpdateMode();
UserLogger.start(PlatformUserInteraction.INSTALL_PKG);
if (type == TOOL.RPM) {
String command = makeCommand(getResetRpmDb(),
}
return status;
}
+
+ @Override
+ public ICommandStatus setSmackExecute(String path, String e_label) {
+ // 1. change smack information
+ StringBuffer sbCommand = new StringBuffer("chsmack");
+ // Something is wrong if access information is empty
+ // In case of this, smack may be not supported.
+ if (!e_label.isEmpty()) {
+ sbCommand.append(String.format(" -e %s", e_label));
+ }
+ sbCommand.append(String.format(" %s", path));
+ // 2. check the changing
+ sbCommand.append(String.format(";chsmack %s", path));
+ String command = sbCommand.toString();
+ ICommandStatus status = execute(command, null, false, false);
+ if (status.isOk()) {
+ List<String> value = status.getValues();
+ String e_result = "";
+ if (value.size() > 0) {
+ String line = value.get(0);
+ for (String info : line.split(" ")) {
+ if (info.startsWith("execute")) {
+ String[] e = info.split("=");
+ if (e.length == 2) {
+ e_result = e[1];
+ }
+ }
+ }
+ }
+ if (e_label.equals("\"\"") && e_result.isEmpty()) {
+ printResultLog(String.format("[RDS] Change smack: %s %s", path, e_label));
+ } else if (e_label.equals(e_result)) {
+ printResultLog(String.format("[RDS] Change smack: %s %s", path, e_label));
+ } else {
+ return null;
+ }
+ }
+ return status;
+ }
@Override
public ICommandStatus changeSmack(String path, String a_label, String e_label) {
}
}
- protected void actionBeforeUsingZypper() {
+ public void actionBeforeUsingZypper() {
if (device.isEmulator()) {
if (existsFile(ZYPPER_CONF_FILE)) {
String command = CMD_ACTION_FOR_USING_ZYPPER;
}
@Override
- protected void actionBeforeUsingZypper() {
- return;
- }
-
- @Override
public ICommandStatus copyFile(String srcPath, String dstPath) {
return null;
}
public ICommandStatus executeBinary(String binary) {
return null;
}
+
+ @Override
+ public ICommandStatus setSmackExecute(String path, String e_label) {
+ return null;
+ }
}
}
@Override
- protected void actionBeforeUsingZypper() {
- return;
- }
-
- @Override
public ICommandStatus copyFile(String srcPath, String dstPath) {
return null;
}
public ICommandStatus executeBinary(String binary) {
return null;
}
+
+ @Override
+ public ICommandStatus setSmackExecute(String path, String e_label) {
+ return null;
+ }
}
actionBeforeUsingZypper();
}
- protected void actionBeforeUsingZypper() {
+ public void actionBeforeUsingZypper() {
/*
* (with --nodeps --force) Error: Subprocess failed. Error: RPM failed:
* error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH:
public ICommandStatus executeBinary(String binary) {
return null;
}
+
+ @Override
+ public ICommandStatus setSmackExecute(String path, String e_label) {
+ return null;
+ }
}
PlatformLaunchMessages.IS_NOT_INITIALIZED_ROOTSTRAP, target.getRootstrap()
.getId()));
} else {
+ /*
UserLogger.start(UserInteraction.CATE_PLATFORM_LAUNCH, PlatformUserInteraction.INIT_ROOTSTRAP_REPO);
PkgMgrInitializer initializer = new PkgMgrInitializer(target, CmdTargetTypes.ROOTSTRAP);
initializer.faskInitRootstrapData();
UserLogger.end(UserInteraction.CATE_PLATFORM_LAUNCH, PlatformUserInteraction.INIT_ROOTSTRAP_REPO);
+ */
}
IPkgCommander commander = target.getCommander(CmdTargetTypes.ROOTSTRAP);
boolean installResult = false;
if (status != null && !status.isOk()) {
throw new InterruptedException();
}
+ updatePackageInfo(null);
monitor.done();
}
});
@Override
public void mouseDown(MouseEvent e) {
handleRefreshRepositoryButton();
- updatePackageInfo(null);
pkgViewer.refresh();
}
@Override
public void mouseDown(MouseEvent e) {
handleUpgradeButton();
- updatePackageInfo(null);
pkgViewer.refresh();
}
@Override
public void mouseDown(MouseEvent e) {
handleInstallPackageButton();
- updatePackageInfo(null);
pkgViewer.refresh();
}
}
handleInstallLocalPackageButton(selectedFiles);
- updatePackageInfo(selectedFiles);
pkgViewer.refresh();
}
@Override
public void mouseDown(MouseEvent e) {
handleRemovePackageButton();
- updatePackageInfo(null);
pkgViewer.refresh();
}
if (status == null || !status.isOk()) {
throw new InterruptedException();
}
+ updatePackageInfo(null);
monitor.done();
}
});
if (status == null || !status.isOk()) {
throw new InterruptedException();
}
+ updatePackageInfo(null);
monitor.done();
}
});
if (status == null || !status.isOk()) {
throw new InterruptedException();
}
+ updatePackageInfo(selectedFiles);
monitor.done();
}
});
}
}
- protected void handleRemovePackageButton() {
+ protected void handleRemovePackageButton() {
final List<PkgStatus> selectedList = getSelectedPkgList(true);
if (selectedList.isEmpty()) {
DialogUtil.openErrorDialog(resources.getString("PkgMgr.Error.Noselected.Package")
if (status == null || !status.isOk()) {
throw new InterruptedException();
}
+ updatePackageInfo(null);
monitor.done();
}
});
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.ptp.remotetools.core.IRemoteCopyTools;
-import org.eclipse.ptp.remotetools.core.IRemoteFileTools;
-import org.eclipse.ptp.remotetools.exception.CancelException;
-import org.eclipse.ptp.remotetools.exception.RemoteConnectionException;
-import org.eclipse.ptp.remotetools.exception.RemoteOperationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tizen.common.util.FileUtil;
import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
import org.tizen.nativeplatform.pkg.commander.ICommandStatus;
import org.tizen.nativeplatform.pkg.commander.IPkgCommander;
-import org.tizen.nativeplatform.pkg.commander.PkgCommandTarget;
import org.tizen.nativeplatform.pkg.model.IPackage;
-import org.tizen.nativeplatform.pkg.model.Package;
import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;
import org.tizen.nativeplatform.types.CmdTargetTypes;
+import org.tizen.nativeplatform.util.PlatformLaunchUtil;
import org.tizen.nativeplatform.util.RootstrapUtil;
public class RemoteRpmRapidDeployer {
StringBuffer sbCheckFiles = new StringBuffer();
for (String file : sourceChecksums.keySet()) {
// key = <package filename>_<checksum>/<filepath>
- sbCheckFiles.append("\"");
+ sbCheckFiles.append("\'");
sbCheckFiles.append(new Path(file).removeFirstSegments(1).toString());
- sbCheckFiles.append("\" ");
+ sbCheckFiles.append("\' ");
}
String needCheckFiles = sbCheckFiles.toString().trim();
Map<String, String> targetChecksums = getTargetChecksumMap(needCheckFiles);
}
Map<String, String[]> smackInfo = null;
if (isDeviceCommander()) {
- smackInfo = getSmackInfo(copyFileList);
+ smackInfo = PlatformLaunchUtil.getSmackInfo(commander, copyFileList);
if (smackInfo == null) {
return false;
}
return true;
}
- private Map<String, String[]> getSmackInfo(String fileList) {
- Map<String, String[]> smackInfo = new HashMap<String, String[]>();
- String[] args;
- if (fileList.length() > CommandUtil.LIMIT_COMMAND_LENGTH) {
- args = CommandUtil.splitCommandArgs(fileList);
- } else {
- args = new String[1];
- args[0] = fileList;
- }
- for (String arg : args) {
- if (arg.isEmpty()) {
- continue;
- }
- ICommandStatus status = commander.getSmack(arg);
- if (status == null || !status.isOk()) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- }
- List<String> result = status.getValues();
- if (result == null) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- }
- for (String line : result) {
- String targetFile = "";
- String labels[] = { "", "" };
- for (String info : line.split(" ")) {
- if (info.startsWith("access=")) {
- String[] a_label = info.split("=");
- if (a_label.length == 2) {
- labels[0] = a_label[1].trim();
- }
- } else if (info.startsWith("execute")) {
- String[] e_label = info.split("=");
- if (e_label.length == 2) {
- labels[1] = e_label[1].trim();
- }
- } else {
- targetFile = info;
- }
- }
- if (targetFile.isEmpty()) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- } else {
- smackInfo.put(targetFile, labels);
- }
- }
- }
- return smackInfo;
- }
-
// compare source data and target data. divide all files into four list parts.
private String groupFiles(Map<String, String> sourceChecksums,
Map<String, String> targetChecksums, List<String> copyList, List<String> addList,
import org.eclipse.core.runtime.Path;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.tizen.nativecommon.build.SmartBuildInterface;
import org.tizen.nativeplatform.command.launcher.CommandUtil;
import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
import org.tizen.nativeplatform.pkg.commander.ICommandStatus;
import org.tizen.nativeplatform.pkg.commander.IPkgCommander;
import org.tizen.nativeplatform.pkg.model.IPackage;
import org.tizen.nativeplatform.types.CmdTargetTypes;
-import org.tizen.nativeplatform.util.RootstrapUtil;
+import org.tizen.nativeplatform.util.PlatformLaunchUtil;
public class RpmRapidDeployer {
private IProject project;
}
Map<String, String[]> smackInfo = null;
if (isDeviceCommander()) {
- smackInfo = getSmackInfo(copyFileList);
+ smackInfo = PlatformLaunchUtil.getSmackInfo(commander, copyFileList);
if (smackInfo == null) {
return false;
}
return true;
}
- private Map<String, String[]> getSmackInfo(String fileList) {
- Map<String, String[]> smackInfo = new HashMap<String, String[]>();
- String[] args;
- if (fileList.length() > CommandUtil.LIMIT_COMMAND_LENGTH) {
- args = CommandUtil.splitCommandArgs(fileList);
- } else {
- args = new String[1];
- args[0] = fileList;
- }
- for (String arg : args) {
- if (arg.isEmpty()) {
- continue;
- }
- ICommandStatus status = commander.getSmack(arg);
- if (status == null || !status.isOk()) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- }
- List<String> result = status.getValues();
- if (result == null) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- }
- for (String line : result) {
- String targetFile = "";
- String labels[] = { "", "" };
- for (String info : line.split(" ")) {
- if (info.startsWith("access=")) {
- String[] a_label = info.split("=");
- if (a_label.length == 2) {
- labels[0] = a_label[1].trim();
- }
- } else if (info.startsWith("execute")) {
- String[] e_label = info.split("=");
- if (e_label.length == 2) {
- labels[1] = e_label[1].trim();
- }
- } else {
- targetFile = info;
- }
- }
- if (targetFile.isEmpty()) {
- logger.error(String.format("Failed to get smack info [%s]", fileList));
- return null;
- } else {
- smackInfo.put(targetFile, labels);
- }
- }
- }
- return smackInfo;
- }
-
// compare source data and target data. divide all files into four list parts.
private String groupFiles(Map<String, String> sourceChecksums,
Map<String, String> targetChecksums, List<String> copyList, List<String> addList,
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ptp.remotetools.core.IRemoteCopyTools;
-import org.eclipse.ptp.remotetools.core.IRemoteFileTools;
-import org.eclipse.ptp.remotetools.exception.CancelException;
-import org.eclipse.ptp.remotetools.exception.RemoteConnectionException;
-import org.eclipse.ptp.remotetools.exception.RemoteOperationException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.tizen.nativecommon.launch.TizenLaunchCommand;
import org.tizen.nativecommon.launch.TizenLaunchMessages;
import org.tizen.nativeplatform.IPlatformXMLStore;
+import org.tizen.nativeplatform.command.launcher.CommandUtil;
import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
+import org.tizen.nativeplatform.pkg.commander.ICommandStatus;
import org.tizen.nativeplatform.pkg.commander.IPkgCommander;
import org.tizen.nativeplatform.pkg.commander.PkgCommandTarget;
import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;
return null;
}
}
+
+ public static Map<String, String[]> getSmackInfo(IPkgCommander commander, String fileList) {
+ Map<String, String[]> smackInfo = new HashMap<String, String[]>();
+ String[] args;
+ if (fileList.length() > CommandUtil.LIMIT_COMMAND_LENGTH) {
+ args = CommandUtil.splitCommandArgs(fileList);
+ } else {
+ args = new String[1];
+ args[0] = fileList;
+ }
+ for (String arg : args) {
+ if (arg.isEmpty()) {
+ continue;
+ }
+ ICommandStatus status = commander.getSmack(arg);
+ if (status == null || !status.isOk()) {
+ logger.error(String.format("Failed to get smack info [%s]", fileList));
+ return null;
+ }
+ List<String> result = status.getValues();
+ if (result == null) {
+ logger.error(String.format("Failed to get smack info [%s]", fileList));
+ return null;
+ }
+ for (String line : result) {
+ String targetFile = "";
+ String labels[] = { "", "" };
+ for (String info : line.split(" ")) {
+ if (info.startsWith("access=")) {
+ String[] a_label = info.split("=");
+ if (a_label.length == 2) {
+ labels[0] = a_label[1].trim();
+ }
+ } else if (info.startsWith("execute")) {
+ String[] e_label = info.split("=");
+ if (e_label.length == 2) {
+ labels[1] = e_label[1].trim();
+ }
+ } else {
+ targetFile = info;
+ }
+ }
+ if (targetFile.isEmpty()) {
+ logger.error(String.format("Failed to get smack info [%s]", fileList));
+ return null;
+ } else {
+ smackInfo.put(targetFile, labels);
+ }
+ }
+ }
+ return smackInfo;
+ }
}