Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:development [2015/01/12 07:23] – [Package management scripts guide] LichenSymbiontdcore:development [2015/05/21 16:32] (current) – page is replaced by [[dcore:sce-import]]; left un-linked for reference by original author sm8ps
Line 1: Line 1:
 ===== Development ===== ===== Development =====
 ==== Package management scripts guide ==== ==== Package management scripts guide ====
-The scripts have quite a lot of fluff, without sufficient explinations.+The scripts have quite a lot of complicated stuff, without sufficient explanations.
 So here is my (LichenSymbiont) guide to the scripts. So here is my (LichenSymbiont) guide to the scripts.
  
Line 7: Line 7:
 It also uses some more complex awk programs, so you should learn a bit about the [[http://www.grymoire.com/Unix/Awk.html|Awk language]]. It also uses some more complex awk programs, so you should learn a bit about the [[http://www.grymoire.com/Unix/Awk.html|Awk language]].
 And of course you need to know bash scripting, so here is a [[http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html|guide]]. And of course you need to know bash scripting, so here is a [[http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html|guide]].
 +And understand some pitfalls in Bash (some applicable to Ash): [[http://mywiki.wooledge.org/BashPitfalls|Bash Pitfalls]].
  
-**Starting with a general outline:**+** First quick summary of the most important parts of the scripts: ** 
 + 
 +importsce is the command-line package manager (script), which calls deb2sce for getting the .deb files, and collecting them into the .sce package. 
 +It also calls the update function for the indices of Debian packages (debGetEnv). 
 + 
 +As you should expect, it must handle the regular Debian and Ubuntu package repository mirrors. 
 +Beyound that, it also downloads the dCore specific dependencies, and excluded packages, for the .deb packages (contained in /dCore/$build/import/deb2sce.tar.gz on the FTP). 
 +It also contains specific packages compiled for dCore (fltk library, flwm_topside and others). 
 + 
 +The scripts are complicated, unless you have a desire to learn, a good general understanding, and/or at least study them consistently. 
 + 
 +**SCE packages:**
  
 A sce package is a [[http://squashfs.sourceforge.net/|SquashFS]] file, which can compress data using multiple compression algorithms. A sce package is a [[http://squashfs.sourceforge.net/|SquashFS]] file, which can compress data using multiple compression algorithms.
Line 15: Line 27:
 But you can add new files to an already created file-system. Read about it [[http://www.tldp.org/HOWTO/html_single/SquashFS-HOWTO/|Here]]. But you can add new files to an already created file-system. Read about it [[http://www.tldp.org/HOWTO/html_single/SquashFS-HOWTO/|Here]].
 This allows for the creation of SquashFS files that stores all your favorite programs, in one file, by just incrementally adding them (this is not a feature of importsce yet). This allows for the creation of SquashFS files that stores all your favorite programs, in one file, by just incrementally adding them (this is not a feature of importsce yet).
 +
 +Then sce packages are mounted as [[https://en.wikipedia.org/wiki/Loop_device|loop-devices]] through loadsce (which just uses "mount -t squashfs -o loop..."), and located in the file-system at /tmp/tcloop/.
 +loadsce also loads all the dependencies of a package.
  
 ** importsce: ** ** importsce: **
Line 23: Line 38:
  
   - First it sets global variables for the script, and sets up the /tmp directory.   - First it sets global variables for the script, and sets up the /tmp directory.
 +  - Then removes temporary files (potentially left from a previous run of the scripts).
 +  - Then it sets the mirrors to the dCore specific packages and the file with extra dependency information for packages.
   - Then importsce sets a bunch of variables from the options used when calling the command. Then from its config file, if it exists (though it doesn't presently check this, just grep's the options). So the config file takes precedence over the command-line options.   - Then importsce sets a bunch of variables from the options used when calling the command. Then from its config file, if it exists (though it doesn't presently check this, just grep's the options). So the config file takes precedence over the command-line options.
-  - Then sets the target .sce file to be created. +  - Then decreases OPTIND by one, making the first argument the package name (instead of the one-letter options) 
-  - Then acquires the mirror to the special dCore packages (like Xprogs and flwm_topside), and special dependencies for certain packages (which don't show up in a regular Debian system (as they would already be installed)). There are also other things, like dependencies to exclude. You can study the file yourself, by downloading it from [[http://www.tinycorelinux.net/dCore/x86/import/deb2sce.tar.gz|here]] (extract it into a new directory, as the files are in the root of the package). +  - Then sets the target .sce file to be created (just sets the TARGET variable to the package name used when calling it). 
-    - Then downloads the latest file containing these packages. +    - And enters the /tmp directory
-    - And extracts its content into a bunch of text-files.+  - Then downloads the special dCore packages (like Xprogs and flwm_topside), and special dependencies for certain packages (which don't show up in a regular Debian system (as they would already be installed)). There are also other things, like dependencies to exclude. You can study the file yourself, by downloading it from [[http://www.tinycorelinux.net/dCore/x86/import/deb2sce.tar.gz|here]] (extract it into a new directory, as the files are in the root of the package). 
 +    - Then extracts its content into a bunch of text-files
 +  - Then checks if the target package is to be excluded (and exits if it's on the excluded list).
   - Then it checks if a .lst file (file containing a list of packages to download) is being used, and changes the targetted .sce accordingly.   - Then it checks if a .lst file (file containing a list of packages to download) is being used, and changes the targetted .sce accordingly.
-  - Here I skip a few checks...+  - Then it checks for more options from the config file, and then checks if you are trying to use a Windows file-system to extract files to (and if so, it informs the user of this, and exits).
   - Then it let's you enter a package name, if no target it specified (why is this so far down the script?). And exits the script if you don't specify anything.   - Then it let's you enter a package name, if no target it specified (why is this so far down the script?). And exits the script if you don't specify anything.
   - Then it checks if it can find the package in the package indices (both regular repos, and meta-packages and special dCore packages). This is done through the debGetEnv script, which also stores the relevant repo in the DEBINX variable.   - Then it checks if it can find the package in the package indices (both regular repos, and meta-packages and special dCore packages). This is done through the debGetEnv script, which also stores the relevant repo in the DEBINX variable.
Print/export
QR Code
QR Code dcore:development (generated for current page)