[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] some additional pydoc entries for snp



On Fri, Jan 07, 2005 at 03:49:24PM +0100, Bernhard Fischer wrote:
>Hi,
>
>I have trouble to see how this line in snp.conf could be made to work:
>OS_FILE file    *
>
>i.e. i want to install all (or a regex of) files in a package.
>Any suggestions?
>
None so far..
>

Attached are some spelling fixes for snp.py and a few additional pydoc
entries.

Is somebody with CVS-write access still reading this list?

If so, please apply those two patches and the attached one or
let me know why they are rejected, TIA.
>
>When building a rootfs-image, the filesystem is loop-mounted. The
>current code, however, does use loop0 unconditionally. Please find
>attached patch to correct this.
>
>When perusing a binary of busybox, the list of supported applets in
>busybox is not correct because the list of applets available through
>busybox is hard-coded. Attached is a proposal which looks at the
>actual applets the busybox installed in the image supports, tries to
>lookup the paths in the host image and puts applets which are not found
>in the host image into /sbin.
>
>Thank you.
diff -X ../excl -rup upstream/emdebsys/snp/snp.py /scratch/tmp/emdebsys/snp/snp.py
--- upstream/emdebsys/snp/snp.py	2002-02-21 19:35:26.000000000 +0100
+++ /scratch/tmp/emdebsys/snp/snp.py	2005-01-10 10:00:35.000000000 +0100
@@ -86,8 +87,8 @@ class Log:
 
 
 class Options:
-    """This class will represent all the configuration possibilities of the
-    program. Later the options should be accessible in the whole program by
+    """This class represents all the configuration possibilities of the
+    program. The options should be accessible in the whole program by
     typing Options.whatever."""
 
     # private variable, which should be automatically substituted by CVS
@@ -156,7 +157,7 @@ class Options:
 #        self.check_options()
 
     def set_command_line(self):
-        """This function sets up paramters from the command line."""
+        """This function sets up parameters from the command line."""
 
 	runtime_options = "Vhcv:s:r:o:"
 	try:
@@ -256,7 +257,9 @@ class Options:
                 
 
     def set_option(self, option, value):
-        """This function will set up the option, given a string value, converting it to appropriate type. It will throw an expception, if the argument does not exist"""
+        """This function will set up the option, given a string value,
+	converting it to appropriate type. It will throw an exception
+	if the argument does not exist"""
         
 
     def check(self):
@@ -409,7 +412,7 @@ def uri_to_fname(uri):
 
 
 def packages_uri(base, distribution, component, architecture):
-    """ contructs the ftp/http path of the "Packages" file
+    """ constructs the ftp/http path of the "Packages" file
         from the given parameters """
 
     # The Packages file from from the source
@@ -422,7 +425,7 @@ def packages_uri(base, distribution, com
 
 
 def content_uri(base, distribution, architecture):
-    """ contructs the ftp/http path of the "Contents-$ARCH.gz" file
+    """ constructs the ftp/http path of the "Contents-$ARCH.gz" file
     from the given parameters (currently not used) """
 
     uri = os.path.join(base, "dists" + "/" + \
@@ -775,7 +778,8 @@ class Package:
     # ---------------------------------------------------------------------
     #
     def get_file_list(self):
-        
+        """Get the list of files contained in a debian package"""
+
         deb_uri = os.path.join(self.source.base, self.filename)
 
         deb_file = touch_file_uri(deb_uri)
@@ -910,7 +914,7 @@ class Source:
     # ---------------------------------------------------------------------
     # 
     def add_depends(self, p):
-        """ add dependencys to use_package_name[] """
+        """ add dependencies to use_package_name[] """
 
 	for i in p.depends:
 		matchstr = re.search("^([a-zA-Z0-9_\+\-\.]*)",i)
@@ -970,7 +975,7 @@ class Source:
     # ---------------------------------------------------------------------
     # 
     def lib_path(self, lib):
-        """ Given the name of a dynamic library (e.g. libext2fs.so.2)
+        """ Given the name of a library (e.g. libext2fs.so.2)
         return the Package containing this library """
         
         if self.path_package.has_key(os.path.join("/lib", lib)):
@@ -1273,7 +1306,8 @@ class Sources_List:
         doit("cd %s; ../sbin/MAKEDEV %s" % (dev_path, dev))
 
     # ---------------------------------------------------------------------
-    # copy file from $(cml2+os)/templates (see (cml2+s)/doc/templates.txt or doc/doc.sgml)
+    # copy file from $(cml2+os)/templates (see
+    # paragraph (cml2+s)/doc/templates.txt or doc/doc.sgml)
     # 
     def copy_templates(s, c):
 	# first: copy all empty dirs
@@ -1583,22 +1638,28 @@ class Config(UserDict):
     # ---------------------------------------------------------------------
     #
     def isdef(s, var):
+        """Returns true if the specified option is set at all."""
         return s.data.has_key(var)
 
     # ---------------------------------------------------------------------
     #
     def value(self, var):
+        """Returns the value of the specified option."""
         return self.data[var]
 
     # ---------------------------------------------------------------------
     #
     def is_y(s, var): 
+        """Returns true if the specified option is set to y."""
         return s.isdef(var) and s.data[var] == 'y'
     def is_m(s, var): 
+        """Returns true if the specified option is set to m."""
         return s.isdef(var) and s.data[var] == 'm'
     def is_n(s, var): 
+        """Returns true if the specified option is set to n."""
         return not s.isdef(var) or s.data[var] == 'n'
     def is_t(s, var): 
+        """Returns true if the specified option is set (to y or m)."""
         return s.isdef(var) and (s.data[var] == 'y' or s.data[var] == 'm')
 
     def save_CML2(self, file_name):
@@ -1639,7 +1700,9 @@ class Config(UserDict):
     # ---------------------------------------------------------------------
     #
     def debian_arch(s):
+        """Returns a string for the currently configured target architecture"""
         if   s.is_y('PPC'):   return 'powerpc'
+        elif s.is_y('X86_64'):return 'x86_64'
         elif s.is_y('X86'):   return 'i386'
         elif s.is_y('M386'):  return 'i386'
         elif s.is_y('ALPHA'): return 'alpha'
diff -X excl -ruNp upstream/emdebsys/scripts/PROC_FS /scratch/tmp/emdebsys/scripts/PROC_FS
--- upstream/emdebsys/scripts/PROC_FS	2002-01-10 14:57:20.000000000 +0100
+++ /scratch/tmp/emdebsys/scripts/PROC_FS	2005-01-06 17:15:25.000000000 +0100
@@ -5,8 +5,11 @@ if [ "$OS_ROOTFS" = "" ]; then
 	exit 1
 fi
 
-cd $OS_ROOTFS/etc
-echo "[$0] Adding /proc entry to /etc/fstab"
-echo "proc            /proc      proc    defaults   0  0" >> fstab
+if ! grep -s -q -E "^proc" $OS_ROOTFS/etc/fstab
+then
+  echo "[$0] Adding /proc entry to etc/fstab"
+  echo "proc            /proc      proc    defaults   0  0" >> $OS_ROOTFS/etc/fstab
+fi
+
 echo "[$0] Creating the proc directory..."
 mkdir $OS_ROOTFS/proc
diff -X excl -ruNp upstream/emdebsys/scripts/SYSFS /scratch/tmp/emdebsys/scripts/SYSFS
--- upstream/emdebsys/scripts/SYSFS	1970-01-01 01:00:00.000000000 +0100
+++ /scratch/tmp/emdebsys/scripts/SYSFS	2005-01-03 10:46:05.000000000 +0100
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ x"$OS_ROOTFS" = "x" ]; then
+	echo "OS_ROOTFS not set"
+	exit 1
+fi
+
+echo "[$0] Creating the sys directory..."
+mkdir $OS_ROOTFS/sys

Reply to: