From 429f755e2060b450c9d0c296903bef56ad6f1da0 Mon Sep 17 00:00:00 2001 From: Sven Vermeulen Date: Wed, 8 Sep 2010 22:52:10 +0200 Subject: [PATCH] add another install failure, convert shell scripting to use posix sh --- ChangeLog | 5 +++ src/linux_sea/09-softwaremanagement.xml | 42 +++++++++++++++++++++++++ src/linux_sea/19-shellscripting.xml | 38 +++++++++++----------- 3 files changed, 66 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4899307..e79f22c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +** (2010-09-08) Sven Vermeulen + - Shell scripting using Posix SH, not bash + - Add 'multiple package instances within single package slot' install + failure information + ** (2010-09-04) Sven Vermeulen - Simple spellcheck - Add in system requirement paragraph (especially disk space) diff --git a/src/linux_sea/09-softwaremanagement.xml b/src/linux_sea/09-softwaremanagement.xml index c4e5e41..c975b2a 100644 --- a/src/linux_sea/09-softwaremanagement.xml +++ b/src/linux_sea/09-softwaremanagement.xml @@ -1868,6 +1868,48 @@ xen [Subversion] (source: http://overlays....) using the / help search system). +
+ Multiple packages within a single package slot + + When software is being installed, Portage verifies if all + requirements are met. This includes USE requirements that some + packages have on others. For instance, kdelibs requires dbus, built + with the USE="X" setting. If for some other reason dbus is being + pulled in without X (an ebuild requires dbus without X, or you changed + your USE flags to disallow X in USE), you might get the following + error message: + + !!! Multiple package instances within a single package slot have been pulled +!!! into the dependency graph, resulting in a slot conflict: + +sys-apps/dbus:0 + + ('ebuild', '/', 'sys-apps/dbus-1.2.24', 'merge') pulled in by + >=sys-apps/dbus-1.0.2 required by ('installed', '/', 'x11-libs/qt-dbus-4.6.2', 'nomerge') + sys-apps/dbus required by ('installed', '/', 'app-misc/strigi-0.7.1', 'nomerge') + >=sys-apps/dbus-1.1 required by ('installed', '/', 'dev-libs/dbus-glib-0.86', 'nomerge') + + ('installed', '/', 'sys-apps/dbus-1.2.24', 'nomerge') pulled in by + sys-apps/dbus[X] required by ('installed', '/', 'kde-base/kdelibs-4.4.5', 'nomerge') + (and 3 more) + + Explanation: + + New USE for 'sys-apps/dbus:0' are incorrectly set. In order to solve + this, adjust USE to satisfy 'sys-apps/dbus[X]'. + + If this is due to a change in USE flags, undo the change (in the + above case, setting USE to "-X" generally was a bad idea). If you need + a particular USE setting, you can use /etc/portage/package.use to + change the USE settings of one or more packages without affecting the + entire system. + + If this due to packages with conflicting dependencies, you'll + either need to drop one of the packages, or file a bug at https://bugs.gentoo.org and ask + for a proper solution. +
+
Other Issues diff --git a/src/linux_sea/19-shellscripting.xml b/src/linux_sea/19-shellscripting.xml index cdb3f7c..b7379b3 100644 --- a/src/linux_sea/19-shellscripting.xml +++ b/src/linux_sea/19-shellscripting.xml @@ -103,14 +103,15 @@ Try 'ls --help' for more information to chain such commands. Its use is less pertinent in regular shell operations, but more in shell scripts (for instance for error handling). Yet, it is still useful for regular shell operations, as - the following (perhaps too simple, yet explanatory) example shows: + the following (perhaps too simple, yet explanatory) example + shows: ~$ mount /media/usb || sudo mount /media/usb The command sequence tries to mount the /media/usb location. If for any reason this fails (for instance, because the user does not - have the rights to mount), retry but using sudo. - + have the rights to mount), retry but using + sudo.
@@ -163,9 +164,9 @@ dev-perl/libwww-perl-5.836 containing the string 'completed emerge'. The results of the grep operation is then piped to the awk application which prints out the 8th field - (where white space is a field separator), which is the category/package - set. This allows you to follow a lengthy emerge process without having - to keep an eye on the entire output of + (where white space is a field separator), which is the + category/package set. This allows you to follow a lengthy emerge + process without having to keep an eye on the entire output of emerge. The | sign passes through the standard output of a process. If @@ -187,7 +188,7 @@ dev-perl/libwww-perl-5.836 assigned. This is a number that uniquely identifies a file for a specific application. The file descriptors 0, 1 and 2 are reserved for standard input, standard output and standard error - output. + output. The 2>&1 suffix tells Unix/Linux that the file descriptor 2 (standard error) should be redirected (>) to file descriptor 1 @@ -224,7 +225,7 @@ dev-perl/libwww-perl-5.836 Shells also offer a way to group commands. If you do this, it is said that you create a sub-shell that contains the commands you want to - execute. Now why would this be interesting? + execute. Now why would this be interesting? Well, suppose that you want to update your system, followed by an update of the file index. You don't want them to be ran simultaneously @@ -285,7 +286,7 @@ iptables -A FORWARD -i tap0 -o eth0 -s 192.168.100.1/24 ! -d 192.168.100.1/24 -j iptables -A FORWARD -o tap0 -i eth0 -d 192.168.100.1/24 ! -s 192.168.100.1/24 -j ACCEPT Can you imagine having to retype all that (let alone on a single - command line, separated with ;) + command line, separated with ;) To execute the script, give it an appropriate name (say "enable_virt_internet"), mark it as executable, and execute it: @@ -333,7 +334,7 @@ iptables -A FORWARD -o tap0 -i eth0 -d 192.168.100.1/24 ! -s 192.168.100.1/24 -j the file (this must be the first line of the script), in this case to inform Linux that this is a bash shell script: - #!/bin/bash + #!/bin/sh # Load in virtualisation modules modprobe tun ... @@ -350,16 +351,16 @@ modprobe tun A shell script like the above is still quite simple, but also error-prone. If you had your share of issues / incidents with that - script, you will most likely start adding error conditions inside it. - + script, you will most likely start adding error conditions inside + it. First, make sure that we are root. We can verify this by reading the special variable $UID (a read-only variable giving the user id of the user executing the script): - #!/bin/bash + #!/bin/sh -if [[ $UID -ne 0 ]]; +if [ $UID -ne 0 ]; then echo "Sorry, this file needs to be executed as root!" exit 1; @@ -478,11 +479,10 @@ Failed to load in module tun
Want more? - This is as far as I want to go with a book targeting Linux - starters. You should now have enough luggage to make it through various - online resources and other books, and still have a reference at your - disposal for your day-to-day activities on your (Gentoo) Linux - system. + This is as far as I want to go with a book targeting Linux starters. + You should now have enough luggage to make it through various online + resources and other books, and still have a reference at your disposal for + your day-to-day activities on your (Gentoo) Linux system. I would like to thank you for reading this document, and if you have any particular questions or feedback, please don't hesitate to contact me