Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dcore:development [2015/01/11 11:50] – created LichenSymbiont | dcore: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 | + | The scripts have quite a lot of complicated stuff, without sufficient |
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:// | It also uses some more complex awk programs, so you should learn a bit about the [[http:// | ||
And of course you need to know bash scripting, so here is a [[http:// | And of course you need to know bash scripting, so here is a [[http:// | ||
+ | And understand some pitfalls in Bash (some applicable to Ash): [[http:// | ||
- | Starting with a general | + | ** First a 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, | ||
+ | It also contains specific packages compiled for dCore (fltk library, flwm_topside and others). | ||
+ | |||
+ | The scripts are complicated, | ||
+ | |||
+ | **SCE packages:** | ||
A sce package is a [[http:// | A sce package is a [[http:// | ||
Line 16: | Line 28: | ||
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). | ||
- | Now I will walk you through the importsce script, so download the latest scripts, | + | Then sce packages are mounted as [[https:// |
- | And follow along, looking | + | loadsce also loads all the dependencies of a package. |
- | First it sets global variables for the script, and sets up the /tmp directory. | + | ** importsce: ** |
- | Then importsce | + | Now I will walk you through the importsce |
- | Then from its config file, if it exists (though it doesn' | + | |
- | So the config file takes precedence over the command-line options. | + | |
- | Then sets the target .sce file to be created. | + | And follow along, looking at the actual importsce script. |
- | Then acquires | + | - First it sets global variables for the script, and sets up the /tmp directory. |
- | There are also other things, like dependencies to exclude. You can study the file youself, by downloading it from [[http:// | + | - Then removes temporary files (potentially left from a previous run of the scripts). |
- | Then downloads the latest file containing these packages. | + | - Then it sets the mirrors |
- | And extracts its content into a bunch of text-files. | + | - 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' |
+ | - Then decreases OPTIND by one, making the first argument the package name (instead of the one-letter options) | ||
+ | - Then sets the target .sce file to be created (just sets the TARGET variable to the package name used when calling it). | ||
+ | - And enters the /tmp directory. | ||
+ | - Then downloads | ||
+ | | ||
+ | - 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 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 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. | ||
+ | - And finally it calls the deb2sce script (through the mksce function) after a bunch of checks, which does the real work of downloading the package(s) (with dependencies and all). | ||
- | Then it checks if a .lst file (file containing a list of packages | + | Then after deb2sce has downloaded all of the required |
- | Here I skip a few checks... | + | deb2sce also does the -l option operations, of importing packages from a file containing a list of packages. |
- | And finally it calls the deb2sce script | + | **deb2sce script:** |
- | Then after deb2sce has downloaded | + | This script apparently sets up the /tmp directory |
- | deb2sce | + | First skim over the functions, to understand generally what they do. |
+ | |||
+ | - Then we start at #Main, where it first checks the options that deb2sce | ||
+ | | ||
+ | - After it removes the unused debinx files, it checks if the user is using a package-list file for making a collection in an sce file. | ||
+ | - Then checks if the package collection matches already existing meta-packages, | ||
+ | - If it matches a regular Debian package, it sets the mirrors and other variables pertaining to the repo containing it, and displays this information. | ||
+ | - Then it creates the directory for the stored deb files, and sce files. And changes the import directory to the in-RAM one, and enters it, if you have set this option. | ||
+ | - Then creates and enters the temporary directory for extracting your package(s). | ||
+ | - Then it gets the dependencies for your package(s), using debGetDeps -- iterating through the contained packages in your package list -- if that's what you are using. | ||
+ | - Then it checks if there are blocked/ | ||
+ | - Then it gets extra dependent | ||
+ | - Then checks if the target sce already exists (why so far down?). | ||
+ | - Then it checks if a .dep file already exists for you target package, and informs the user of them. | ||
+ | - Then it checks if there is enough space to extract into. | ||
+ | - Then it adds the new dependencies to the temporary dependency file (/ | ||
+ | - Then the interactive import logic. | ||
+ | - Then it gets the package description file for packages, and extracts it into the temporary target extraction directory. This is a big block of code. | ||
+ | - And finally, in this big loop, it downloads the .deb file as well, using the fetchDeb() function. And extracts it into the temporary target dir. | ||
+ | - And finally, after a lot of operations (a bit too complicated to put here now), it uses mksquashfs to compress the temporary target directory into a SquashFS file -- the sce package. |