X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/aa16e3a5d13953016b5f30337644389222b2c86a..c790f2ff4d7b27e3765965d422e5df6e24214d21:/blog/index.html diff --git a/blog/index.html b/blog/index.html index 01b9202911..0f2916eff4 100644 --- a/blog/index.html +++ b/blog/index.html @@ -19,6 +19,62 @@ +
+
Calling tasksel like the installer, while still getting useful output
+
2010-06-16 14:55
+
+

A few times I have had the need to simulate the way tasksel +installs packages during the normal debian-installer run. Until now, +I have ended up letting tasksel do the work, with the annoying problem +of not getting any feedback at all when something fails (like a +conffile question from dpkg or a download that fails), using code like +this: + +

+export DEBIAN_FRONTEND=noninteractive
+tasksel --new-install
+
+ +This would invoke tasksel, let its automatic task selection pick the +tasks to install, and continue to install the requested tasks without +any output what so ever. + +Recently I revisited this problem while working on the automatic +package upgrade testing, because tasksel would some times hang without +any useful feedback, and I want to see what is going on when it +happen. Then it occured to me, I can parse the output from tasksel +when asked to run in test mode, and use that aptitude command line +printed by tasksel then to simulate the tasksel run. I ended up using +code like this: + +
+export DEBIAN_FRONTEND=noninteractive
+cmd="$(in_target tasksel -t --new-install | sed 's/debconf-apt-progress -- //')"
+$cmd
+
+ +

The content of $cmd is typically something like "aptitude -q +--without-recommends -o APT::Install-Recommends=no -y install +~t^desktop$ ~t^gnome-desktop$ ~t^laptop$ ~pstandard ~prequired +~pimportant", which will install the gnome desktop task, the +laptop task and all packages with priority standard , required and +important, just like tasksel would have done it during +installation.

+ +

A better approach is probably to extend tasksel to be able to +install packages without using debconf-apt-progress, for use cases +like this.

+
+
+ + + + Tags: debian, english, nuug. + +
+
+
+
Vinmonopolet bryter loven åpenlyst - og flere planlegger å gjøre det samme
2010-06-16 11:00
@@ -673,28 +729,6 @@ collector.

-
-
Togsatsing på norsk, mot sykkel
-
2010-06-02 23:45
-
-

Det står dårlig til med toget når en finner på å la det -kappkjøre -med sykkel... Jeg tror det trengs strukturendringer for å få -fikset på togproblemene i Norge.

- -

Mon tro hva toglinje mellom Narvik og Tromsø ville hatt slags -effekt på området der?

-
-
- - - - Tags: norsk. - -
-
-
-

RSS feed