proj/gentoo: Initial commit

This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
This commit is contained in:
Robin H. Johnson
2015-08-08 17:38:18 -07:00
commit 56bd759df1
97532 changed files with 3536859 additions and 0 deletions
+151
View File
@@ -0,0 +1,151 @@
--- BeanShell/src/bsh/Interpreter.java~ 2003-09-03 19:56:58.000000000 -0400
+++ BeanShell/src/bsh/Interpreter.java 2004-01-25 09:59:41.730059108 -0500
@@ -38,6 +38,13 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
+import bsh.util.BshCompleter;
+import bsh.util.NameCompletionTable;
+import bsh.classpath.ClassManagerImpl;
+import org.gnu.readline.Readline;
+import org.gnu.readline.ReadlineLibrary;
+import org.gnu.readline.ReadlineReader;
+
/**
The BeanShell script interpreter.
@@ -394,10 +401,59 @@
else
src = System.in;
- Reader in = new CommandLineReader( new InputStreamReader(src));
- Interpreter interpreter =
- new Interpreter( in, System.out, System.err, true );
- interpreter.run();
+ Reader in = null;
+ boolean usingReadline = false;
+ String backingLib = System.getProperty("bsh.console.readlinelib"); System.out.println("backingLib is " + backingLib);
+ if (backingLib != null && backingLib.length() > 0) {
+ try {
+ File history = new File(System.getProperty("user.home") +
+ File.separator + ".bsh_history");
+ if (!history.exists()) {
+ try {
+ history.createNewFile();
+ } catch(IOException ioe) {
+ debug("Unable to create history " + history.getAbsolutePath());
+ }
+ }
+ ReadlineLibrary lib = ReadlineLibrary.byName(backingLib);
+ // should I wrap CommandLineReader around it?
+ if (history.canWrite() && history.canRead()) {
+ in = new ReadlineReader("bsh % ", history,lib);
+ } else {
+ in = new ReadlineReader("bsh % ",lib);
+ debug("Unable to read/write history " + history.getAbsolutePath());
+ }
+ } catch (IOException ioe) {
+ System.err.println("Unable to invoke ReadlineReader " +
+ "due to: " + ioe);
+ }
+ }
+ if (in == null)
+ in = new CommandLineReader( new InputStreamReader(src));
+ else
+ usingReadline = true;
+ Interpreter interpreter =
+ new Interpreter( in, System.out, System.err, true );
+ if (usingReadline) {
+ NameCompletionTable nct = new NameCompletionTable();
+ nct.add(interpreter.getNameSpace());
+
+ /** ClassManager does a lot of chatting to the stdout,
+ * so this has been commented out for the time being
+ **/
+
+// try {
+// BshClassManager bcm = BshClassManager.getClassManager();
+// if (bcm != null) {
+// nct.add(((ClassManagerImpl)bcm).getClassPath());
+// }
+// } catch(ClassPathException cpe) {
+// debug("classpath exception in name compl:" + cpe);
+// }
+
+ Readline.setCompleter(new BshCompleter(nct));
+ }
+ interpreter.run();
}
}
@@ -445,7 +501,7 @@
System.err.flush();
Thread.yield(); // this helps a little
- if ( interactive )
+ if ( interactive && !(in instanceof ReadlineReader))
print( getBshPrompt() );
eof = Line();
@@ -548,10 +604,17 @@
}
}
- if ( interactive && exitOnEOF )
- System.exit(0);
+ if ( interactive && exitOnEOF ) {
+ /* should be done for all streams in general, but this
+ * ensures that the history for readline is flushed */
+ try {
+ in.close();
+ } catch (IOException ioe) {
+ }
+
+ System.exit(0);
}
-
+ }
// begin source and eval
/**
--- /dev/null 2003-10-19 02:52:03.000000000 -0400
+++ BeanShell/src/bsh/util/BshCompleter.java 2004-01-25 10:14:10.184458217 -0500
@@ -0,0 +1,38 @@
+package bsh.util;
+
+import org.gnu.readline.ReadlineCompleter;
+
+/**
+ * An adapter for org.gnu.readline's ReadlineCompleter interface to map to
+ * BeanShell's NameCompleter interface.
+ *
+ * @see org.gnu.readline.ReadlineReader
+ * @version $Revision: 1.1 $
+ * @author Shane Celis <shane@terraspring.com>
+ **/
+public class BshCompleter implements ReadlineCompleter {
+
+ private NameCompletion completer;
+
+ /**
+ * Constructs a <code>ReadlineCompleter</code> out of a
+ * <code>NameCompleter</code> object.
+ **/
+ public BshCompleter(NameCompletion completer) {
+ this.completer = completer;
+ }
+
+ /**
+ * Returns String of completion if unambiguous, otherwise null
+ **/
+ public String completer(String text, int state) {
+ // Not sure what state is used for in ReadlineCompleter
+ String[] completions = completer.completeName(text);
+ if (completions.length == 1 && state == 0) {
+ return completions[0];
+ } else {
+ return null; // ambiguous result
+ }
+ }
+
+}
+53
View File
@@ -0,0 +1,53 @@
--- build.xml 2005-06-22 18:01:39.000000000 +0200
+++ build.xml 2005-06-22 18:02:48.000000000 +0200
@@ -108,49 +108,7 @@
<!-- Begin Targets -->
- <!-- The javacc targets could be smarter... -->
- <target name="checkjjt">
- <uptodate property="jjtree.notRequired"
- targetfile="${src-dir}/bsh/bsh.jj"
- >
- <srcfiles dir="${src-dir}/bsh" includes="bsh.jjt"/>
- </uptodate>
- </target>
- <target name="checkjj">
- <uptodate property="javacc.notRequired"
- targetfile="${src-dir}/bsh/Parser.java"
- >
- <srcfiles dir="${src-dir}/bsh" includes="bsh.jj"/>
- </uptodate>
- </target>
-
- <!-- Create bsh.jj when bsh.jjt changes. -->
- <target name="jjtree" unless="jjtree.notRequired" depends="checkjjt">
- <java classname="jjtree"
- fork="yes"
- failonerror="yes" >
- <arg
- line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jjt"/>
- <classpath>
- <fileset refid="lib-fileset"/>
- </classpath>
- </java>
- </target>
-
- <!-- Create Parser.java when bsh.jj changes. -->
- <target name="javacc" unless="javacc.notRequired" depends="checkjj">
- <java classname="javacc"
- fork="yes"
- failonerror="yes"
- classpath="${javacc-lib}">
- <arg line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jj"/>
- <classpath>
- <fileset refid="lib-fileset"/>
- </classpath>
- </java>
- </target>
-
- <target name="compile" depends="jjtree,javacc,builddir">
+ <target name="compile" depends="builddir">
<!-- exclude the ${excludes} as well as anything under a "bak" dir -->
<!--compiler="${build-compiler}"-->
<javac srcdir="${src-dir}:${test-src-dir}:${bsf-src-dir}:${classgen-src-dir}"