diff options
author | Roger Leigh <rleigh@debian.org> | 2006-07-03 22:13:32 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2006-07-03 22:13:32 +0000 |
commit | c82fad09d69d975d0e22a6da088e7a1f0f2e1765 (patch) | |
tree | bf3287ef7a96747900d6c75435c1290346c8d2d3 | |
parent | 0f0dc432a076db4f74eafb432b6029875227a2f9 (diff) | |
download | schroot-c82fad09d69d975d0e22a6da088e7a1f0f2e1765.tar.gz |
* test/sbuild-run-parts.cc: Add run-parts tests.
* test/run-parts.ex?: Add run-parts test scripts.
* configure.ac: Add check for libboost_regex.
* sbuild/Makefile.am: Add sbuild-run-parts sources.
* sbuild/sbuild-run-parts.(cc|h): New files. This class
reproduces the functionality of run-parts(8).
* sbuild/sbuild-util.cc (exec): Add (moved from sbuild-session).
* sbuild/sbuild-session.cc (exec): Remove.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | po/en_GB.po | 512 | ||||
-rw-r--r-- | po/sv.po | 514 | ||||
-rw-r--r-- | po/vi.po | 513 | ||||
-rw-r--r-- | sbuild/Makefile.am | 2 | ||||
-rw-r--r-- | sbuild/sbuild-run-parts.cc | 253 | ||||
-rw-r--r-- | sbuild/sbuild-run-parts.h | 162 | ||||
-rw-r--r-- | sbuild/sbuild-session.cc | 19 | ||||
-rw-r--r-- | sbuild/sbuild-session.h | 14 | ||||
-rw-r--r-- | sbuild/sbuild-util.cc | 18 | ||||
-rw-r--r-- | sbuild/sbuild-util.h | 15 | ||||
-rw-r--r-- | test/Makefile.am | 12 | ||||
-rwxr-xr-x | test/run-parts.ex1/10test1 | 4 | ||||
-rwxr-xr-x | test/run-parts.ex1/20test2 | 8 | ||||
-rwxr-xr-x | test/run-parts.ex1/30test3 | 8 | ||||
-rw-r--r-- | test/run-parts.ex3/50invalid | 1 | ||||
-rw-r--r-- | test/sbuild-run-parts.cc | 138 |
18 files changed, 1356 insertions, 868 deletions
@@ -1,5 +1,22 @@ 2006-07-03 Roger Leigh <rleigh@debian.org> + * test/sbuild-run-parts.cc: Add run-parts tests. + + * test/run-parts.ex?: Add run-parts test scripts. + + * configure.ac: Add check for libboost_regex. + + * sbuild/Makefile.am: Add sbuild-run-parts sources. + + * sbuild/sbuild-run-parts.(cc|h): New files. This class + reproduces the functionality of run-parts(8). + + * sbuild/sbuild-util.cc (exec): Add (moved from sbuild-session). + + * sbuild/sbuild-session.cc (exec): Remove. + +2006-07-03 Roger Leigh <rleigh@debian.org> + * test/sbuild-personality.cc: Sync tests with current personality behaviour. diff --git a/configure.ac b/configure.ac index 6c79fe21..76a3077a 100644 --- a/configure.ac +++ b/configure.ac @@ -145,10 +145,22 @@ LDFLAGS="${LDFLAGS} -lboost_program_options" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/program_options.hpp>], [boost::program_options::variables_map::variables_map dummy()])], [AC_MSG_RESULT([yes]) - BOOST_LIBS="-lboost_program_options"], + BOOST_LIBS="${BOOST_LIBS} -lboost_program_options"], [AC_MSG_RESULT([no]) AC_MSG_FAILURE([libboost_program_options (Boost C++ Libraries) is not installed, but is required by schroot])]) LDFLAGS="${saved_ldflags}" + +AC_MSG_CHECKING([for boost::regex in -lboost_regex]) +saved_ldflags="${LDFLAGS}" +LDFLAGS="${LDFLAGS} -lboost_regex" +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/regex.hpp>], + [boost::regex("^foo[bar]$")])], + [AC_MSG_RESULT([yes]) + BOOST_LIBS="${BOOST_LIBS} -lboost_regex"], + [AC_MSG_RESULT([no]) + AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])]) +LDFLAGS="${saved_ldflags}" + AC_SUBST([BOOST_LIBS]) AC_MSG_CHECKING([__gnu_cxx::stdio_filebuf construction semantics]) diff --git a/po/en_GB.po b/po/en_GB.po index b421809a..7c380652 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: schroot 0.1.2\n" "Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n" -"POT-Creation-Date: 2006-06-26 11:15+0100\n" +"POT-Creation-Date: 2006-07-03 23:11+0100\n" "PO-Revision-Date: 2006-06-23 16:45+0100\n" "Last-Translator: Roger Leigh <rleigh@debian.org>\n" "Language-Team: English <rleigh@debian.org>\n" @@ -14,12 +14,8 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: dchroot/dchroot.cc:65 dchroot-dsa/dchroot-dsa.cc:65 schroot/schroot.cc:65 -#, boost-format -msgid "Run \"%1% --help\" to list usage example and all available options" -msgstr "" - -#: dchroot/dchroot.cc:77 dchroot-dsa/dchroot-dsa.cc:77 schroot/schroot.cc:77 +#: dchroot/dchroot.cc:61 dchroot-dsa/dchroot-dsa.cc:61 schroot/schroot.cc:61 +#: schroot/schroot-listmounts.cc:67 schroot/schroot-releaselock.cc:67 #, fuzzy msgid "An unknown exception occured" msgstr "Unknown action specified" @@ -29,48 +25,42 @@ msgstr "Unknown action specified" msgid "%1% chroot (dchroot compatibility)" msgstr "Running schroot in dchroot compatibility mode" -#: dchroot/dchroot-options.cc:56 +#: dchroot/dchroot-main.cc:46 schroot/schroot-main.cc:42 +#, fuzzy +msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" +msgstr " [OPTION...] [COMMAND] - run command or shell in a chroot" + +#: dchroot/dchroot-options.cc:51 msgid "Print path to selected chroot" msgstr "Print path to selected chroot" -#: dchroot/dchroot-options.cc:60 dchroot-dsa/dchroot-dsa-options.cc:62 -#: schroot/schroot-options.cc:62 +#: dchroot/dchroot-options.cc:55 dchroot-dsa/dchroot-dsa-options.cc:57 +#: schroot/schroot-options.cc:57 msgid "Select all chroots" msgstr "Select all chroots" -#: dchroot/dchroot-options.cc:64 schroot/schroot-options.cc:70 +#: dchroot/dchroot-options.cc:59 schroot/schroot-options.cc:65 msgid "Preserve user environment" msgstr "Preserve user environment" -#: dchroot/dchroot-options.cc:73 dchroot-dsa/dchroot-dsa-options.cc:71 -#: schroot/schroot-listmounts-options.cc:64 schroot/schroot-options.cc:92 -#: schroot/schroot-releaselock-options.cc:67 -msgid "Usage:" -msgstr "Usage:" - -#: dchroot/dchroot-options.cc:76 schroot/schroot-options.cc:95 -#, fuzzy -msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" -msgstr " [OPTION...] [COMMAND] - run command or shell in a chroot" - -#: dchroot/dchroot-options.cc:99 dchroot-dsa/dchroot-dsa-options.cc:104 +#: dchroot/dchroot-options.cc:82 dchroot-dsa/dchroot-dsa-options.cc:87 #, fuzzy msgid "Only one command may be specified" msgstr "Only one action may be specified" -#: dchroot/dchroot-options.cc:104 schroot/schroot-options-base.cc:157 +#: dchroot/dchroot-options.cc:87 schroot/schroot-options-base.cc:125 msgid "--quiet and --verbose may not be used at the same time" msgstr "--quiet and --verbose may not be used at the same time" -#: dchroot/dchroot-options.cc:106 schroot/schroot-options-base.cc:159 +#: dchroot/dchroot-options.cc:89 schroot/schroot-options-base.cc:127 msgid "Using verbose output" msgstr "Using verbose output" -#: dchroot/dchroot-options.cc:112 schroot/schroot-options-base.cc:165 +#: dchroot/dchroot-options.cc:95 schroot/schroot-options-base.cc:133 msgid "--chroot and --all may not be used at the same time" msgstr "--chroot and --all may not be used at the same time" -#: dchroot/dchroot-options.cc:114 schroot/schroot-options-base.cc:167 +#: dchroot/dchroot-options.cc:97 schroot/schroot-options-base.cc:135 msgid "Using --chroots only" msgstr "Using --chroots only" @@ -93,20 +83,20 @@ msgstr "[%1% chroot] Running command: “%2%”" msgid "%1% chroot (dchroot-dsa compatibility)" msgstr "Running schroot in dchroot compatibility mode" -#: dchroot-dsa/dchroot-dsa-options.cc:58 -msgid "Print paths to available chroots" -msgstr "Print paths to available chroots" - -#: dchroot-dsa/dchroot-dsa-options.cc:74 +#: dchroot-dsa/dchroot-dsa-main.cc:45 #, fuzzy msgid "[OPTION...] chroot [COMMAND] - run command or shell in a chroot" msgstr " [OPTION...] chroot [COMMAND] - run command or shell in a chroot" -#: dchroot-dsa/dchroot-dsa-options.cc:108 sbuild/sbuild-session.cc:72 +#: dchroot-dsa/dchroot-dsa-options.cc:53 +msgid "Print paths to available chroots" +msgstr "Print paths to available chroots" + +#: dchroot-dsa/dchroot-dsa-options.cc:91 sbuild/sbuild-session.cc:73 msgid "Command must have an absolute path" msgstr "" -#: dchroot-dsa/dchroot-dsa-options.cc:116 +#: dchroot-dsa/dchroot-dsa-options.cc:100 #, fuzzy msgid "No chroot specified" msgstr "no group specified" @@ -120,18 +110,18 @@ msgid "User not found" msgstr "User not found" #: sbuild/sbuild-auth.cc:55 -msgid "Access not authorised" -msgstr "Access not authorised" - -#: sbuild/sbuild-auth.cc:56 msgid "Authentication failed" msgstr "Authentication failed" +#: sbuild/sbuild-auth.cc:56 +msgid "Access not authorised" +msgstr "Access not authorised" + #: sbuild/sbuild-auth.cc:57 msgid "PAM is already initialised" msgstr "PAM is already initialised" -#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:79 +#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:80 msgid "PAM error" msgstr "PAM error" @@ -176,11 +166,11 @@ msgstr "Failed to get terminal settings" msgid "Unsupported conversation type" msgstr "Unsupported conversation type" -#: sbuild/sbuild-chroot-block-device.cc:179 +#: sbuild/sbuild-chroot-block-device.cc:185 msgid "Device" msgstr "Device" -#: sbuild/sbuild-chroot-block-device.cc:181 +#: sbuild/sbuild-chroot-block-device.cc:187 msgid "Mount Options" msgstr "Mount Options" @@ -256,93 +246,93 @@ msgstr "Failed to unlink session file" msgid "Failed to write session file" msgstr "Failed to write session file" -#: sbuild/sbuild-chroot.cc:430 +#: sbuild/sbuild-chroot.cc:437 msgid "Name" msgstr "Name" -#: sbuild/sbuild-chroot.cc:431 +#: sbuild/sbuild-chroot.cc:438 msgid "Description" msgstr "Description" -#: sbuild/sbuild-chroot.cc:432 +#: sbuild/sbuild-chroot.cc:439 msgid "Type" msgstr "Type" -#: sbuild/sbuild-chroot.cc:433 +#: sbuild/sbuild-chroot.cc:440 msgid "Priority" msgstr "Priority" -#: sbuild/sbuild-chroot.cc:434 +#: sbuild/sbuild-chroot.cc:441 msgid "Users" msgstr "Users" -#: sbuild/sbuild-chroot.cc:435 +#: sbuild/sbuild-chroot.cc:442 msgid "Groups" msgstr "Groups" -#: sbuild/sbuild-chroot.cc:436 +#: sbuild/sbuild-chroot.cc:443 msgid "Root Users" msgstr "Root Users" -#: sbuild/sbuild-chroot.cc:437 +#: sbuild/sbuild-chroot.cc:444 msgid "Root Groups" msgstr "Root Groups" -#: sbuild/sbuild-chroot.cc:438 +#: sbuild/sbuild-chroot.cc:445 msgid "Aliases" msgstr "Aliases" -#: sbuild/sbuild-chroot.cc:439 +#: sbuild/sbuild-chroot.cc:446 msgid "Run Setup Scripts" msgstr "Run Setup Scripts" -#: sbuild/sbuild-chroot.cc:440 +#: sbuild/sbuild-chroot.cc:447 msgid "Run Execution Scripts" msgstr "Run Execution Scripts" -#: sbuild/sbuild-chroot.cc:442 +#: sbuild/sbuild-chroot.cc:449 msgid "Session Managed" msgstr "Session Managed" -#: sbuild/sbuild-chroot.cc:446 +#: sbuild/sbuild-chroot.cc:453 msgid "Command Prefix" msgstr "Command Prefix" -#: sbuild/sbuild-chroot.cc:448 +#: sbuild/sbuild-chroot.cc:455 msgid "Personality" msgstr "Personality" -#: sbuild/sbuild-chroot.cc:452 +#: sbuild/sbuild-chroot.cc:459 msgid "Location" msgstr "Location" -#: sbuild/sbuild-chroot.cc:454 +#: sbuild/sbuild-chroot.cc:461 msgid "Mount Location" msgstr "Mount Location" -#: sbuild/sbuild-chroot.cc:456 +#: sbuild/sbuild-chroot.cc:463 msgid "Path" msgstr "Path" -#: sbuild/sbuild-chroot.cc:458 +#: sbuild/sbuild-chroot.cc:465 msgid "Mount Device" msgstr "Mount Device" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 #, fuzzy msgid "Session" msgstr "Session Managed" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 msgid "Chroot" msgstr "" -#: sbuild/sbuild-chroot.cc:636 +#: sbuild/sbuild-chroot.cc:612 #, boost-format msgid "%1% chroot: personality \"%2%\" is unknown.\n" msgstr "%1% chroot: personality “%2%” is unknown.\n" -#: sbuild/sbuild-chroot.cc:639 +#: sbuild/sbuild-chroot.cc:615 #, boost-format msgid "Valid personalities: %1%\n" msgstr "Valid personalities: %1%\n" @@ -384,24 +374,19 @@ msgstr "%1% chroot: duplicate names are not allowed" msgid "Available chroots: " msgstr "Available chroots: " -#: sbuild/sbuild-chroot-config.cc:487 -#, fuzzy, boost-format -msgid "%1% chroot" -msgstr "%1%: No such chroot" - -#: sbuild/sbuild-chroot-file.cc:147 +#: sbuild/sbuild-chroot-file.cc:162 msgid "File" msgstr "File" -#: sbuild/sbuild-chroot-file.cc:148 +#: sbuild/sbuild-chroot-file.cc:163 msgid "File Repack" msgstr "File Repack" -#: sbuild/sbuild-chroot-lvm-snapshot.cc:203 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:206 msgid "LVM Snapshot Device" msgstr "LVM Snapshot Device" -#: sbuild/sbuild-chroot-lvm-snapshot.cc:205 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:208 msgid "LVM Snapshot Options" msgstr "LVM Snapshot Options" @@ -439,21 +424,21 @@ msgstr "false" msgid "--- %1% ---" msgstr " ——— Chroot ———\n" -#: sbuild/sbuild-keyfile.cc:363 +#: sbuild/sbuild-keyfile.cc:395 #, boost-format msgid "%1% chroot: A deprecated parameter \"%2%\" has been specified." msgstr "%1% chroot: A deprecated parameter “%2%” has been specified." -#: sbuild/sbuild-keyfile.cc:367 +#: sbuild/sbuild-keyfile.cc:399 msgid "This option will be removed in the future." msgstr "This option will be removed in the future." -#: sbuild/sbuild-keyfile.cc:371 +#: sbuild/sbuild-keyfile.cc:403 #, boost-format msgid "%1% chroot: An obsolete parameter \"%2%\" has been specified." msgstr "%1% chroot: An obsolete parameter “%2%” has been specified." -#: sbuild/sbuild-keyfile.cc:375 +#: sbuild/sbuild-keyfile.cc:407 msgid "This option has been removed, and no longer has any effect." msgstr "This option has been removed, and no longer has any effect." @@ -646,415 +631,388 @@ msgstr "[%1%] %2%: %3%" msgid "Failed to set personality" msgstr "Failed to set personality" -#: sbuild/sbuild-session.cc:59 +#: sbuild/sbuild-session.cc:60 #, fuzzy msgid "Failed to change to directory" msgstr "Failed to open directory" -#: sbuild/sbuild-session.cc:60 +#: sbuild/sbuild-session.cc:61 #, fuzzy msgid "Falling back to directory" msgstr "Falling back to home directory ‘%1%’" -#: sbuild/sbuild-session.cc:61 +#: sbuild/sbuild-session.cc:62 msgid "Child dumped core" msgstr "Child dumped core" -#: sbuild/sbuild-session.cc:62 +#: sbuild/sbuild-session.cc:63 msgid "Child exited abnormally (reason unknown; not a signal or core dump)" msgstr "Child exited abnormally (reason unknown; not a signal or core dump)" -#: sbuild/sbuild-session.cc:63 +#: sbuild/sbuild-session.cc:64 msgid "Failed to fork child" msgstr "Failed to fork child" -#: sbuild/sbuild-session.cc:64 +#: sbuild/sbuild-session.cc:65 msgid "Child terminated by signal" msgstr "Child terminated by signal" -#: sbuild/sbuild-session.cc:65 +#: sbuild/sbuild-session.cc:66 msgid "Wait for child failed" msgstr "Wait for child failed" -#: sbuild/sbuild-session.cc:66 +#: sbuild/sbuild-session.cc:67 #, fuzzy msgid "Failed to change root to directory" msgstr "Failed to open directory" -#: sbuild/sbuild-session.cc:67 +#: sbuild/sbuild-session.cc:68 #, fuzzy msgid "No chroot found matching alias" msgstr "No chroot found matching alias ‘%1%’" -#: sbuild/sbuild-session.cc:68 +#: sbuild/sbuild-session.cc:69 msgid "Failed to lock chroot" msgstr "Failed to lock chroot" -#: sbuild/sbuild-session.cc:69 +#: sbuild/sbuild-session.cc:70 msgid "Chroot setup failed" msgstr "Chroot setup failed" -#: sbuild/sbuild-session.cc:70 +#: sbuild/sbuild-session.cc:71 msgid "Failed to find chroot" msgstr "Failed to find chroot" -#: sbuild/sbuild-session.cc:71 +#: sbuild/sbuild-session.cc:72 msgid "Failed to unlock chroot" msgstr "Failed to unlock chroot" -#: sbuild/sbuild-session.cc:73 +#: sbuild/sbuild-session.cc:74 #, fuzzy msgid "Failed to execute" msgstr "Failed to set timeout" -#: sbuild/sbuild-session.cc:74 +#: sbuild/sbuild-session.cc:75 #, fuzzy msgid "Failed to get supplementary groups" msgstr "Could not set supplementary group IDs" -#: sbuild/sbuild-session.cc:75 +#: sbuild/sbuild-session.cc:76 #, fuzzy msgid "Failed to get supplementary group count" msgstr "Can't get supplementary group count: %1%" -#: sbuild/sbuild-session.cc:76 +#: sbuild/sbuild-session.cc:77 #, fuzzy msgid "Failed to set group" msgstr "Failed to set timeout" -#: sbuild/sbuild-session.cc:77 +#: sbuild/sbuild-session.cc:78 #, fuzzy msgid "Failed to set supplementary groups" msgstr "Could not set supplementary group IDs" -#: sbuild/sbuild-session.cc:78 +#: sbuild/sbuild-session.cc:79 #, fuzzy msgid "Group not found" msgstr "%1%: Group not found" -#: sbuild/sbuild-session.cc:80 +#: sbuild/sbuild-session.cc:81 #, fuzzy msgid "Failed to drop root permissions" msgstr "Failed to drop root permissions." -#: sbuild/sbuild-session.cc:81 +#: sbuild/sbuild-session.cc:82 #, fuzzy msgid "Shell not available" msgstr "%1%: Shell not available: %2%" -#: sbuild/sbuild-session.cc:82 +#: sbuild/sbuild-session.cc:83 #, fuzzy msgid "Falling back to shell" msgstr "Falling back to ‘%1%’" -#: sbuild/sbuild-session.cc:83 +#: sbuild/sbuild-session.cc:84 msgid "Caught hangup signal" msgstr "Caught hangup signal" -#: sbuild/sbuild-session.cc:84 +#: sbuild/sbuild-session.cc:85 msgid "Failed to set hangup signal handler" msgstr "Failed to set hangup signal handler" -#: sbuild/sbuild-session.cc:85 +#: sbuild/sbuild-session.cc:86 #, fuzzy msgid "Failed to set user" msgstr "Failed to set timeout" -#: sbuild/sbuild-session.cc:86 +#: sbuild/sbuild-session.cc:87 msgid "User switching is not permitted" msgstr "User switching is not permitted" -#: sbuild/sbuild-session.cc:659 +#: sbuild/sbuild-session.cc:652 #, fuzzy, boost-format msgid "[%1% chroot] Running login shell: \"%4%\"" msgstr "[%1% chroot] Running login shell: “%2%”" -#: sbuild/sbuild-session.cc:661 +#: sbuild/sbuild-session.cc:654 #, fuzzy, boost-format msgid "[%1% chroot] Running shell: \"%4%\"" msgstr "[%1% chroot] Running shell: “%2%”" -#: sbuild/sbuild-session.cc:667 +#: sbuild/sbuild-session.cc:660 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\"" msgstr "[%1% chroot] (%2%→%3%) Running login shell: “%4%”" -#: sbuild/sbuild-session.cc:669 +#: sbuild/sbuild-session.cc:662 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running shell: \"%4%\"" msgstr "[%1% chroot] (%2%→%3%) Running shell: “%4%”" -#: sbuild/sbuild-session.cc:704 +#: sbuild/sbuild-session.cc:697 #, fuzzy, boost-format msgid "[%1% chroot] Running command: \"%4%\"" msgstr "[%1% chroot] Running command: “%2%”" -#: sbuild/sbuild-session.cc:706 +#: sbuild/sbuild-session.cc:699 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\"" msgstr "[%1% chroot] (%2%→%3%) Running command: “%4%”" -#: sbuild/sbuild-session.cc:889 +#: sbuild/sbuild-session.cc:882 #, boost-format msgid "stage=%1%" msgstr "stage=%1%" -#: sbuild/sbuild-session.cc:1035 +#: sbuild/sbuild-session.cc:1028 msgid "terminating immediately" msgstr "" -#: schroot/schroot-listmounts.cc:61 schroot/schroot-main.cc:59 -#: schroot/schroot-releaselock.cc:56 -#, fuzzy, boost-format -msgid "%1% (Debian sbuild) %2% (%3%)\n" -msgstr "%1% (Debian sbuild) %2%\n" - -#: schroot/schroot-listmounts.cc:65 schroot/schroot-main.cc:63 -#: schroot/schroot-releaselock.cc:60 -msgid "" -"Written by Roger Leigh\n" -"\n" +#: schroot/schroot-listmounts-options.cc:41 +msgid "Mount" msgstr "" -"Written by Roger Leigh\n" -"\n" - -#: schroot/schroot-listmounts.cc:66 schroot/schroot-main.cc:64 -#: schroot/schroot-releaselock.cc:61 -msgid "Copyright (C) 2004-2006 Roger Leigh\n" -msgstr "Copyright © 2004-2006 Roger Leigh\n" - -#: schroot/schroot-listmounts.cc:67 schroot/schroot-main.cc:65 -#: schroot/schroot-releaselock.cc:62 -msgid "" -"This is free software; see the source for copying conditions. There is NO\n" -"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" -msgstr "" -"This is free software; see the source for copying conditions. There is NO\n" -"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" - -#: schroot/schroot-listmounts.cc:89 -#, boost-format -msgid "%1%: Failed to open: %2%" -msgstr "%1%: failed to open directory: %2%" - -#: schroot/schroot-listmounts.cc:112 -#, boost-format -msgid "%1%: Failed to close: %2%" -msgstr "%1%: Failed to close: %2%" -#: schroot/schroot-listmounts.cc:158 -msgid "No mountpoint specified" -msgstr "No mountpoint specified" - -#: schroot/schroot-listmounts-options.cc:42 schroot/schroot-options-base.cc:48 -#: schroot/schroot-releaselock-options.cc:43 -msgid "General options" -msgstr "General options" - -#: schroot/schroot-listmounts-options.cc:44 schroot/schroot-options-base.cc:69 -#: schroot/schroot-releaselock-options.cc:45 -msgid "Show help options" -msgstr "Show help options" - -#: schroot/schroot-listmounts-options.cc:46 schroot/schroot-options-base.cc:71 -#: schroot/schroot-releaselock-options.cc:47 -msgid "Print version information" -msgstr "Print version information" - -#: schroot/schroot-listmounts-options.cc:48 -#: schroot/schroot-releaselock-options.cc:49 -msgid "Lock options" -msgstr "Lock options" - -#: schroot/schroot-listmounts-options.cc:51 +#: schroot/schroot-listmounts-options.cc:56 msgid "Mountpoint to check (full path)" msgstr "Mountpoint to check (full path)" -#: schroot/schroot-listmounts-options.cc:65 +#: schroot/schroot-listmounts-options.cc:85 #, fuzzy -msgid "schroot-listmounts [OPTION...] - list mounts" -msgstr " schroot-listmounts [OPTION...] - list mounts" +msgid "No mount point specified" +msgstr "No mountpoint specified" -#: schroot/schroot-main.cc:74 +#: schroot/schroot-listmounts-options.cc:92 +#: schroot/schroot-options-base.cc:214 +#: schroot/schroot-releaselock-options.cc:95 +msgid "Only one action may be specified" +msgstr "Only one action may be specified" + +#: schroot/schroot-main.cc:55 #, fuzzy, boost-format msgid "schroot configuration generated by %1% %2% on %3%" msgstr "schroot configuration generated by %1% %2%" -#: schroot/schroot-main.cc:139 -#, boost-format -msgid "%1%: No such chroot" -msgstr "%1%: No such chroot" - -#: schroot/schroot-main.cc:195 -msgid "Error saving terminal settings" -msgstr "Error saving terminal settings" - -#: schroot/schroot-main.cc:227 -#, boost-format -msgid "No chroots are defined in %1% or %2%" -msgstr "No chroots are defined in %1% or %2%" - -#: schroot/schroot-main.cc:235 -#, boost-format -msgid "No chroots are defined in %1%" -msgstr "No chroots are defined in %1%" - -#: schroot/schroot-main.cc:252 -#, boost-format -msgid "The specified chroots are not defined in %1%" -msgstr "The specified chroots are not defined in %1%" - -#: schroot/schroot-main.cc:279 -msgid "Only one chroot may be specified when beginning a session" -msgstr "Only one chroot may be specified when beginning a session" - -#: schroot/schroot-main.cc:336 schroot/schroot-main.cc:352 -msgid "Error restoring terminal settings" -msgstr "Error restoring terminal settings" - -#: schroot/schroot-options-base.cc:49 +#: schroot/schroot-options-base.cc:46 msgid "Chroot selection" msgstr "Chroot selection" -#: schroot/schroot-options-base.cc:50 +#: schroot/schroot-options-base.cc:47 msgid "Chroot environment" msgstr "Chroot environment" -#: schroot/schroot-options-base.cc:51 +#: schroot/schroot-options-base.cc:48 msgid "Session management" msgstr "Session management" -#: schroot/schroot-options-base.cc:52 -msgid "Hidden options" -msgstr "Hidden options" - -#: schroot/schroot-options-base.cc:73 -msgid "Show less output" -msgstr "Show less output" - -#: schroot/schroot-options-base.cc:75 -msgid "Show more output" -msgstr "Show more output" - -#: schroot/schroot-options-base.cc:77 +#: schroot/schroot-options-base.cc:63 msgid "List available chroots" msgstr "List available chroots" -#: schroot/schroot-options-base.cc:79 +#: schroot/schroot-options-base.cc:65 msgid "Show information about selected chroots" msgstr "Show information about selected chroots" -#: schroot/schroot-options-base.cc:81 +#: schroot/schroot-options-base.cc:67 msgid "Dump configuration of selected chroots" msgstr "Dump configuration of selected chroots" -#: schroot/schroot-options-base.cc:85 +#: schroot/schroot-options-base.cc:71 msgid "Use specified chroot" msgstr "Use specified chroot" -#: schroot/schroot-options-base.cc:89 +#: schroot/schroot-options-base.cc:75 msgid "Command to run" msgstr "Command to run" -#: schroot/schroot-options-base.cc:91 -msgid "Enable debugging messages" -msgstr "" - -#: schroot/schroot-options-base.cc:190 +#: schroot/schroot-options-base.cc:158 msgid "" "Only one chroot may be specified when recovering, running or ending a session" msgstr "" "Only one chroot may be specified when recovering, running or ending a session" -#: schroot/schroot-options-base.cc:215 +#: schroot/schroot-options-base.cc:184 msgid "--chroot may not be used with --list" msgstr "--chroot may not be used with --list" -#: schroot/schroot-options-base.cc:237 +#: schroot/schroot-options-base.cc:206 #, fuzzy msgid "Unknown action specified" msgstr "Only one action may be specified" -#: schroot/schroot-options-base.cc:245 -msgid "Only one action may be specified" -msgstr "Only one action may be specified" - -#: schroot/schroot-options.cc:56 +#: schroot/schroot-options.cc:51 msgid "Print location of selected chroots" msgstr "Print location of selected chroots" -#: schroot/schroot-options.cc:60 +#: schroot/schroot-options.cc:55 msgid "Select all chroots and active sessions" msgstr "Select all chroots and active sessions" -#: schroot/schroot-options.cc:64 +#: schroot/schroot-options.cc:59 msgid "Select all active sessions" msgstr "Select all active sessions" -#: schroot/schroot-options.cc:68 +#: schroot/schroot-options.cc:63 msgid "Username (default current user)" msgstr "Username (default current user)" -#: schroot/schroot-options.cc:74 +#: schroot/schroot-options.cc:69 msgid "Begin a session; returns a session ID" msgstr "Begin a session; returns a session ID" -#: schroot/schroot-options.cc:76 +#: schroot/schroot-options.cc:71 msgid "Recover an existing session" msgstr "Recover an existing session" -#: schroot/schroot-options.cc:78 +#: schroot/schroot-options.cc:73 msgid "Run an existing session" msgstr "Run an existing session" -#: schroot/schroot-options.cc:80 +#: schroot/schroot-options.cc:75 msgid "End an existing session" msgstr "End an existing session" -#: schroot/schroot-options.cc:82 +#: schroot/schroot-options.cc:77 msgid "Force operation, even if it fails" msgstr "Force operation, even if it fails" -#: schroot/schroot-releaselock.cc:105 +#: schroot/schroot-releaselock-options.cc:42 +msgid "Lock" +msgstr "" + +#: schroot/schroot-releaselock-options.cc:57 +msgid "Device to unlock (full path)" +msgstr "Device to unlock (full path)" + +#: schroot/schroot-releaselock-options.cc:59 +msgid "Process ID owning the lock" +msgstr "Process ID owning the lock" + +#: schroot/schroot-releaselock-options.cc:88 msgid "No device specified" msgstr "No device specified" -#: schroot/schroot-releaselock.cc:111 -msgid "No pid specified; forcing release of lock" -msgstr "No pid specified; forcing release of lock" +#~ msgid "Usage:" +#~ msgstr "Usage:" -#: schroot/schroot-releaselock.cc:120 -#, boost-format -msgid "Failed to stat device %1%: %2%" -msgstr "Failed to stat device %1%: %2%" +#, fuzzy +#~ msgid "%1% chroot" +#~ msgstr "%1%: No such chroot" -#: schroot/schroot-releaselock.cc:128 -#, boost-format -msgid "%1% is not a block device" -msgstr "%1% is not a block device" +#, fuzzy +#~ msgid "%1% (Debian sbuild) %2% (%3%)\n" +#~ msgstr "%1% (Debian sbuild) %2%\n" -#: schroot/schroot-releaselock.cc:136 -#, boost-format -msgid "%1%: failed to release device lock" -msgstr "%1%: failed to release device lock" +#~ msgid "" +#~ "Written by Roger Leigh\n" +#~ "\n" +#~ msgstr "" +#~ "Written by Roger Leigh\n" +#~ "\n" -#: schroot/schroot-releaselock.cc:143 -#, boost-format -msgid "%1%: failed to release device lock owned by pid %2%" -msgstr "%1%: failed to release device lock owned by pid %2%" +#~ msgid "Copyright (C) 2004-2006 Roger Leigh\n" +#~ msgstr "Copyright © 2004-2006 Roger Leigh\n" -#: schroot/schroot-releaselock-options.cc:52 -msgid "Device to unlock (full path)" -msgstr "Device to unlock (full path)" +#~ msgid "" +#~ "This is free software; see the source for copying conditions. There is " +#~ "NO\n" +#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " +#~ "PURPOSE.\n" +#~ msgstr "" +#~ "This is free software; see the source for copying conditions. There is " +#~ "NO\n" +#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " +#~ "PURPOSE.\n" -#: schroot/schroot-releaselock-options.cc:54 -msgid "Process ID owning the lock" -msgstr "Process ID owning the lock" +#~ msgid "%1%: Failed to open: %2%" +#~ msgstr "%1%: failed to open directory: %2%" + +#~ msgid "%1%: Failed to close: %2%" +#~ msgstr "%1%: Failed to close: %2%" + +#~ msgid "General options" +#~ msgstr "General options" + +#~ msgid "Show help options" +#~ msgstr "Show help options" + +#~ msgid "Print version information" +#~ msgstr "Print version information" + +#~ msgid "Lock options" +#~ msgstr "Lock options" + +#, fuzzy +#~ msgid "schroot-listmounts [OPTION...] - list mounts" +#~ msgstr " schroot-listmounts [OPTION...] - list mounts" + +#~ msgid "%1%: No such chroot" +#~ msgstr "%1%: No such chroot" + +#~ msgid "Error saving terminal settings" +#~ msgstr "Error saving terminal settings" + +#~ msgid "No chroots are defined in %1% or %2%" +#~ msgstr "No chroots are defined in %1% or %2%" + +#~ msgid "No chroots are defined in %1%" +#~ msgstr "No chroots are defined in %1%" + +#~ msgid "The specified chroots are not defined in %1%" +#~ msgstr "The specified chroots are not defined in %1%" + +#~ msgid "Only one chroot may be specified when beginning a session" +#~ msgstr "Only one chroot may be specified when beginning a session" + +#~ msgid "Error restoring terminal settings" +#~ msgstr "Error restoring terminal settings" + +#~ msgid "Hidden options" +#~ msgstr "Hidden options" + +#~ msgid "Show less output" +#~ msgstr "Show less output" + +#~ msgid "Show more output" +#~ msgstr "Show more output" + +#~ msgid "No pid specified; forcing release of lock" +#~ msgstr "No pid specified; forcing release of lock" + +#~ msgid "Failed to stat device %1%: %2%" +#~ msgstr "Failed to stat device %1%: %2%" + +#~ msgid "%1% is not a block device" +#~ msgstr "%1% is not a block device" + +#~ msgid "%1%: failed to release device lock" +#~ msgstr "%1%: failed to release device lock" + +#~ msgid "%1%: failed to release device lock owned by pid %2%" +#~ msgstr "%1%: failed to release device lock owned by pid %2%" -#: schroot/schroot-releaselock-options.cc:68 #, fuzzy -msgid "schroot-releaselock [OPTION...] - release a device lock" -msgstr " schroot-releaselock [OPTION...] - release a device lock" +#~ msgid "schroot-releaselock [OPTION...] - release a device lock" +#~ msgstr " schroot-releaselock [OPTION...] - release a device lock" #~ msgid "To allow users access to the chroots, use the users or groups keys." #~ msgstr "To allow users access to the chroots, use the users or groups keys." @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: schroot\n" "Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n" -"POT-Creation-Date: 2006-06-26 11:15+0100\n" +"POT-Creation-Date: 2006-07-03 23:11+0100\n" "PO-Revision-Date: 2006-06-17 22:13+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -15,12 +15,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: dchroot/dchroot.cc:65 dchroot-dsa/dchroot-dsa.cc:65 schroot/schroot.cc:65 -#, boost-format -msgid "Run \"%1% --help\" to list usage example and all available options" -msgstr "" - -#: dchroot/dchroot.cc:77 dchroot-dsa/dchroot-dsa.cc:77 schroot/schroot.cc:77 +#: dchroot/dchroot.cc:61 dchroot-dsa/dchroot-dsa.cc:61 schroot/schroot.cc:61 +#: schroot/schroot-listmounts.cc:67 schroot/schroot-releaselock.cc:67 #, fuzzy msgid "An unknown exception occured" msgstr "Okänd åtgärd angiven" @@ -30,48 +26,42 @@ msgstr "Okänd åtgärd angiven" msgid "%1% chroot (dchroot compatibility)" msgstr "Kör schroot i dchroot-kompatibelt läge" -#: dchroot/dchroot-options.cc:56 +#: dchroot/dchroot-main.cc:46 schroot/schroot-main.cc:42 +#, fuzzy +msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" +msgstr " [FLAGGA...] [KOMMANDO] - kör kommando eller skal i ett chroot" + +#: dchroot/dchroot-options.cc:51 msgid "Print path to selected chroot" msgstr "Skriv ut sökvägen till valda chroot" -#: dchroot/dchroot-options.cc:60 dchroot-dsa/dchroot-dsa-options.cc:62 -#: schroot/schroot-options.cc:62 +#: dchroot/dchroot-options.cc:55 dchroot-dsa/dchroot-dsa-options.cc:57 +#: schroot/schroot-options.cc:57 msgid "Select all chroots" msgstr "Välj alla chroot" -#: dchroot/dchroot-options.cc:64 schroot/schroot-options.cc:70 +#: dchroot/dchroot-options.cc:59 schroot/schroot-options.cc:65 msgid "Preserve user environment" msgstr "Behåll användarens miljövariabler" -#: dchroot/dchroot-options.cc:73 dchroot-dsa/dchroot-dsa-options.cc:71 -#: schroot/schroot-listmounts-options.cc:64 schroot/schroot-options.cc:92 -#: schroot/schroot-releaselock-options.cc:67 -msgid "Usage:" -msgstr "Användning:" - -#: dchroot/dchroot-options.cc:76 schroot/schroot-options.cc:95 -#, fuzzy -msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" -msgstr " [FLAGGA...] [KOMMANDO] - kör kommando eller skal i ett chroot" - -#: dchroot/dchroot-options.cc:99 dchroot-dsa/dchroot-dsa-options.cc:104 +#: dchroot/dchroot-options.cc:82 dchroot-dsa/dchroot-dsa-options.cc:87 #, fuzzy msgid "Only one command may be specified" msgstr "Endast en åtgärd får anges" -#: dchroot/dchroot-options.cc:104 schroot/schroot-options-base.cc:157 +#: dchroot/dchroot-options.cc:87 schroot/schroot-options-base.cc:125 msgid "--quiet and --verbose may not be used at the same time" msgstr "--quiet och --verbose får inte användas samtidigt" -#: dchroot/dchroot-options.cc:106 schroot/schroot-options-base.cc:159 +#: dchroot/dchroot-options.cc:89 schroot/schroot-options-base.cc:127 msgid "Using verbose output" msgstr "Använder informativ utskrift" -#: dchroot/dchroot-options.cc:112 schroot/schroot-options-base.cc:165 +#: dchroot/dchroot-options.cc:95 schroot/schroot-options-base.cc:133 msgid "--chroot and --all may not be used at the same time" msgstr "--chroot och --all kan inte användas samtidigt" -#: dchroot/dchroot-options.cc:114 schroot/schroot-options-base.cc:167 +#: dchroot/dchroot-options.cc:97 schroot/schroot-options-base.cc:135 msgid "Using --chroots only" msgstr "Använder endast --chroots" @@ -95,21 +85,21 @@ msgstr "[%1% chroot] Kör kommando: \"%2%\"" msgid "%1% chroot (dchroot-dsa compatibility)" msgstr "Kör schroot i dchroot-kompatibelt läge" -#: dchroot-dsa/dchroot-dsa-options.cc:58 -#, fuzzy -msgid "Print paths to available chroots" -msgstr "Lista tillgängliga chroot" - -#: dchroot-dsa/dchroot-dsa-options.cc:74 +#: dchroot-dsa/dchroot-dsa-main.cc:45 #, fuzzy msgid "[OPTION...] chroot [COMMAND] - run command or shell in a chroot" msgstr " [FLAGGA...] [KOMMANDO] - kör kommando eller skal i ett chroot" -#: dchroot-dsa/dchroot-dsa-options.cc:108 sbuild/sbuild-session.cc:72 +#: dchroot-dsa/dchroot-dsa-options.cc:53 +#, fuzzy +msgid "Print paths to available chroots" +msgstr "Lista tillgängliga chroot" + +#: dchroot-dsa/dchroot-dsa-options.cc:91 sbuild/sbuild-session.cc:73 msgid "Command must have an absolute path" msgstr "" -#: dchroot-dsa/dchroot-dsa-options.cc:116 +#: dchroot-dsa/dchroot-dsa-options.cc:100 #, fuzzy msgid "No chroot specified" msgstr "ingen grupp angiven" @@ -126,20 +116,20 @@ msgstr "%1%: användaren hittades inte: %2%" #: sbuild/sbuild-auth.cc:55 #, fuzzy -msgid "Access not authorised" -msgstr "tillgång inte auktoriserad" +msgid "Authentication failed" +msgstr "Autentisering via PAM misslyckades: %1%" #: sbuild/sbuild-auth.cc:56 #, fuzzy -msgid "Authentication failed" -msgstr "Autentisering via PAM misslyckades: %1%" +msgid "Access not authorised" +msgstr "tillgång inte auktoriserad" #: sbuild/sbuild-auth.cc:57 #, fuzzy msgid "PAM is already initialised" msgstr "PAM-fel: PAM är redan initierad" -#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:79 +#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:80 #, fuzzy msgid "PAM error" msgstr "PAM-fel: %1%" @@ -186,11 +176,11 @@ msgstr "Misslyckades med att få tag på terminalinställningar" msgid "Unsupported conversation type" msgstr "Konversationstypen %1% stöds ej" -#: sbuild/sbuild-chroot-block-device.cc:179 +#: sbuild/sbuild-chroot-block-device.cc:185 msgid "Device" msgstr "Enhet" -#: sbuild/sbuild-chroot-block-device.cc:181 +#: sbuild/sbuild-chroot-block-device.cc:187 msgid "Mount Options" msgstr "Monteringsflaggor" @@ -281,95 +271,95 @@ msgstr "%1%: misslyckades med att avlänka sessionsfil: %2%\n" msgid "Failed to write session file" msgstr "%1%: misslyckades med att skapa sessionsfil: %2%\n" -#: sbuild/sbuild-chroot.cc:430 +#: sbuild/sbuild-chroot.cc:437 msgid "Name" msgstr "Namn" -#: sbuild/sbuild-chroot.cc:431 +#: sbuild/sbuild-chroot.cc:438 msgid "Description" msgstr "Beskrivning" -#: sbuild/sbuild-chroot.cc:432 +#: sbuild/sbuild-chroot.cc:439 msgid "Type" msgstr "Typ" -#: sbuild/sbuild-chroot.cc:433 +#: sbuild/sbuild-chroot.cc:440 msgid "Priority" msgstr "Prioritet" -#: sbuild/sbuild-chroot.cc:434 +#: sbuild/sbuild-chroot.cc:441 msgid "Users" msgstr "" -#: sbuild/sbuild-chroot.cc:435 +#: sbuild/sbuild-chroot.cc:442 msgid "Groups" msgstr "Grupper" -#: sbuild/sbuild-chroot.cc:436 +#: sbuild/sbuild-chroot.cc:443 #, fuzzy msgid "Root Users" msgstr "Rotgrupper" -#: sbuild/sbuild-chroot.cc:437 +#: sbuild/sbuild-chroot.cc:444 msgid "Root Groups" msgstr "Rotgrupper" -#: sbuild/sbuild-chroot.cc:438 +#: sbuild/sbuild-chroot.cc:445 msgid "Aliases" msgstr "Alias" -#: sbuild/sbuild-chroot.cc:439 +#: sbuild/sbuild-chroot.cc:446 msgid "Run Setup Scripts" msgstr "Kör konfigurationsskript" # Borde det bli "Kör körskript"? Kaka på kaka? -#: sbuild/sbuild-chroot.cc:440 +#: sbuild/sbuild-chroot.cc:447 msgid "Run Execution Scripts" msgstr "Kör skript" -#: sbuild/sbuild-chroot.cc:442 +#: sbuild/sbuild-chroot.cc:449 msgid "Session Managed" msgstr "Session hanterad" -#: sbuild/sbuild-chroot.cc:446 +#: sbuild/sbuild-chroot.cc:453 msgid "Command Prefix" msgstr "Kommandoprefix" -#: sbuild/sbuild-chroot.cc:448 +#: sbuild/sbuild-chroot.cc:455 msgid "Personality" msgstr "Personlighet" -#: sbuild/sbuild-chroot.cc:452 +#: sbuild/sbuild-chroot.cc:459 msgid "Location" msgstr "Plats" -#: sbuild/sbuild-chroot.cc:454 +#: sbuild/sbuild-chroot.cc:461 msgid "Mount Location" msgstr "Montera plats" -#: sbuild/sbuild-chroot.cc:456 +#: sbuild/sbuild-chroot.cc:463 msgid "Path" msgstr "Sökväg" -#: sbuild/sbuild-chroot.cc:458 +#: sbuild/sbuild-chroot.cc:465 msgid "Mount Device" msgstr "Montera enhet" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 #, fuzzy msgid "Session" msgstr "Session hanterad" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 msgid "Chroot" msgstr "" -#: sbuild/sbuild-chroot.cc:636 +#: sbuild/sbuild-chroot.cc:612 #, boost-format msgid "%1% chroot: personality \"%2%\" is unknown.\n" msgstr "%1% chroot: personligheten \"%2%\" är okänd.\n" -#: sbuild/sbuild-chroot.cc:639 +#: sbuild/sbuild-chroot.cc:615 #, boost-format msgid "Valid personalities: %1%\n" msgstr "Giltiga personligheter: %1%\n" @@ -413,25 +403,20 @@ msgstr "%1% chroot: dubbletta namn tillåts inte" msgid "Available chroots: " msgstr "Tillgängliga chroot: " -#: sbuild/sbuild-chroot-config.cc:487 -#, fuzzy, boost-format -msgid "%1% chroot" -msgstr "%1%: Inget sådant chroot" - -#: sbuild/sbuild-chroot-file.cc:147 +#: sbuild/sbuild-chroot-file.cc:162 msgid "File" msgstr "Fil" -#: sbuild/sbuild-chroot-file.cc:148 +#: sbuild/sbuild-chroot-file.cc:163 msgid "File Repack" msgstr "Filompackning" -#: sbuild/sbuild-chroot-lvm-snapshot.cc:203 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:206 msgid "LVM Snapshot Device" msgstr "Enhet för LVM-snapshot" # Finns det ett svenskt ord för snapshot? -#: sbuild/sbuild-chroot-lvm-snapshot.cc:205 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:208 msgid "LVM Snapshot Options" msgstr "Flaggor för LVM-snapshot" @@ -471,21 +456,21 @@ msgstr "falskt" msgid "--- %1% ---" msgstr " --- Chroot ---\n" -#: sbuild/sbuild-keyfile.cc:363 +#: sbuild/sbuild-keyfile.cc:395 #, boost-format msgid "%1% chroot: A deprecated parameter \"%2%\" has been specified." msgstr "%1% chroot: En gammal parameter \"%2%\" har angivits." -#: sbuild/sbuild-keyfile.cc:367 +#: sbuild/sbuild-keyfile.cc:399 msgid "This option will be removed in the future." msgstr "Den här flaggan kommer att tas bort i framtiden." -#: sbuild/sbuild-keyfile.cc:371 +#: sbuild/sbuild-keyfile.cc:403 #, boost-format msgid "%1% chroot: An obsolete parameter \"%2%\" has been specified." msgstr "%1% chroot: En föråldrad parameter \"%2%\" har angivits." -#: sbuild/sbuild-keyfile.cc:375 +#: sbuild/sbuild-keyfile.cc:407 msgid "This option has been removed, and no longer has any effect." msgstr "Den här flaggan har tagits bort och har inte längre någon effekt." @@ -689,429 +674,400 @@ msgstr "[%1%] %2%: %3%" msgid "Failed to set personality" msgstr "Misslyckades med att få tag på terminalinställningar" -#: sbuild/sbuild-session.cc:59 +#: sbuild/sbuild-session.cc:60 #, fuzzy msgid "Failed to change to directory" msgstr "%1%: misslyckades med att öppna katalog: %2%" -#: sbuild/sbuild-session.cc:60 +#: sbuild/sbuild-session.cc:61 #, fuzzy msgid "Falling back to directory" msgstr "Faller tillbaka på hemkatalogen \"%1%\"" -#: sbuild/sbuild-session.cc:61 +#: sbuild/sbuild-session.cc:62 msgid "Child dumped core" msgstr "Barnprocess dumpade minnet" # coredump? Bättre ord? -#: sbuild/sbuild-session.cc:62 +#: sbuild/sbuild-session.cc:63 msgid "Child exited abnormally (reason unknown; not a signal or core dump)" msgstr "" "Barnprocess avslutades onormalt (anledning är okänd; inte en signal eller " "minnesdump)" -#: sbuild/sbuild-session.cc:63 +#: sbuild/sbuild-session.cc:64 #, fuzzy msgid "Failed to fork child" msgstr "Misslyckades med att grena process: %1%" -#: sbuild/sbuild-session.cc:64 +#: sbuild/sbuild-session.cc:65 #, fuzzy msgid "Child terminated by signal" msgstr "Barnprocess terminerades av signal \"%1%\"" -#: sbuild/sbuild-session.cc:65 +#: sbuild/sbuild-session.cc:66 #, fuzzy msgid "Wait for child failed" msgstr "väntan på barnprocess misslyckades: %1%" -#: sbuild/sbuild-session.cc:66 +#: sbuild/sbuild-session.cc:67 #, fuzzy msgid "Failed to change root to directory" msgstr "%1%: misslyckades med att öppna katalog: %2%" -#: sbuild/sbuild-session.cc:67 +#: sbuild/sbuild-session.cc:68 #, fuzzy msgid "No chroot found matching alias" msgstr "Inget chroot hittades som matchar alias \"%1%\"" -#: sbuild/sbuild-session.cc:68 +#: sbuild/sbuild-session.cc:69 #, fuzzy msgid "Failed to lock chroot" msgstr "%1%: Misslyckades med att hitta chroot" -#: sbuild/sbuild-session.cc:69 +#: sbuild/sbuild-session.cc:70 #, fuzzy msgid "Chroot setup failed" msgstr "skapandet av chroot misslyckades" -#: sbuild/sbuild-session.cc:70 +#: sbuild/sbuild-session.cc:71 #, fuzzy msgid "Failed to find chroot" msgstr "%1%: Misslyckades med att hitta chroot" -#: sbuild/sbuild-session.cc:71 +#: sbuild/sbuild-session.cc:72 #, fuzzy msgid "Failed to unlock chroot" msgstr "%1%: Misslyckades med att hitta chroot" -#: sbuild/sbuild-session.cc:73 +#: sbuild/sbuild-session.cc:74 #, fuzzy msgid "Failed to execute" msgstr "misslyckades med att ställa in tidsgräns: %1%" -#: sbuild/sbuild-session.cc:74 +#: sbuild/sbuild-session.cc:75 #, fuzzy msgid "Failed to get supplementary groups" msgstr "Kunde inte sätta id för tilläggsgrupper" -#: sbuild/sbuild-session.cc:75 +#: sbuild/sbuild-session.cc:76 #, fuzzy msgid "Failed to get supplementary group count" msgstr "kan inte hämta antalet tilläggsgrupper: %1%" -#: sbuild/sbuild-session.cc:76 +#: sbuild/sbuild-session.cc:77 #, fuzzy msgid "Failed to set group" msgstr "misslyckades med att ställa in tidsgräns: %1%" -#: sbuild/sbuild-session.cc:77 +#: sbuild/sbuild-session.cc:78 #, fuzzy msgid "Failed to set supplementary groups" msgstr "Kunde inte sätta id för tilläggsgrupper" -#: sbuild/sbuild-session.cc:78 +#: sbuild/sbuild-session.cc:79 #, fuzzy msgid "Group not found" msgstr "%1%: grupp hittades inte" -#: sbuild/sbuild-session.cc:80 +#: sbuild/sbuild-session.cc:81 #, fuzzy msgid "Failed to drop root permissions" msgstr "Misslyckades med att släppa root-rättigheter." -#: sbuild/sbuild-session.cc:81 +#: sbuild/sbuild-session.cc:82 #, fuzzy msgid "Shell not available" msgstr "%1%: misslyckades med att läsa status på fil: %2%" -#: sbuild/sbuild-session.cc:82 +#: sbuild/sbuild-session.cc:83 #, fuzzy msgid "Falling back to shell" msgstr "Faller tillbaka på \"%1%\"" -#: sbuild/sbuild-session.cc:83 +#: sbuild/sbuild-session.cc:84 #, fuzzy msgid "Caught hangup signal" msgstr "fångade påläggningssignal, terminerar..." -#: sbuild/sbuild-session.cc:84 +#: sbuild/sbuild-session.cc:85 #, fuzzy msgid "Failed to set hangup signal handler" msgstr "misslyckades med att ställa in påläggningshanterare: %1%" -#: sbuild/sbuild-session.cc:85 +#: sbuild/sbuild-session.cc:86 #, fuzzy msgid "Failed to set user" msgstr "misslyckades med att ställa in tidsgräns: %1%" -#: sbuild/sbuild-session.cc:86 +#: sbuild/sbuild-session.cc:87 msgid "User switching is not permitted" msgstr "" -#: sbuild/sbuild-session.cc:659 +#: sbuild/sbuild-session.cc:652 #, fuzzy, boost-format msgid "[%1% chroot] Running login shell: \"%4%\"" msgstr "[%1% chroot] Kör inloggningsskal: \"%2%\"" -#: sbuild/sbuild-session.cc:661 +#: sbuild/sbuild-session.cc:654 #, fuzzy, boost-format msgid "[%1% chroot] Running shell: \"%4%\"" msgstr "[%1% chroot] Kör skal: \"%2%\"" -#: sbuild/sbuild-session.cc:667 +#: sbuild/sbuild-session.cc:660 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Kör inloggningsskal: \"%4%\"" -#: sbuild/sbuild-session.cc:669 +#: sbuild/sbuild-session.cc:662 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running shell: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Kör skal: \"%4%\"" -#: sbuild/sbuild-session.cc:704 +#: sbuild/sbuild-session.cc:697 #, fuzzy, boost-format msgid "[%1% chroot] Running command: \"%4%\"" msgstr "[%1% chroot] Kör kommando: \"%2%\"" -#: sbuild/sbuild-session.cc:706 +#: sbuild/sbuild-session.cc:699 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Kör kommando: \"%4%\"" -#: sbuild/sbuild-session.cc:889 +#: sbuild/sbuild-session.cc:882 #, boost-format msgid "stage=%1%" msgstr "" -#: sbuild/sbuild-session.cc:1035 +#: sbuild/sbuild-session.cc:1028 msgid "terminating immediately" msgstr "" -#: schroot/schroot-listmounts.cc:61 schroot/schroot-main.cc:59 -#: schroot/schroot-releaselock.cc:56 -#, fuzzy, boost-format -msgid "%1% (Debian sbuild) %2% (%3%)\n" -msgstr "%1% (Debian sbuild) %2%\n" - -#: schroot/schroot-listmounts.cc:65 schroot/schroot-main.cc:63 -#: schroot/schroot-releaselock.cc:60 -msgid "" -"Written by Roger Leigh\n" -"\n" -msgstr "" -"Skriven av Roger Leigh\n" -"\n" - -#: schroot/schroot-listmounts.cc:66 schroot/schroot-main.cc:64 -#: schroot/schroot-releaselock.cc:61 -msgid "Copyright (C) 2004-2006 Roger Leigh\n" -msgstr "Copyright © 2004-2005 Roger Leigh\n" - -#: schroot/schroot-listmounts.cc:67 schroot/schroot-main.cc:65 -#: schroot/schroot-releaselock.cc:62 -msgid "" -"This is free software; see the source for copying conditions. There is NO\n" -"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +#: schroot/schroot-listmounts-options.cc:41 +msgid "Mount" msgstr "" -"Detta är fri programvara; se källkoden för kopieringsvillkor. Det finns " -"INGEN GARANTI;\n" -"inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL.\n" - -#: schroot/schroot-listmounts.cc:89 -#, boost-format -msgid "%1%: Failed to open: %2%" -msgstr "%1%: Misslyckades med att öppna: %2%" -#: schroot/schroot-listmounts.cc:112 -#, boost-format -msgid "%1%: Failed to close: %2%" -msgstr "%1%: Misslyckades med att stänga: %2%" - -#: schroot/schroot-listmounts.cc:158 -msgid "No mountpoint specified" -msgstr "Ingen monteringspunkt angiven" - -#: schroot/schroot-listmounts-options.cc:42 schroot/schroot-options-base.cc:48 -#: schroot/schroot-releaselock-options.cc:43 -msgid "General options" -msgstr "Allmänna flaggor" - -#: schroot/schroot-listmounts-options.cc:44 schroot/schroot-options-base.cc:69 -#: schroot/schroot-releaselock-options.cc:45 -msgid "Show help options" -msgstr "Visa hjälpflaggor" - -#: schroot/schroot-listmounts-options.cc:46 schroot/schroot-options-base.cc:71 -#: schroot/schroot-releaselock-options.cc:47 -msgid "Print version information" -msgstr "Skriv ut versionsinformation" - -#: schroot/schroot-listmounts-options.cc:48 -#: schroot/schroot-releaselock-options.cc:49 -msgid "Lock options" -msgstr "Låsflaggor" - -#: schroot/schroot-listmounts-options.cc:51 +#: schroot/schroot-listmounts-options.cc:56 msgid "Mountpoint to check (full path)" msgstr "Monteringspunkt att kontrollera (fullständig sökväg)" -#: schroot/schroot-listmounts-options.cc:65 +#: schroot/schroot-listmounts-options.cc:85 #, fuzzy -msgid "schroot-listmounts [OPTION...] - list mounts" -msgstr " schroot-listmounts [FLAGGA...] - lista monteringar" +msgid "No mount point specified" +msgstr "Ingen monteringspunkt angiven" -#: schroot/schroot-main.cc:74 +#: schroot/schroot-listmounts-options.cc:92 +#: schroot/schroot-options-base.cc:214 +#: schroot/schroot-releaselock-options.cc:95 +msgid "Only one action may be specified" +msgstr "Endast en åtgärd får anges" + +#: schroot/schroot-main.cc:55 #, fuzzy, boost-format msgid "schroot configuration generated by %1% %2% on %3%" msgstr "schroot-konfiguration genererad av %1% %2%" -#: schroot/schroot-main.cc:139 -#, boost-format -msgid "%1%: No such chroot" -msgstr "%1%: Inget sådant chroot" - -#: schroot/schroot-main.cc:195 -msgid "Error saving terminal settings" -msgstr "Fel vid sparandet av terminalinställningar" - -#: schroot/schroot-main.cc:227 -#, boost-format -msgid "No chroots are defined in %1% or %2%" -msgstr "Inga chroot angivna i %1% eller %2%" - -#: schroot/schroot-main.cc:235 -#, boost-format -msgid "No chroots are defined in %1%" -msgstr "Inga chroot angivna i %1%" - -#: schroot/schroot-main.cc:252 -#, boost-format -msgid "The specified chroots are not defined in %1%" -msgstr "De angivna chroot finns inte angivna i %1%" - -#: schroot/schroot-main.cc:279 -msgid "Only one chroot may be specified when beginning a session" -msgstr "Endast en chroot får anges vid början av en session" - -#: schroot/schroot-main.cc:336 schroot/schroot-main.cc:352 -msgid "Error restoring terminal settings" -msgstr "Fel vid återställandet av terminalinställningar" - -#: schroot/schroot-options-base.cc:49 +#: schroot/schroot-options-base.cc:46 msgid "Chroot selection" msgstr "Val av chroot" -#: schroot/schroot-options-base.cc:50 +#: schroot/schroot-options-base.cc:47 msgid "Chroot environment" msgstr "Chroot-miljö" -#: schroot/schroot-options-base.cc:51 +#: schroot/schroot-options-base.cc:48 msgid "Session management" msgstr "Sessionshantering" -#: schroot/schroot-options-base.cc:52 -msgid "Hidden options" -msgstr "Dolda flaggor" - -#: schroot/schroot-options-base.cc:73 -msgid "Show less output" -msgstr "Visa mindre utdata" - -#: schroot/schroot-options-base.cc:75 -msgid "Show more output" -msgstr "Visa mer utdata" - -#: schroot/schroot-options-base.cc:77 +#: schroot/schroot-options-base.cc:63 msgid "List available chroots" msgstr "Lista tillgängliga chroot" -#: schroot/schroot-options-base.cc:79 +#: schroot/schroot-options-base.cc:65 msgid "Show information about selected chroots" msgstr "Visa information om valda chroot" -#: schroot/schroot-options-base.cc:81 +#: schroot/schroot-options-base.cc:67 msgid "Dump configuration of selected chroots" msgstr "Dumpa konfigurationen för valda chroot" -#: schroot/schroot-options-base.cc:85 +#: schroot/schroot-options-base.cc:71 msgid "Use specified chroot" msgstr "Använd angiven chroot" -#: schroot/schroot-options-base.cc:89 +#: schroot/schroot-options-base.cc:75 msgid "Command to run" msgstr "Kommando att köra" -#: schroot/schroot-options-base.cc:91 -msgid "Enable debugging messages" -msgstr "" - -#: schroot/schroot-options-base.cc:190 +#: schroot/schroot-options-base.cc:158 msgid "" "Only one chroot may be specified when recovering, running or ending a session" msgstr "" "Endast ett chroot får anges vid återhämtning, körning eller avslutning av en " "session" -#: schroot/schroot-options-base.cc:215 +#: schroot/schroot-options-base.cc:184 msgid "--chroot may not be used with --list" msgstr "--chroot får inte användas med --list" -#: schroot/schroot-options-base.cc:237 +#: schroot/schroot-options-base.cc:206 #, fuzzy msgid "Unknown action specified" msgstr "Endast en åtgärd får anges" -#: schroot/schroot-options-base.cc:245 -msgid "Only one action may be specified" -msgstr "Endast en åtgärd får anges" - -#: schroot/schroot-options.cc:56 +#: schroot/schroot-options.cc:51 msgid "Print location of selected chroots" msgstr "Skriv ut platsen för valda chroot" -#: schroot/schroot-options.cc:60 +#: schroot/schroot-options.cc:55 msgid "Select all chroots and active sessions" msgstr "Välj alla chroot och aktiva sessioner" -#: schroot/schroot-options.cc:64 +#: schroot/schroot-options.cc:59 msgid "Select all active sessions" msgstr "Välj alla aktiva sessioner" -#: schroot/schroot-options.cc:68 +#: schroot/schroot-options.cc:63 msgid "Username (default current user)" msgstr "Användarnamn (förval är nuvarande användare)" -#: schroot/schroot-options.cc:74 +#: schroot/schroot-options.cc:69 msgid "Begin a session; returns a session ID" msgstr "Börja en session; returnerar ett sessions-id" -#: schroot/schroot-options.cc:76 +#: schroot/schroot-options.cc:71 msgid "Recover an existing session" msgstr "Återhämta en existerande session" -#: schroot/schroot-options.cc:78 +#: schroot/schroot-options.cc:73 msgid "Run an existing session" msgstr "Kör en existerande session" -#: schroot/schroot-options.cc:80 +#: schroot/schroot-options.cc:75 msgid "End an existing session" msgstr "Avsluta en existerande session" -#: schroot/schroot-options.cc:82 +#: schroot/schroot-options.cc:77 msgid "Force operation, even if it fails" msgstr "Tvinga operation, även om den misslyckas" -#: schroot/schroot-releaselock.cc:105 +#: schroot/schroot-releaselock-options.cc:42 +msgid "Lock" +msgstr "" + +#: schroot/schroot-releaselock-options.cc:57 +msgid "Device to unlock (full path)" +msgstr "Enhet att låsa upp (full sökväg)" + +#: schroot/schroot-releaselock-options.cc:59 +msgid "Process ID owning the lock" +msgstr "Process-id som äger låset" + +#: schroot/schroot-releaselock-options.cc:88 msgid "No device specified" msgstr "Ingen enhet angiven" -#: schroot/schroot-releaselock.cc:111 -msgid "No pid specified; forcing release of lock" -msgstr "Ingen pid angiven; tvingar släpp av lås" +#~ msgid "Usage:" +#~ msgstr "Användning:" -#: schroot/schroot-releaselock.cc:120 -#, boost-format -msgid "Failed to stat device %1%: %2%" -msgstr "Misslyckades med att läsa status på enhet %1%: %2%" +#, fuzzy +#~ msgid "%1% chroot" +#~ msgstr "%1%: Inget sådant chroot" -#: schroot/schroot-releaselock.cc:128 -#, boost-format -msgid "%1% is not a block device" -msgstr "%1% är inte en blockenhet" +#, fuzzy +#~ msgid "%1% (Debian sbuild) %2% (%3%)\n" +#~ msgstr "%1% (Debian sbuild) %2%\n" -#: schroot/schroot-releaselock.cc:136 -#, boost-format -msgid "%1%: failed to release device lock" -msgstr "%1%: misslyckades med att släppa enhetslås" +#~ msgid "" +#~ "Written by Roger Leigh\n" +#~ "\n" +#~ msgstr "" +#~ "Skriven av Roger Leigh\n" +#~ "\n" -#: schroot/schroot-releaselock.cc:143 -#, boost-format -msgid "%1%: failed to release device lock owned by pid %2%" -msgstr "%1%: misslyckades med att släppa enhetslås som ägs av pid %2%" +#~ msgid "Copyright (C) 2004-2006 Roger Leigh\n" +#~ msgstr "Copyright © 2004-2005 Roger Leigh\n" -#: schroot/schroot-releaselock-options.cc:52 -msgid "Device to unlock (full path)" -msgstr "Enhet att låsa upp (full sökväg)" +#~ msgid "" +#~ "This is free software; see the source for copying conditions. There is " +#~ "NO\n" +#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " +#~ "PURPOSE.\n" +#~ msgstr "" +#~ "Detta är fri programvara; se källkoden för kopieringsvillkor. Det finns " +#~ "INGEN GARANTI;\n" +#~ "inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL.\n" -#: schroot/schroot-releaselock-options.cc:54 -msgid "Process ID owning the lock" -msgstr "Process-id som äger låset" +#~ msgid "%1%: Failed to open: %2%" +#~ msgstr "%1%: Misslyckades med att öppna: %2%" + +#~ msgid "%1%: Failed to close: %2%" +#~ msgstr "%1%: Misslyckades med att stänga: %2%" + +#~ msgid "General options" +#~ msgstr "Allmänna flaggor" + +#~ msgid "Show help options" +#~ msgstr "Visa hjälpflaggor" + +#~ msgid "Print version information" +#~ msgstr "Skriv ut versionsinformation" + +#~ msgid "Lock options" +#~ msgstr "Låsflaggor" + +#, fuzzy +#~ msgid "schroot-listmounts [OPTION...] - list mounts" +#~ msgstr " schroot-listmounts [FLAGGA...] - lista monteringar" + +#~ msgid "%1%: No such chroot" +#~ msgstr "%1%: Inget sådant chroot" + +#~ msgid "Error saving terminal settings" +#~ msgstr "Fel vid sparandet av terminalinställningar" + +#~ msgid "No chroots are defined in %1% or %2%" +#~ msgstr "Inga chroot angivna i %1% eller %2%" + +#~ msgid "No chroots are defined in %1%" +#~ msgstr "Inga chroot angivna i %1%" + +#~ msgid "The specified chroots are not defined in %1%" +#~ msgstr "De angivna chroot finns inte angivna i %1%" + +#~ msgid "Only one chroot may be specified when beginning a session" +#~ msgstr "Endast en chroot får anges vid början av en session" + +#~ msgid "Error restoring terminal settings" +#~ msgstr "Fel vid återställandet av terminalinställningar" + +#~ msgid "Hidden options" +#~ msgstr "Dolda flaggor" + +#~ msgid "Show less output" +#~ msgstr "Visa mindre utdata" + +#~ msgid "Show more output" +#~ msgstr "Visa mer utdata" + +#~ msgid "No pid specified; forcing release of lock" +#~ msgstr "Ingen pid angiven; tvingar släpp av lås" + +#~ msgid "Failed to stat device %1%: %2%" +#~ msgstr "Misslyckades med att läsa status på enhet %1%: %2%" + +#~ msgid "%1% is not a block device" +#~ msgstr "%1% är inte en blockenhet" + +#~ msgid "%1%: failed to release device lock" +#~ msgstr "%1%: misslyckades med att släppa enhetslås" + +#~ msgid "%1%: failed to release device lock owned by pid %2%" +#~ msgstr "%1%: misslyckades med att släppa enhetslås som ägs av pid %2%" -#: schroot/schroot-releaselock-options.cc:68 #, fuzzy -msgid "schroot-releaselock [OPTION...] - release a device lock" -msgstr " schroot-releaselock [FLAGGA...] - släpp ett enhetslås" +#~ msgid "schroot-releaselock [OPTION...] - release a device lock" +#~ msgstr " schroot-releaselock [FLAGGA...] - släpp ett enhetslås" #, fuzzy #~ msgid "To allow users access to the chroots, use the users or groups keys." @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: schroot-0.99.0-1\n" "Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n" -"POT-Creation-Date: 2006-06-26 11:15+0100\n" +"POT-Creation-Date: 2006-07-03 23:11+0100\n" "PO-Revision-Date: 2006-06-22 23:06+0930\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -16,12 +16,8 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0\n" "X-Generator: LocFactoryEditor 1.6a7\n" -#: dchroot/dchroot.cc:65 dchroot-dsa/dchroot-dsa.cc:65 schroot/schroot.cc:65 -#, boost-format -msgid "Run \"%1% --help\" to list usage example and all available options" -msgstr "" - -#: dchroot/dchroot.cc:77 dchroot-dsa/dchroot-dsa.cc:77 schroot/schroot.cc:77 +#: dchroot/dchroot.cc:61 dchroot-dsa/dchroot-dsa.cc:61 schroot/schroot.cc:61 +#: schroot/schroot-listmounts.cc:67 schroot/schroot-releaselock.cc:67 #, fuzzy msgid "An unknown exception occured" msgstr "Đã ghi rõ một hành động không rõ" @@ -31,52 +27,46 @@ msgstr "Đã ghi rõ một hành động không rõ" msgid "%1% chroot (dchroot compatibility)" msgstr "Đang chạy schroot trong chế độ tương thích" -#: dchroot/dchroot-options.cc:56 +#: dchroot/dchroot-main.cc:46 schroot/schroot-main.cc:42 +#, fuzzy +msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" +msgstr " [TÙY_CHỌN...] [LỆNH] — chạy lệnh hoặc hệ vỏ trong một chroot" + +#: dchroot/dchroot-options.cc:51 msgid "Print path to selected chroot" msgstr "In ra đường dẫn đến chroot đã chọn" -#: dchroot/dchroot-options.cc:60 dchroot-dsa/dchroot-dsa-options.cc:62 -#: schroot/schroot-options.cc:62 +#: dchroot/dchroot-options.cc:55 dchroot-dsa/dchroot-dsa-options.cc:57 +#: schroot/schroot-options.cc:57 msgid "Select all chroots" msgstr "Chọn mọi chroot" -#: dchroot/dchroot-options.cc:64 schroot/schroot-options.cc:70 +#: dchroot/dchroot-options.cc:59 schroot/schroot-options.cc:65 msgid "Preserve user environment" msgstr "Bảo tồn môi trường người dùng" -#: dchroot/dchroot-options.cc:73 dchroot-dsa/dchroot-dsa-options.cc:71 -#: schroot/schroot-listmounts-options.cc:64 schroot/schroot-options.cc:92 -#: schroot/schroot-releaselock-options.cc:67 -msgid "Usage:" -msgstr "Cách sử dụng:" - -#: dchroot/dchroot-options.cc:76 schroot/schroot-options.cc:95 -#, fuzzy -msgid "[OPTION...] [COMMAND] - run command or shell in a chroot" -msgstr " [TÙY_CHỌN...] [LỆNH] — chạy lệnh hoặc hệ vỏ trong một chroot" - -#: dchroot/dchroot-options.cc:99 dchroot-dsa/dchroot-dsa-options.cc:104 +#: dchroot/dchroot-options.cc:82 dchroot-dsa/dchroot-dsa-options.cc:87 #, fuzzy msgid "Only one command may be specified" msgstr "Có thể ghi rõ chỉ một hành động thôi" -#: dchroot/dchroot-options.cc:104 schroot/schroot-options-base.cc:157 +#: dchroot/dchroot-options.cc:87 schroot/schroot-options-base.cc:125 msgid "--quiet and --verbose may not be used at the same time" msgstr "" "Không cho phép sử dụng tùy chọn cả « --quiet » (xuất ít hơn) lẫn « --verbose " "» (xuất nhiều hơn) đều đồng thời." -#: dchroot/dchroot-options.cc:106 schroot/schroot-options-base.cc:159 +#: dchroot/dchroot-options.cc:89 schroot/schroot-options-base.cc:127 msgid "Using verbose output" msgstr "Đang xuất nhiều hơn" -#: dchroot/dchroot-options.cc:112 schroot/schroot-options-base.cc:165 +#: dchroot/dchroot-options.cc:95 schroot/schroot-options-base.cc:133 msgid "--chroot and --all may not be used at the same time" msgstr "" "Không cho phép sử dụng tùy chọn cả « --chroot » lẫn « --all » (tất cả) đều " "đồng thời." -#: dchroot/dchroot-options.cc:114 schroot/schroot-options-base.cc:167 +#: dchroot/dchroot-options.cc:97 schroot/schroot-options-base.cc:135 msgid "Using --chroots only" msgstr "Đang dùng chỉ tùy chọn « --chroots » thôi" @@ -101,21 +91,21 @@ msgstr "[%1% chroot] Đang chạy lệnh: « %2% »" msgid "%1% chroot (dchroot-dsa compatibility)" msgstr "Đang chạy schroot trong chế độ tương thích" -#: dchroot-dsa/dchroot-dsa-options.cc:58 -#, fuzzy -msgid "Print paths to available chroots" -msgstr "Liệt kê các chroot sẵn sàng" - -#: dchroot-dsa/dchroot-dsa-options.cc:74 +#: dchroot-dsa/dchroot-dsa-main.cc:45 #, fuzzy msgid "[OPTION...] chroot [COMMAND] - run command or shell in a chroot" msgstr " [TÙY_CHỌN...] [LỆNH] — chạy lệnh hoặc hệ vỏ trong một chroot" -#: dchroot-dsa/dchroot-dsa-options.cc:108 sbuild/sbuild-session.cc:72 +#: dchroot-dsa/dchroot-dsa-options.cc:53 +#, fuzzy +msgid "Print paths to available chroots" +msgstr "Liệt kê các chroot sẵn sàng" + +#: dchroot-dsa/dchroot-dsa-options.cc:91 sbuild/sbuild-session.cc:73 msgid "Command must have an absolute path" msgstr "" -#: dchroot-dsa/dchroot-dsa-options.cc:116 +#: dchroot-dsa/dchroot-dsa-options.cc:100 #, fuzzy msgid "No chroot specified" msgstr "chưa xác định nhóm" @@ -132,20 +122,20 @@ msgstr "%1%: không tìm thấy người dùng: %2%" #: sbuild/sbuild-auth.cc:55 #, fuzzy -msgid "Access not authorised" -msgstr "không xác thực truy cập" +msgid "Authentication failed" +msgstr "Việc xác thực kiểu PAM bị lỗi: %1%" #: sbuild/sbuild-auth.cc:56 #, fuzzy -msgid "Authentication failed" -msgstr "Việc xác thực kiểu PAM bị lỗi: %1%" +msgid "Access not authorised" +msgstr "không xác thực truy cập" #: sbuild/sbuild-auth.cc:57 #, fuzzy msgid "PAM is already initialised" msgstr "Lỗi PAM: PAM đã được sở khởi" -#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:79 +#: sbuild/sbuild-auth.cc:58 sbuild/sbuild-session.cc:80 #, fuzzy msgid "PAM error" msgstr "Lỗi PAM: %1%" @@ -192,11 +182,11 @@ msgstr "Việc lấy thiết lập thiết bị cuối bị lỗi" msgid "Unsupported conversation type" msgstr "Kiểu chuyển đổi không được hỗ trợ %1%" -#: sbuild/sbuild-chroot-block-device.cc:179 +#: sbuild/sbuild-chroot-block-device.cc:185 msgid "Device" msgstr "Thiết bị" -#: sbuild/sbuild-chroot-block-device.cc:181 +#: sbuild/sbuild-chroot-block-device.cc:187 msgid "Mount Options" msgstr "Tùy chọn lắp" @@ -287,94 +277,94 @@ msgstr "%1%: việc bỏ liên kết tập tin phiên chạy bị lỗi: %2%\n" msgid "Failed to write session file" msgstr "%1%: việc tạo tập tin phiên chạy bị lỗi: %2%\n" -#: sbuild/sbuild-chroot.cc:430 +#: sbuild/sbuild-chroot.cc:437 msgid "Name" msgstr "Tên" -#: sbuild/sbuild-chroot.cc:431 +#: sbuild/sbuild-chroot.cc:438 msgid "Description" msgstr "Mô tả" -#: sbuild/sbuild-chroot.cc:432 +#: sbuild/sbuild-chroot.cc:439 msgid "Type" msgstr "Kiểu" -#: sbuild/sbuild-chroot.cc:433 +#: sbuild/sbuild-chroot.cc:440 msgid "Priority" msgstr "Ưu tiên" -#: sbuild/sbuild-chroot.cc:434 +#: sbuild/sbuild-chroot.cc:441 msgid "Users" msgstr "" -#: sbuild/sbuild-chroot.cc:435 +#: sbuild/sbuild-chroot.cc:442 msgid "Groups" msgstr "Nhóm" -#: sbuild/sbuild-chroot.cc:436 +#: sbuild/sbuild-chroot.cc:443 #, fuzzy msgid "Root Users" msgstr "Nhóm chủ" -#: sbuild/sbuild-chroot.cc:437 +#: sbuild/sbuild-chroot.cc:444 msgid "Root Groups" msgstr "Nhóm chủ" -#: sbuild/sbuild-chroot.cc:438 +#: sbuild/sbuild-chroot.cc:445 msgid "Aliases" msgstr "Biệt hiệu" -#: sbuild/sbuild-chroot.cc:439 +#: sbuild/sbuild-chroot.cc:446 msgid "Run Setup Scripts" msgstr "Chạy các tập lệnh thiết lập" -#: sbuild/sbuild-chroot.cc:440 +#: sbuild/sbuild-chroot.cc:447 msgid "Run Execution Scripts" msgstr "Chạy các tập lệnh thực hiện" -#: sbuild/sbuild-chroot.cc:442 +#: sbuild/sbuild-chroot.cc:449 msgid "Session Managed" msgstr "Phiên chạy đã quản lý" -#: sbuild/sbuild-chroot.cc:446 +#: sbuild/sbuild-chroot.cc:453 msgid "Command Prefix" msgstr "Tiền tố lệnh" -#: sbuild/sbuild-chroot.cc:448 +#: sbuild/sbuild-chroot.cc:455 msgid "Personality" msgstr "Cá tính" -#: sbuild/sbuild-chroot.cc:452 +#: sbuild/sbuild-chroot.cc:459 msgid "Location" msgstr "Địa điểm" -#: sbuild/sbuild-chroot.cc:454 +#: sbuild/sbuild-chroot.cc:461 msgid "Mount Location" msgstr "Địa điểm lắp" -#: sbuild/sbuild-chroot.cc:456 +#: sbuild/sbuild-chroot.cc:463 msgid "Path" msgstr "Đường dẫn" -#: sbuild/sbuild-chroot.cc:458 +#: sbuild/sbuild-chroot.cc:465 msgid "Mount Device" msgstr "Thiết bị lắp" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 #, fuzzy msgid "Session" msgstr "Phiên chạy đã quản lý" -#: sbuild/sbuild-chroot.cc:464 +#: sbuild/sbuild-chroot.cc:471 msgid "Chroot" msgstr "" -#: sbuild/sbuild-chroot.cc:636 +#: sbuild/sbuild-chroot.cc:612 #, boost-format msgid "%1% chroot: personality \"%2%\" is unknown.\n" msgstr "%1% chroot: không biết cá tính « %2% ».\n" -#: sbuild/sbuild-chroot.cc:639 +#: sbuild/sbuild-chroot.cc:615 #, boost-format msgid "Valid personalities: %1%\n" msgstr "Cá tính hợp lệ: %1%\n" @@ -418,24 +408,19 @@ msgstr "%1% chroot: không cho phép tên trùng" msgid "Available chroots: " msgstr "Các chroot sẵn sàng: " -#: sbuild/sbuild-chroot-config.cc:487 -#, fuzzy, boost-format -msgid "%1% chroot" -msgstr "%1%: Không có chroot như vậy" - -#: sbuild/sbuild-chroot-file.cc:147 +#: sbuild/sbuild-chroot-file.cc:162 msgid "File" msgstr "Tập tin" -#: sbuild/sbuild-chroot-file.cc:148 +#: sbuild/sbuild-chroot-file.cc:163 msgid "File Repack" msgstr "Nén lại tập tin" -#: sbuild/sbuild-chroot-lvm-snapshot.cc:203 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:206 msgid "LVM Snapshot Device" msgstr "Thiết bị hiện trạng Bộ Quản lý Khối tin Hợp lý" -#: sbuild/sbuild-chroot-lvm-snapshot.cc:205 +#: sbuild/sbuild-chroot-lvm-snapshot.cc:208 msgid "LVM Snapshot Options" msgstr "Tùy chọn hiện trạng Bộ Quản lý Khối tin Hợp lý" @@ -475,21 +460,21 @@ msgstr "sai" msgid "--- %1% ---" msgstr " ━━━ Chroot ━━━\n" -#: sbuild/sbuild-keyfile.cc:363 +#: sbuild/sbuild-keyfile.cc:395 #, boost-format msgid "%1% chroot: A deprecated parameter \"%2%\" has been specified." msgstr "%1% chroot: một tham số bị phản đối « %2% » đã được ghi rõ." -#: sbuild/sbuild-keyfile.cc:367 +#: sbuild/sbuild-keyfile.cc:399 msgid "This option will be removed in the future." msgstr "Tùy chọn này sẽ bị gỡ bỏ trong tương lai." -#: sbuild/sbuild-keyfile.cc:371 +#: sbuild/sbuild-keyfile.cc:403 #, boost-format msgid "%1% chroot: An obsolete parameter \"%2%\" has been specified." msgstr "%1% chroot: một tham số cũ « %2% » đã được ghi rõ." -#: sbuild/sbuild-keyfile.cc:375 +#: sbuild/sbuild-keyfile.cc:407 msgid "This option has been removed, and no longer has any effect." msgstr "Tùy chọn này đã bị gỡ bỏ nên không còn có tác động nào lại." @@ -693,428 +678,400 @@ msgstr "[%1%] %2%: %3%" msgid "Failed to set personality" msgstr "Việc lấy thiết lập thiết bị cuối bị lỗi" -#: sbuild/sbuild-session.cc:59 +#: sbuild/sbuild-session.cc:60 #, fuzzy msgid "Failed to change to directory" msgstr "%1%: việc mở thư mục bị lỗi: %2%" -#: sbuild/sbuild-session.cc:60 +#: sbuild/sbuild-session.cc:61 #, fuzzy msgid "Falling back to directory" msgstr "Đang dự trữ về thư mục chính « %1 »" -#: sbuild/sbuild-session.cc:61 +#: sbuild/sbuild-session.cc:62 msgid "Child dumped core" msgstr "Tiến trình con đã đổ lõi" -#: sbuild/sbuild-session.cc:62 +#: sbuild/sbuild-session.cc:63 msgid "Child exited abnormally (reason unknown; not a signal or core dump)" msgstr "" "Tiến trình con đã thoát bất thường (chưa biết sao ; không phải là việc đổ " "tín hiệu hay lõi)" -#: sbuild/sbuild-session.cc:63 +#: sbuild/sbuild-session.cc:64 #, fuzzy msgid "Failed to fork child" msgstr "Việc tạo tiến trình con của điều con bị lỗi: %1%" -#: sbuild/sbuild-session.cc:64 +#: sbuild/sbuild-session.cc:65 #, fuzzy msgid "Child terminated by signal" msgstr "Tiến trình con bị chấm dứt do tín hiệu « %1% »" -#: sbuild/sbuild-session.cc:65 +#: sbuild/sbuild-session.cc:66 #, fuzzy msgid "Wait for child failed" msgstr "việc đợi tiến trình con bị lỗi: %1%" -#: sbuild/sbuild-session.cc:66 +#: sbuild/sbuild-session.cc:67 #, fuzzy msgid "Failed to change root to directory" msgstr "%1%: việc mở thư mục bị lỗi: %2%" -#: sbuild/sbuild-session.cc:67 +#: sbuild/sbuild-session.cc:68 #, fuzzy msgid "No chroot found matching alias" msgstr "Không tìm thấy chroot khớp với biệt hiệu « %1% »" -#: sbuild/sbuild-session.cc:68 +#: sbuild/sbuild-session.cc:69 #, fuzzy msgid "Failed to lock chroot" msgstr "%1%: việc tìm chroot bị lỗi" -#: sbuild/sbuild-session.cc:69 +#: sbuild/sbuild-session.cc:70 #, fuzzy msgid "Chroot setup failed" msgstr "việc tạo chroot bị lỗi" -#: sbuild/sbuild-session.cc:70 +#: sbuild/sbuild-session.cc:71 #, fuzzy msgid "Failed to find chroot" msgstr "%1%: việc tìm chroot bị lỗi" -#: sbuild/sbuild-session.cc:71 +#: sbuild/sbuild-session.cc:72 #, fuzzy msgid "Failed to unlock chroot" msgstr "%1%: việc tìm chroot bị lỗi" -#: sbuild/sbuild-session.cc:73 +#: sbuild/sbuild-session.cc:74 #, fuzzy msgid "Failed to execute" msgstr "việc lập thời hạn bị lỗi: %1%" -#: sbuild/sbuild-session.cc:74 +#: sbuild/sbuild-session.cc:75 #, fuzzy msgid "Failed to get supplementary groups" msgstr "Không thể lập các ID nhóm phụ" -#: sbuild/sbuild-session.cc:75 +#: sbuild/sbuild-session.cc:76 #, fuzzy msgid "Failed to get supplementary group count" msgstr "không thể lấy số đếm nhóm phụ : %1%" -#: sbuild/sbuild-session.cc:76 +#: sbuild/sbuild-session.cc:77 #, fuzzy msgid "Failed to set group" msgstr "việc lập thời hạn bị lỗi: %1%" -#: sbuild/sbuild-session.cc:77 +#: sbuild/sbuild-session.cc:78 #, fuzzy msgid "Failed to set supplementary groups" msgstr "Không thể lập các ID nhóm phụ" -#: sbuild/sbuild-session.cc:78 +#: sbuild/sbuild-session.cc:79 #, fuzzy msgid "Group not found" msgstr "%1%: không tìm thấy nhóm" -#: sbuild/sbuild-session.cc:80 +#: sbuild/sbuild-session.cc:81 #, fuzzy msgid "Failed to drop root permissions" msgstr "Việc bỏ quyền chủ bị lỗi." -#: sbuild/sbuild-session.cc:81 +#: sbuild/sbuild-session.cc:82 #, fuzzy msgid "Shell not available" msgstr "%1%: việc lấy các thông tin về tập tin bị lỗi: %2%" -#: sbuild/sbuild-session.cc:82 +#: sbuild/sbuild-session.cc:83 #, fuzzy msgid "Falling back to shell" msgstr "Đang dự trữ về « %1 »" -#: sbuild/sbuild-session.cc:83 +#: sbuild/sbuild-session.cc:84 #, fuzzy msgid "Caught hangup signal" msgstr "mới bắt tín hiệu ngừng nói nên kết thúc..." -#: sbuild/sbuild-session.cc:84 +#: sbuild/sbuild-session.cc:85 #, fuzzy msgid "Failed to set hangup signal handler" msgstr "lỗi lập bộ quản lý ngừng nói : %1%" -#: sbuild/sbuild-session.cc:85 +#: sbuild/sbuild-session.cc:86 #, fuzzy msgid "Failed to set user" msgstr "việc lập thời hạn bị lỗi: %1%" -#: sbuild/sbuild-session.cc:86 +#: sbuild/sbuild-session.cc:87 msgid "User switching is not permitted" msgstr "" -#: sbuild/sbuild-session.cc:659 +#: sbuild/sbuild-session.cc:652 #, fuzzy, boost-format msgid "[%1% chroot] Running login shell: \"%4%\"" msgstr "[%1% chroot] Đang chạy hệ vỏ đăng nhập: « %2% »" -#: sbuild/sbuild-session.cc:661 +#: sbuild/sbuild-session.cc:654 #, fuzzy, boost-format msgid "[%1% chroot] Running shell: \"%4%\"" msgstr "[%1% chroot] Đang chạy hệ vỏ đăng nhập: « %2% »" -#: sbuild/sbuild-session.cc:667 +#: sbuild/sbuild-session.cc:660 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Đang chạy hệ vỏ đăng nhập: « %4% »" -#: sbuild/sbuild-session.cc:669 +#: sbuild/sbuild-session.cc:662 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running shell: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Đang chạy hệ vỏ đăng nhập: « %4% »" -#: sbuild/sbuild-session.cc:704 +#: sbuild/sbuild-session.cc:697 #, fuzzy, boost-format msgid "[%1% chroot] Running command: \"%4%\"" msgstr "[%1% chroot] Đang chạy lệnh: « %2% »" -#: sbuild/sbuild-session.cc:706 +#: sbuild/sbuild-session.cc:699 #, boost-format msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\"" msgstr "[%1% chroot] (%2%->%3%) Đang chạy lệnh: « %4% »" -#: sbuild/sbuild-session.cc:889 +#: sbuild/sbuild-session.cc:882 #, boost-format msgid "stage=%1%" msgstr "" -#: sbuild/sbuild-session.cc:1035 +#: sbuild/sbuild-session.cc:1028 msgid "terminating immediately" msgstr "" -#: schroot/schroot-listmounts.cc:61 schroot/schroot-main.cc:59 -#: schroot/schroot-releaselock.cc:56 -#, fuzzy, boost-format -msgid "%1% (Debian sbuild) %2% (%3%)\n" -msgstr "%1% (Debian sbuild) %2%\n" - -#: schroot/schroot-listmounts.cc:65 schroot/schroot-main.cc:63 -#: schroot/schroot-releaselock.cc:60 -msgid "" -"Written by Roger Leigh\n" -"\n" -msgstr "" -"Do Roger Leigh tạo\n" -"\n" - -#: schroot/schroot-listmounts.cc:66 schroot/schroot-main.cc:64 -#: schroot/schroot-releaselock.cc:61 -msgid "Copyright (C) 2004-2006 Roger Leigh\n" -msgstr "Bản quyền © năm 2004-2006 Roger Leigh\n" - -#: schroot/schroot-listmounts.cc:67 schroot/schroot-main.cc:65 -#: schroot/schroot-releaselock.cc:62 -msgid "" -"This is free software; see the source for copying conditions. There is NO\n" -"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +#: schroot/schroot-listmounts-options.cc:41 +msgid "Mount" msgstr "" -"Đây là phần mềm tự do; hãy xem mã nguồn để tìm thấy điều kiện sao chép.\n" -"• Không bảo đảm gì cả, dù khă nang bán hay khả năng làm việc dứt khoát. •\n" - -#: schroot/schroot-listmounts.cc:89 -#, boost-format -msgid "%1%: Failed to open: %2%" -msgstr "%1%: việc mở bị lỗi: %2%" -#: schroot/schroot-listmounts.cc:112 -#, boost-format -msgid "%1%: Failed to close: %2%" -msgstr "%1%: việc đóng bị lỗi: %2%" - -#: schroot/schroot-listmounts.cc:158 -msgid "No mountpoint specified" -msgstr "Chưa xác định điểm lắp" - -#: schroot/schroot-listmounts-options.cc:42 schroot/schroot-options-base.cc:48 -#: schroot/schroot-releaselock-options.cc:43 -msgid "General options" -msgstr "Tùy chọn chung" - -#: schroot/schroot-listmounts-options.cc:44 schroot/schroot-options-base.cc:69 -#: schroot/schroot-releaselock-options.cc:45 -msgid "Show help options" -msgstr "Hiện tùy chọn trợ giúp" - -#: schroot/schroot-listmounts-options.cc:46 schroot/schroot-options-base.cc:71 -#: schroot/schroot-releaselock-options.cc:47 -msgid "Print version information" -msgstr "In ra thông tin phiên bản" - -#: schroot/schroot-listmounts-options.cc:48 -#: schroot/schroot-releaselock-options.cc:49 -msgid "Lock options" -msgstr "Tùy chọn khoá" - -#: schroot/schroot-listmounts-options.cc:51 +#: schroot/schroot-listmounts-options.cc:56 msgid "Mountpoint to check (full path)" msgstr "Điểm lắp cần kiểm tra (đường dẫn đầy đủ)" -#: schroot/schroot-listmounts-options.cc:65 +#: schroot/schroot-listmounts-options.cc:85 #, fuzzy -msgid "schroot-listmounts [OPTION...] - list mounts" -msgstr " schroot-listmounts [TÙY_CHỌN...] — liệt kê các sự gắn kết" +msgid "No mount point specified" +msgstr "Chưa xác định điểm lắp" -#: schroot/schroot-main.cc:74 +#: schroot/schroot-listmounts-options.cc:92 +#: schroot/schroot-options-base.cc:214 +#: schroot/schroot-releaselock-options.cc:95 +msgid "Only one action may be specified" +msgstr "Có thể ghi rõ chỉ một hành động thôi" + +#: schroot/schroot-main.cc:55 #, fuzzy, boost-format msgid "schroot configuration generated by %1% %2% on %3%" msgstr "Cấu hình schroot được tạo ra bởi %1% %2%" -#: schroot/schroot-main.cc:139 -#, boost-format -msgid "%1%: No such chroot" -msgstr "%1%: Không có chroot như vậy" - -#: schroot/schroot-main.cc:195 -msgid "Error saving terminal settings" -msgstr "Gặp lỗi khi lưu thiết lập thiết bị cuối" - -#: schroot/schroot-main.cc:227 -#, boost-format -msgid "No chroots are defined in %1% or %2%" -msgstr "Chưa định nghĩa chroot trong %1% hay trong %2%" - -#: schroot/schroot-main.cc:235 -#, boost-format -msgid "No chroots are defined in %1%" -msgstr "Chưa định nghĩa chroot trong %1%" - -#: schroot/schroot-main.cc:252 -#, boost-format -msgid "The specified chroots are not defined in %1%" -msgstr "Chưa định nghĩa những chroot đã ghi rõ trong %1%" - -#: schroot/schroot-main.cc:279 -msgid "Only one chroot may be specified when beginning a session" -msgstr "Có thể ghi rõ chỉ một chroot khi khởi chạy phiên" - -#: schroot/schroot-main.cc:336 schroot/schroot-main.cc:352 -msgid "Error restoring terminal settings" -msgstr "Gặp lỗi khi phục hồi thiết lập thiết bị cuối" - -#: schroot/schroot-options-base.cc:49 +#: schroot/schroot-options-base.cc:46 msgid "Chroot selection" msgstr "Chọn chroot" -#: schroot/schroot-options-base.cc:50 +#: schroot/schroot-options-base.cc:47 msgid "Chroot environment" msgstr "Môi trường chroot" -#: schroot/schroot-options-base.cc:51 +#: schroot/schroot-options-base.cc:48 msgid "Session management" msgstr "Quản lý phiên chạy" -#: schroot/schroot-options-base.cc:52 -msgid "Hidden options" -msgstr "Tùy chọn bị ẩn" - -#: schroot/schroot-options-base.cc:73 -msgid "Show less output" -msgstr "Xuất ít hơn" - -#: schroot/schroot-options-base.cc:75 -msgid "Show more output" -msgstr "Xuất nhiều hơn" - -#: schroot/schroot-options-base.cc:77 +#: schroot/schroot-options-base.cc:63 msgid "List available chroots" msgstr "Liệt kê các chroot sẵn sàng" -#: schroot/schroot-options-base.cc:79 +#: schroot/schroot-options-base.cc:65 msgid "Show information about selected chroots" msgstr "Hiện thông tin về các chroot được chọn" -#: schroot/schroot-options-base.cc:81 +#: schroot/schroot-options-base.cc:67 msgid "Dump configuration of selected chroots" msgstr "Đổ cấu hình của các chroot đã chọn" -#: schroot/schroot-options-base.cc:85 +#: schroot/schroot-options-base.cc:71 msgid "Use specified chroot" msgstr "Dùng chroot đã xác định" -#: schroot/schroot-options-base.cc:89 +#: schroot/schroot-options-base.cc:75 msgid "Command to run" msgstr "Lệnh cần chạy" -#: schroot/schroot-options-base.cc:91 -msgid "Enable debugging messages" -msgstr "" - -#: schroot/schroot-options-base.cc:190 +#: schroot/schroot-options-base.cc:158 msgid "" "Only one chroot may be specified when recovering, running or ending a session" msgstr "" "Có thể ghi rõ chỉ một chroot khi phục hồi, chạy hoặc kết thúc một phiên chạy" -#: schroot/schroot-options-base.cc:215 +#: schroot/schroot-options-base.cc:184 msgid "--chroot may not be used with --list" msgstr "" "Không cho phép sử dụng tùy chọn cả « --chroot » lẫn « --list » (liệt kê) đều " "đồng thời." -#: schroot/schroot-options-base.cc:237 +#: schroot/schroot-options-base.cc:206 #, fuzzy msgid "Unknown action specified" msgstr "Có thể ghi rõ chỉ một hành động thôi" -#: schroot/schroot-options-base.cc:245 -msgid "Only one action may be specified" -msgstr "Có thể ghi rõ chỉ một hành động thôi" - -#: schroot/schroot-options.cc:56 +#: schroot/schroot-options.cc:51 msgid "Print location of selected chroots" msgstr "In ra địa điểm của các chroot đã chọn" -#: schroot/schroot-options.cc:60 +#: schroot/schroot-options.cc:55 msgid "Select all chroots and active sessions" msgstr "Chọn mọi chroot và phiên chạy hoạt động đều" -#: schroot/schroot-options.cc:64 +#: schroot/schroot-options.cc:59 msgid "Select all active sessions" msgstr "Chọn mọi phiên chạy hoạt động" -#: schroot/schroot-options.cc:68 +#: schroot/schroot-options.cc:63 msgid "Username (default current user)" msgstr "Tên người dùng (người dùng hiện thời mặc định)" -#: schroot/schroot-options.cc:74 +#: schroot/schroot-options.cc:69 msgid "Begin a session; returns a session ID" msgstr "Khởi chạy phiên; gởi trả một mã nhận diện phiên chạy" -#: schroot/schroot-options.cc:76 +#: schroot/schroot-options.cc:71 msgid "Recover an existing session" msgstr "Phục hồi một phiên chạy đã có" -#: schroot/schroot-options.cc:78 +#: schroot/schroot-options.cc:73 msgid "Run an existing session" msgstr "Chạy một phiên chạy đã có" -#: schroot/schroot-options.cc:80 +#: schroot/schroot-options.cc:75 msgid "End an existing session" msgstr "Kết thúc một phiên chạy đã có" -#: schroot/schroot-options.cc:82 +#: schroot/schroot-options.cc:77 msgid "Force operation, even if it fails" msgstr "Ép buộc thao tác, thậm chí nếu nó bị lỗi" -#: schroot/schroot-releaselock.cc:105 +#: schroot/schroot-releaselock-options.cc:42 +msgid "Lock" +msgstr "" + +#: schroot/schroot-releaselock-options.cc:57 +msgid "Device to unlock (full path)" +msgstr "Thiết bị cần bỏ khoá (đường dẫn đầy đủ)" + +#: schroot/schroot-releaselock-options.cc:59 +msgid "Process ID owning the lock" +msgstr "Mã nhận diện tiến trình mà sở hữu khoá đó" + +#: schroot/schroot-releaselock-options.cc:88 msgid "No device specified" msgstr "Chưa ghi rõ thiết bị" -#: schroot/schroot-releaselock.cc:111 -msgid "No pid specified; forcing release of lock" -msgstr "Chưa ghi rõ PID (mã nhận diện tiến trình) nên đang ép buộc nhả khoá" +#~ msgid "Usage:" +#~ msgstr "Cách sử dụng:" -#: schroot/schroot-releaselock.cc:120 -#, boost-format -msgid "Failed to stat device %1%: %2%" -msgstr "Việc lấy các thông tin về thiết bị %1% bị lỗi: %2%" +#, fuzzy +#~ msgid "%1% chroot" +#~ msgstr "%1%: Không có chroot như vậy" -#: schroot/schroot-releaselock.cc:128 -#, boost-format -msgid "%1% is not a block device" -msgstr "%1% không phải là thiết bị khối" +#, fuzzy +#~ msgid "%1% (Debian sbuild) %2% (%3%)\n" +#~ msgstr "%1% (Debian sbuild) %2%\n" -#: schroot/schroot-releaselock.cc:136 -#, boost-format -msgid "%1%: failed to release device lock" -msgstr "%1%: không nhả khoá thiết bị được" +#~ msgid "" +#~ "Written by Roger Leigh\n" +#~ "\n" +#~ msgstr "" +#~ "Do Roger Leigh tạo\n" +#~ "\n" -#: schroot/schroot-releaselock.cc:143 -#, boost-format -msgid "%1%: failed to release device lock owned by pid %2%" -msgstr "%1%: việc nhả khoá thiết bị do PID %2% sở hữư bị lỗi" +#~ msgid "Copyright (C) 2004-2006 Roger Leigh\n" +#~ msgstr "Bản quyền © năm 2004-2006 Roger Leigh\n" -#: schroot/schroot-releaselock-options.cc:52 -msgid "Device to unlock (full path)" -msgstr "Thiết bị cần bỏ khoá (đường dẫn đầy đủ)" +#~ msgid "" +#~ "This is free software; see the source for copying conditions. There is " +#~ "NO\n" +#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " +#~ "PURPOSE.\n" +#~ msgstr "" +#~ "Đây là phần mềm tự do; hãy xem mã nguồn để tìm thấy điều kiện sao chép.\n" +#~ "• Không bảo đảm gì cả, dù khă nang bán hay khả năng làm việc dứt khoát. " +#~ "•\n" -#: schroot/schroot-releaselock-options.cc:54 -msgid "Process ID owning the lock" -msgstr "Mã nhận diện tiến trình mà sở hữu khoá đó" +#~ msgid "%1%: Failed to open: %2%" +#~ msgstr "%1%: việc mở bị lỗi: %2%" + +#~ msgid "%1%: Failed to close: %2%" +#~ msgstr "%1%: việc đóng bị lỗi: %2%" + +#~ msgid "General options" +#~ msgstr "Tùy chọn chung" + +#~ msgid "Show help options" +#~ msgstr "Hiện tùy chọn trợ giúp" + +#~ msgid "Print version information" +#~ msgstr "In ra thông tin phiên bản" + +#~ msgid "Lock options" +#~ msgstr "Tùy chọn khoá" + +#, fuzzy +#~ msgid "schroot-listmounts [OPTION...] - list mounts" +#~ msgstr " schroot-listmounts [TÙY_CHỌN...] — liệt kê các sự gắn kết" + +#~ msgid "%1%: No such chroot" +#~ msgstr "%1%: Không có chroot như vậy" + +#~ msgid "Error saving terminal settings" +#~ msgstr "Gặp lỗi khi lưu thiết lập thiết bị cuối" + +#~ msgid "No chroots are defined in %1% or %2%" +#~ msgstr "Chưa định nghĩa chroot trong %1% hay trong %2%" + +#~ msgid "No chroots are defined in %1%" +#~ msgstr "Chưa định nghĩa chroot trong %1%" + +#~ msgid "The specified chroots are not defined in %1%" +#~ msgstr "Chưa định nghĩa những chroot đã ghi rõ trong %1%" + +#~ msgid "Only one chroot may be specified when beginning a session" +#~ msgstr "Có thể ghi rõ chỉ một chroot khi khởi chạy phiên" + +#~ msgid "Error restoring terminal settings" +#~ msgstr "Gặp lỗi khi phục hồi thiết lập thiết bị cuối" + +#~ msgid "Hidden options" +#~ msgstr "Tùy chọn bị ẩn" + +#~ msgid "Show less output" +#~ msgstr "Xuất ít hơn" + +#~ msgid "Show more output" +#~ msgstr "Xuất nhiều hơn" + +#~ msgid "No pid specified; forcing release of lock" +#~ msgstr "Chưa ghi rõ PID (mã nhận diện tiến trình) nên đang ép buộc nhả khoá" + +#~ msgid "Failed to stat device %1%: %2%" +#~ msgstr "Việc lấy các thông tin về thiết bị %1% bị lỗi: %2%" + +#~ msgid "%1% is not a block device" +#~ msgstr "%1% không phải là thiết bị khối" + +#~ msgid "%1%: failed to release device lock" +#~ msgstr "%1%: không nhả khoá thiết bị được" + +#~ msgid "%1%: failed to release device lock owned by pid %2%" +#~ msgstr "%1%: việc nhả khoá thiết bị do PID %2% sở hữư bị lỗi" -#: schroot/schroot-releaselock-options.cc:68 #, fuzzy -msgid "schroot-releaselock [OPTION...] - release a device lock" -msgstr " schroot-releaselock [TÙY_CHỌN...] — nhả khoá thiết bị" +#~ msgid "schroot-releaselock [OPTION...] - release a device lock" +#~ msgstr " schroot-releaselock [TÙY_CHỌN...] — nhả khoá thiết bị" #, fuzzy #~ msgid "To allow users access to the chroots, use the users or groups keys." diff --git a/sbuild/Makefile.am b/sbuild/Makefile.am index 1b7ef846..65f9fc84 100644 --- a/sbuild/Makefile.am +++ b/sbuild/Makefile.am @@ -56,6 +56,7 @@ sbuild_public_h_sources = \ sbuild-parse-error.h \ sbuild-parse-value.h \ sbuild-personality.h \ + sbuild-run-parts.h \ sbuild-session.h \ sbuild-types.h \ sbuild-tr1types.h \ @@ -83,6 +84,7 @@ sbuild_public_cc_sources = \ sbuild-parse-error.cc \ sbuild-parse-value.cc \ sbuild-personality.cc \ + sbuild-run-parts.cc \ sbuild-session.cc \ sbuild-util.cc diff --git a/sbuild/sbuild-run-parts.cc b/sbuild/sbuild-run-parts.cc new file mode 100644 index 00000000..9fd124e1 --- /dev/null +++ b/sbuild/sbuild-run-parts.cc @@ -0,0 +1,253 @@ +/* Copyright © 2005-2006 Roger Leigh <rleigh@debian.org> + * + * schroot is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + *********************************************************************/ + +#include <config.h> + +#include "sbuild-dirstream.h" +#include "sbuild-run-parts.h" +#include "sbuild-util.h" + +#include <cerrno> + +#include <sys/wait.h> + +#include <boost/format.hpp> +#include <boost/regex.hpp> + +using boost::format; +using boost::regex; +using namespace sbuild; + +namespace +{ + + typedef std::pair<sbuild::run_parts::error_code,const char *> emap; + + /** + * This is a list of the supported error codes. It's used to + * construct the real error codes map. + */ + emap init_errors[] = + { + emap(run_parts::CHILD_FORK, N_("Failed to fork child")), + emap(run_parts::CHILD_WAIT, N_("Wait for child failed")), + emap(run_parts::EXEC, N_("Failed to execute")) + }; + +} + +template<> +std::map<run_parts::error_code,const char *> +custom_error<run_parts::error_code>::error_strings +(init_errors, + init_errors + (sizeof(init_errors) / sizeof(init_errors[0]))); + +run_parts::run_parts (std::string const& directory, + bool lsb_mode, + bool abort_on_error, + mode_t umask): + lsb_mode(true), + abort_on_error(abort_on_error), + umask(umask), + verbose(false), + reverse(false), + // restricted(true), + directory(directory), + programs() +{ + dirstream stream(directory); + direntry de; + while (stream >> de) + { + std::string name(de.name()); + if (check_filename(name)) + this->programs.insert(name); + } +} + +run_parts::~run_parts () +{ +} + +bool +run_parts::get_verbose () const +{ + return this->verbose; +} + +void +run_parts::set_verbose (bool verbose) +{ + this->verbose = verbose; +} + +bool +run_parts::get_reverse () const +{ + return this->reverse; +} + +void +run_parts::set_reverse (bool reverse) +{ + this->reverse = reverse; +} + +int +run_parts::run (string_list const& command, + environment const& env) +{ + int exit_status = 0; + + if (!this->reverse) + { + for (program_set::const_iterator pos = this->programs.begin(); + pos != this->programs.end(); + ++pos) + { + string_list real_command; + real_command.push_back(*pos); + for (string_list::const_iterator spos = command.begin(); + spos != command.end(); + ++spos) + real_command.push_back(*spos); + + exit_status = run_child(*pos, real_command, env); + + if (exit_status && this->abort_on_error) + return exit_status; + } + } + else + { + for (program_set::const_reverse_iterator pos = this->programs.rbegin(); + pos != this->programs.rend(); + ++pos) + { + string_list real_command; + real_command.push_back(*pos); + for (string_list::const_iterator spos = command.begin(); + spos != command.end(); + ++spos) + real_command.push_back(*spos); + + exit_status = run_child(*pos, real_command, env); + + if (exit_status && this->abort_on_error) + return exit_status; + } + } + + return exit_status; +} + +int +run_parts::run_child (std::string const& file, + string_list const& command, + environment const& env) +{ + int exit_status = 0; + pid_t pid; + + if ((pid = fork()) == -1) + { + throw error(CHILD_FORK, errno); + } + else if (pid == 0) + { + if (this->verbose) + log_info() << format(_("Executing %1%")) + % string_list_to_string(command, " ") + << std::endl; + ::umask(this->umask); + exec(this->directory + '/' + file, command, env); + error e(file, EXEC, errno); + log_error() << e.what() << std::endl; + exit(EXIT_FAILURE); + } + else + { + wait_for_child(pid, exit_status); + } + + return exit_status; +} + +void +run_parts::wait_for_child (pid_t pid, + int& child_status) +{ + child_status = EXIT_FAILURE; // Default exit status + + int status; + + while (1) + { + if (wait(&status) != pid) + { + if (errno == EINTR) + continue; // Wait again. + else + throw error(CHILD_WAIT, errno); + } + else + break; + } + + if (WIFEXITED(status)) + child_status = WEXITSTATUS(status); +} + +bool +run_parts::check_filename (std::string const& name) +{ + bool match = false; + + if (this->lsb_mode) + { + static regex lanana_namespace("^[a-z0-9]+$", boost::regex::basic); + static regex lsb_namespace("^_?([a-z0-9_.]+-)+[a-z0-9]+$", + boost::regex::basic); + static regex debian_cron_namespace("^[a-z0-9][a-z0-9-]*$", + boost::regex::basic); + static regex debian_dpkg_conffile_cruft("dpkg-(old|dist|new|tmp)$", + boost::regex::extended); + + if ((regex_match(name, lanana_namespace) || + regex_match(name, lsb_namespace) || + regex_match(name, debian_cron_namespace)) && + !regex_match(name, debian_dpkg_conffile_cruft)) + match = true; + } + else + { + static regex traditional_namespace("^[a-zA-Z0-9_-]$", + boost::regex::basic); + if (regex_match(name, traditional_namespace)) + match = true; + } + + return match; +} + +/* + * Local Variables: + * mode:C++ + * End: + */ diff --git a/sbuild/sbuild-run-parts.h b/sbuild/sbuild-run-parts.h new file mode 100644 index 00000000..1b5def29 --- /dev/null +++ b/sbuild/sbuild-run-parts.h @@ -0,0 +1,162 @@ +/* Copyright © 2005-2006 Roger Leigh <rleigh@debian.org> + * + * schroot is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + *********************************************************************/ + +#ifndef SBUILD_RUN_PARTS_H +#define SBUILD_RUN_PARTS_H + +#include <sbuild/sbuild-custom-error.h> +#include <sbuild/sbuild-environment.h> +#include <sbuild/sbuild-types.h> + +#include <set> +#include <string> + +#include <sys/types.h> +#include <sys/stat.h> + +namespace sbuild +{ + + /** + * Run all scripts or programs within a directory. + */ + class run_parts + { + public: + /// Error codes. + enum error_code + { + CHILD_FORK, ///< Failed to fork child. + CHILD_WAIT, ///< Wait for child failed. + EXEC ///< Failed to execute. + }; + + /// Exception type. + typedef custom_error<error_code> error; + + /// The constructor. + run_parts (std::string const& directory, + bool lsb_mode = true, + bool abort_on_error = true, + mode_t umask = 022); + + /// The destructor. + ~run_parts (); + + /** + * Get the verbosity level. + * + * @returns true if verbose, otherwise false. + */ + bool + get_verbose () const; + + /** + * Set the verbosity level. + * + * @param verbose true to be verbose, otherwise false. + */ + void + set_verbose (bool verbose); + + /** + * Get the script execution order. + * + * @returns true if executing in reverse, otherwise false. + */ + bool + get_reverse () const; + + /** + * Set the script execution order. + * + * @param reverse true to execute in reverse, otherwise false. + */ + void + set_reverse (bool reverse); + + int + run(string_list const& command, + environment const& env); + + + /** + * Output the environment to an ostream. + * + * @param stream the stream to output to. + * @param rhs the environment to output. + * @returns the stream. + */ + template <class charT, class traits> + friend + std::basic_ostream<charT,traits>& + operator << (std::basic_ostream<charT,traits>& stream, + run_parts const& rhs) + { + if (!rhs.reverse) + { + for (program_set::const_iterator pos = rhs.programs.begin(); + pos != rhs.programs.end(); + ++pos) + stream << *pos << '\n'; + } + else + { + for (program_set::const_reverse_iterator pos = rhs.programs.rbegin(); + pos != rhs.programs.rend(); + ++pos) + stream << *pos << '\n'; + } + return stream; + } + + private: + int + run_child(std::string const& file, + string_list const& command, + environment const& env); + + void + wait_for_child (pid_t pid, + int& child_status); + + bool + check_filename (std::string const& name); + + typedef std::set<std::string> program_set; + + bool lsb_mode; + bool abort_on_error; + mode_t umask; + bool verbose; + bool reverse; + // bool restricted; + std::string directory; + program_set programs; + }; + +} + +#endif /* SBUILD_RUN_PARTS_H */ + +/* + * Local Variables: + * mode:C++ + * End: + */ diff --git a/sbuild/sbuild-session.cc b/sbuild/sbuild-session.cc index c62fd7e3..125c2655 100644 --- a/sbuild/sbuild-session.cc +++ b/sbuild/sbuild-session.cc @@ -22,6 +22,7 @@ #include "sbuild-chroot-plain.h" #include "sbuild-chroot-lvm-snapshot.h" #include "sbuild-session.h" +#include "sbuild-util.h" #include <cassert> #include <cerrno> @@ -1106,24 +1107,6 @@ session::run_chroot (sbuild::chroot::ptr& session_chroot) } } -int -session::exec (std::string const& file, - string_list const& command, - environment const& env) -{ - char **argv = string_list_to_strv(command); - char **envp = env.get_strv(); - int status; - - if ((status = execve(file.c_str(), argv, envp)) != 0) - { - strv_delete(argv); - strv_delete(envp); - } - - return status; -} - void session::set_sighup_handler () { diff --git a/sbuild/sbuild-session.h b/sbuild/sbuild-session.h index 93f13df8..1c36b4c5 100644 --- a/sbuild/sbuild-session.h +++ b/sbuild/sbuild-session.h @@ -304,20 +304,6 @@ namespace sbuild private: /** - * execve wrapper. Run the command specified by file (an absolute - * pathname), using command and env as the argv and environment, - * respectively. - * - * @param file the program to execute. - * @param command the arguments to pass to the executable. - * @param env the environment. - * @returns the return value of the execve system call on failure. - */ - int - exec (std::string const& file, - string_list const& command, - environment const& env); - /** * Setup a chroot. This runs all of the commands in setup.d or run.d. * * The environment variables CHROOT_NAME, CHROOT_DESCRIPTION, diff --git a/sbuild/sbuild-util.cc b/sbuild/sbuild-util.cc index 4c1daf9e..bcc539a0 100644 --- a/sbuild/sbuild-util.cc +++ b/sbuild/sbuild-util.cc @@ -329,6 +329,24 @@ sbuild::strv_delete (char **strv) delete[] strv; } +int +sbuild::exec (std::string const& file, + string_list const& command, + environment const& env) +{ + char **argv = string_list_to_strv(command); + char **envp = env.get_strv(); + int status; + + if ((status = execve(file.c_str(), argv, envp)) != 0) + { + strv_delete(argv); + strv_delete(envp); + } + + return status; +} + /* * Local Variables: * mode:C++ diff --git a/sbuild/sbuild-util.h b/sbuild/sbuild-util.h index a849f138..b3e6adae 100644 --- a/sbuild/sbuild-util.h +++ b/sbuild/sbuild-util.h @@ -20,6 +20,7 @@ #ifndef SBUILD_UTIL_H #define SBUILD_UTIL_H +#include <sbuild/sbuild-environment.h> #include <sbuild/sbuild-types.h> #include <string> @@ -158,6 +159,20 @@ namespace sbuild void strv_delete (char **strv); + /** + * execve wrapper. Run the command specified by file (an absolute + * pathname), using command and env as the argv and environment, + * respectively. + * + * @param file the program to execute. + * @param command the arguments to pass to the executable. + * @param env the environment. + * @returns the return value of the execve system call on failure. + */ + int + exec (std::string const& file, + string_list const& command, + environment const& env); } #endif /* SBUILD_UTIL_H */ diff --git a/test/Makefile.am b/test/Makefile.am index 29ccc4c7..742b1f86 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -38,6 +38,7 @@ noinst_PROGRAMS = \ sbuild-nostream \ sbuild-parse-value \ sbuild-personality \ + sbuild-run-parts \ sbuild-util # sbuild-lock is excluded, because it is timing dependent and can fail @@ -51,6 +52,7 @@ TESTS = sbuild-chroot \ sbuild-nostream \ sbuild-parse-value \ sbuild-personality \ + sbuild-run-parts \ sbuild-util endif @@ -95,6 +97,9 @@ sbuild_parse_value_LDADD = libtest.la sbuild_personality_SOURCES = sbuild-personality.cc sbuild_personality_LDADD = libtest.la +sbuild_run_parts_SOURCES = sbuild-run-parts.cc +sbuild_run_parts_LDADD = libtest.la + sbuild_util_SOURCES = sbuild-util.cc sbuild_util_LDADD = libtest.la @@ -106,4 +111,9 @@ EXTRA_DIST = \ config.ex2/experimental \ config.ex2/sarge \ config.ex2/sid \ - config.ex2/woody + config.ex2/woody \ + run-parts.ex1/10test1 \ + run-parts.ex1/20test2 \ + run-parts.ex1/30test3 \ + run-parts.ex2 \ + run-parts.ex3/50invalid diff --git a/test/run-parts.ex1/10test1 b/test/run-parts.ex1/10test1 new file mode 100755 index 00000000..99713ff2 --- /dev/null +++ b/test/run-parts.ex1/10test1 @@ -0,0 +1,4 @@ +#!/bin/sh +#echo "10test1 $1" >&2 + +exit 0 diff --git a/test/run-parts.ex1/20test2 b/test/run-parts.ex1/20test2 new file mode 100755 index 00000000..977eb52d --- /dev/null +++ b/test/run-parts.ex1/20test2 @@ -0,0 +1,8 @@ +#!/bin/sh +#echo "20test2 $1" >&2 + +if [ "$1" = "fail" ]; then + exit 1 +fi + +exit 0 diff --git a/test/run-parts.ex1/30test3 b/test/run-parts.ex1/30test3 new file mode 100755 index 00000000..8baa367b --- /dev/null +++ b/test/run-parts.ex1/30test3 @@ -0,0 +1,8 @@ +#!/bin/sh +#echo "30test3 $1" >&2 + +if [ "$1" = "ok" ]; then + exit 0 +fi + +exit 1 diff --git a/test/run-parts.ex3/50invalid b/test/run-parts.ex3/50invalid new file mode 100644 index 00000000..a9cac3ec --- /dev/null +++ b/test/run-parts.ex3/50invalid @@ -0,0 +1 @@ +This file is not executable. diff --git a/test/sbuild-run-parts.cc b/test/sbuild-run-parts.cc new file mode 100644 index 00000000..013193a7 --- /dev/null +++ b/test/sbuild-run-parts.cc @@ -0,0 +1,138 @@ +/* Copyright © 2006 Roger Leigh <rleigh@debian.org> + * + * schroot is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + *********************************************************************/ + +#include <sbuild/sbuild-dirstream.h> +#include <sbuild/sbuild-nostream.h> +#include <sbuild/sbuild-run-parts.h> +#include <sbuild/sbuild-util.h> + +#include <iostream> +#include <sstream> + +#include <cppunit/extensions/HelperMacros.h> + +using namespace CppUnit; + +class test_run_parts : public TestFixture +{ + CPPUNIT_TEST_SUITE(test_run_parts); + CPPUNIT_TEST(test_construction); + CPPUNIT_TEST_EXCEPTION(test_construction_fail, sbuild::dirstream::error); + CPPUNIT_TEST(test_run); + CPPUNIT_TEST(test_run2); + CPPUNIT_TEST(test_run3); + CPPUNIT_TEST_SUITE_END(); + + std::streambuf *saved; + sbuild::basic_nbuf<char> *monitor; + +public: + test_run_parts(): + TestFixture() + {} + + void setUp() + { + this->monitor = new sbuild::basic_nbuf<char>(); + this->saved = std::cerr.std::ios::rdbuf(this->monitor); + } + + void tearDown() + { + std::cerr.std::ios::rdbuf(this->saved); + delete this->monitor; + } + + + virtual ~test_run_parts() + {} + + void + test_construction() + { + sbuild::run_parts rp(SRCDIR "/run-parts.ex1"); + } + + void + test_construction_fail() + { + sbuild::run_parts rp(SRCDIR "/invalid_dir"); + } + + void test_run() + { + sbuild::run_parts rp(SRCDIR "/run-parts.ex1"); + + int status; + + sbuild::string_list command; + sbuild::environment env(environ); + + command.push_back("ok"); + status = rp.run(command, env); + CPPUNIT_ASSERT(status == EXIT_SUCCESS); + + command.clear(); + command.push_back("fail"); + status = rp.run(command, env); + CPPUNIT_ASSERT(status == EXIT_FAILURE); + + command.clear(); + command.push_back("fail2"); + status = rp.run(command, env); + CPPUNIT_ASSERT(status == EXIT_FAILURE); + } + + void test_run2() + { + sbuild::run_parts rp(SRCDIR "/run-parts.ex2"); + + int status; + + sbuild::string_list command; + sbuild::environment env(environ); + + command.push_back("ok"); + status = rp.run(command, env); + CPPUNIT_ASSERT(status == EXIT_SUCCESS); + } + + void test_run3() + { + sbuild::run_parts rp(SRCDIR "/run-parts.ex3"); + + int status; + + sbuild::string_list command; + sbuild::environment env(environ); + + command.push_back("ok"); + status = rp.run(command, env); + CPPUNIT_ASSERT(status == EXIT_FAILURE); + } + +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(test_run_parts); + +/* + * Local Variables: + * mode:C++ + * End: + */ |