summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
db3956b)
public int execute(CommandLine command, Map environment)
throws ExecuteException, IOException {
String cmd = command.toString();
public int execute(CommandLine command, Map environment)
throws ExecuteException, IOException {
String cmd = command.toString();
+ if(workingDirectory!=null)
+ cmd = "cd "+workingDirectory.getPath()+" && "+cmd;
RemoteExec remoteExec = new RemoteExec();
remoteExec.setSshTarget(sshTarget);
remoteExec.setStreamHandler(streamHandler);
RemoteExec remoteExec = new RemoteExec();
remoteExec.setSshTarget(sshTarget);
remoteExec.setStreamHandler(streamHandler);
private RpmBuildEnvironment buildEnvironment;
private Executor executor;
private RpmBuildEnvironment buildEnvironment;
private Executor executor;
+ private String debuginfoDirName = "debuginfo";
+
public void run() {
// TODO check if caller is in mock group
public void run() {
// TODO check if caller is in mock group
File debuginfoDir = null;
if (!arch.equals(NOARCH)) {
archDir = new File(repoDir, arch);
File debuginfoDir = null;
if (!arch.equals(NOARCH)) {
archDir = new File(repoDir, arch);
- debuginfoDir = new File(archDir, "debuginfo");
+ debuginfoDir = new File(archDir, debuginfoDirName);
createrepo.arg("createrepo");
// sqllite db
createrepo.arg("-d");
createrepo.arg("createrepo");
// sqllite db
createrepo.arg("-d");
+ // debuginfo
+ if (!repoToRecreate.getName().equals(debuginfoDirName))
+ createrepo.arg("-x").arg(debuginfoDirName + "/*");
// quiet
createrepo.arg("-q");
createrepo.arg(repoToRecreate.getAbsolutePath());
// quiet
createrepo.arg("-q");
createrepo.arg(repoToRecreate.getAbsolutePath());
--- /dev/null
+package org.argeo.slc.lib.linux.rpmfactory;
+
+/** Initialize a repository factory. */
+public class RpmRepoInit implements Runnable {
+
+ public void run() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
package org.argeo.slc.log4j;
import java.util.Date;
package org.argeo.slc.log4j;
import java.util.Date;
+import java.util.concurrent.BlockingQueue;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Level;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Level;
try {
dispatching.set(true);
try {
dispatching.set(true);
- ((ProcessThreadGroup) currentThread.getThreadGroup())
- .getSteps().add(step);
+ BlockingQueue<ExecutionStep> steps = ((ProcessThreadGroup) currentThread
+ .getThreadGroup()).getSteps();
+ if (steps.remainingCapacity() == 0) {
+ stdOut("WARNING: execution steps queue is full, skipping step: "
+ + step);
+ // FIXME understand why it block indefinitely: the queue
+ // should be emptied by the logging thread
+ } else {
+ steps.add(step);
+ }
} finally {
dispatching.set(false);
}
} finally {
dispatching.set(false);
}
// }
/** For development purpose, since using regular logging is not easy here */
// }
/** For development purpose, since using regular logging is not easy here */
- private static void stdOut(Object obj) {
+ static void stdOut(Object obj) {
System.out.println(obj);
}
System.out.println(obj);
}