summaryrefslogtreecommitdiffstats
path: root/po/cy.po
diff options
context:
space:
mode:
Diffstat (limited to 'po/cy.po')
-rw-r--r--po/cy.po179
1 files changed, 92 insertions, 87 deletions
diff --git a/po/cy.po b/po/cy.po
index 00f61933..54845c57 100644
--- a/po/cy.po
+++ b/po/cy.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: urpmi 3.3\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-01-17 20:17+0800\n"
+"POT-Creation-Date: 2006-02-02 19:45+0800\n"
"PO-Revision-Date: 2005-06-28 21:39-0000\n"
"Last-Translator: Rhoslyn Prys <post@meddal.com>\n"
"Language-Team: Cymraeg/Welsh <post@meddal.com>\n"
@@ -218,7 +218,7 @@ msgstr ""
msgid "removing %s"
msgstr "tynnu %s"
-#: ../gurpmi2:268 ../urpm.pm:2878
+#: ../gurpmi2:268 ../urpm.pm:2895
msgid "Preparing..."
msgstr "Paratoi..."
@@ -313,7 +313,7 @@ msgstr "methu cael mynediad i ffeil hdlist\"%s\", anwybyddu'r cyfrwng"
#. list file exists but isn't readable
#. report error only if no result found, list files are only readable by root
-#: ../urpm.pm:232 ../urpm.pm:2493
+#: ../urpm.pm:232 ../urpm.pm:2510
#, c-format
msgid "unable to access list file of \"%s\", medium ignored"
msgstr "methu cael mynediad ffeil rhestr \"%s\", anwybyddu'r cyfrwng"
@@ -447,16 +447,16 @@ msgstr ""
#. - read default synthesis (we have to make sure nothing get out of depslist).
#: ../urpm.pm:564 ../urpm.pm:590 ../urpm.pm:1076 ../urpm.pm:1087
#: ../urpm.pm:1159 ../urpm.pm:1176 ../urpm.pm:1231 ../urpm.pm:1287
-#: ../urpm.pm:1491 ../urpm.pm:1611 ../urpm.pm:1728 ../urpm.pm:1734
-#: ../urpm.pm:1837 ../urpm.pm:1923 ../urpm.pm:1927
+#: ../urpm.pm:1497 ../urpm.pm:1617 ../urpm.pm:1734 ../urpm.pm:1740
+#: ../urpm.pm:1843 ../urpm.pm:1929 ../urpm.pm:1933
#, c-format
msgid "examining synthesis file [%s]"
msgstr "archwilio ffeil synthesis [%s]"
#: ../urpm.pm:568 ../urpm.pm:583 ../urpm.pm:596 ../urpm.pm:1079
#: ../urpm.pm:1090 ../urpm.pm:1165 ../urpm.pm:1171 ../urpm.pm:1236
-#: ../urpm.pm:1291 ../urpm.pm:1495 ../urpm.pm:1615 ../urpm.pm:1722
-#: ../urpm.pm:1740 ../urpm.pm:1933
+#: ../urpm.pm:1291 ../urpm.pm:1501 ../urpm.pm:1621 ../urpm.pm:1728
+#: ../urpm.pm:1746 ../urpm.pm:1939
#, c-format
msgid "examining hdlist file [%s]"
msgstr "archwilio ffeil hdlist [%s]"
@@ -473,12 +473,12 @@ msgstr "Cychwyn chwilio: %s diwedd: %s"
#. - this is almost a fatal error, ignore it by default?
#: ../urpm.pm:613 ../urpm.pm:1097 ../urpm.pm:1184 ../urpm.pm:1240
-#: ../urpm.pm:1619
+#: ../urpm.pm:1625
#, c-format
msgid "problem reading hdlist or synthesis file of medium \"%s\""
msgstr "problem darllen hdlist neu ffeil synthesis y cyfrwng \"%s\""
-#: ../urpm.pm:620 ../urpm.pm:1875
+#: ../urpm.pm:620 ../urpm.pm:1881
msgid "performing second pass to compute dependencies\n"
msgstr "cyflawni ail ymgais i gyfrifo dibyniaethau\n"
@@ -494,8 +494,8 @@ msgstr "gosod yn lle uwchraddio pecyn %s"
#. - beware this can be a child process or the main process now...
#. - open in read/write mode unless testing installation.
-#: ../urpm.pm:660 ../urpm.pm:2299 ../urpm.pm:2360 ../urpm.pm:2550
-#: ../urpm.pm:2943 ../urpm.pm:3067
+#: ../urpm.pm:660 ../urpm.pm:2316 ../urpm.pm:2377 ../urpm.pm:2567
+#: ../urpm.pm:2960 ../urpm.pm:3084
msgid "unable to open rpmdb"
msgstr "methu agor rpmdb"
@@ -526,7 +526,7 @@ msgid "...copying done"
msgstr "...cwblhau'r copïo"
#: ../urpm.pm:784 ../urpm.pm:1201 ../urpm.pm:1332 ../urpm.pm:1395
-#: ../urpm.pm:1557 ../urpm.pm:1564
+#: ../urpm.pm:1563 ../urpm.pm:1570
msgid "...copying failed"
msgstr "...methodd y copïo"
@@ -539,11 +539,11 @@ msgstr ""
msgid "retrieving hdlists file..."
msgstr "adfer ffeil hdlists..."
-#: ../urpm.pm:806 ../urpm.pm:1601 ../urpm.pm:2099 ../urpm.pm:2808
+#: ../urpm.pm:806 ../urpm.pm:1607 ../urpm.pm:2105 ../urpm.pm:2825
msgid "...retrieving done"
msgstr ".cwblhau adfer"
-#: ../urpm.pm:808 ../urpm.pm:1585 ../urpm.pm:2103 ../urpm.pm:2810
+#: ../urpm.pm:808 ../urpm.pm:1591 ../urpm.pm:2109 ../urpm.pm:2827
#, c-format
msgid "...retrieving failed: %s"
msgstr "... methodd ail-lwytho: %s"
@@ -625,7 +625,7 @@ msgstr "cyfrifo md5sum o ffynhonnell hdlist gopïwyd (neu synthesis)"
msgid "copy of [%s] failed (md5sum mismatch)"
msgstr "methodd copïo (%s) (md5sum gwallus)"
-#: ../urpm.pm:1295 ../urpm.pm:1499 ../urpm.pm:1840
+#: ../urpm.pm:1295 ../urpm.pm:1505 ../urpm.pm:1846
#, c-format
msgid "problem reading synthesis file of medium \"%s\""
msgstr "anhawster darllen synthesis ffeil cyfrwng \"%s\""
@@ -651,85 +651,85 @@ msgstr "heb ganfod ffeiliau rpm o [%s]"
#. - try to probe for possible with_hdlist parameter, unless
#. - it is already defined (and valid).
-#: ../urpm.pm:1514
+#: ../urpm.pm:1520
#, c-format
msgid "retrieving source hdlist (or synthesis) of \"%s\"..."
msgstr "adfer ffynhonnell hdlist (neu synthesis) \"%s\"..."
-#: ../urpm.pm:1542
+#: ../urpm.pm:1548
#, c-format
msgid "found probed hdlist (or synthesis) as %s"
msgstr "canfod hdlist (neu synthesis) holwyd fel %s"
-#: ../urpm.pm:1592
+#: ../urpm.pm:1598
msgid "computing md5sum of retrieved source hdlist (or synthesis)"
msgstr "cyfrifo md5sum o ffynhonnell hdlist adferwyd (neu synthesis)"
-#: ../urpm.pm:1594
+#: ../urpm.pm:1600
msgid "...retrieving failed: md5sum mismatch"
msgstr "... methodd ail-lwytho: anghysondeb md5sum"
-#: ../urpm.pm:1692
+#: ../urpm.pm:1698
msgid "retrieval of source hdlist (or synthesis) failed"
msgstr "methodd adfer ffynhonnell hdlist (neu synthesis)"
-#: ../urpm.pm:1699
+#: ../urpm.pm:1705
#, c-format
msgid "no hdlist file found for medium \"%s\""
msgstr "dim ffeil hdlist synthesis file ar gyfer cyfrwng \"%s\""
-#: ../urpm.pm:1710 ../urpm.pm:1764
+#: ../urpm.pm:1716 ../urpm.pm:1770
#, c-format
msgid "file [%s] already used in the same medium \"%s\""
msgstr "file [%s] yn cael ei ddefnyddio eisoes yn yr un cyfrwng \"%s\""
-#: ../urpm.pm:1750
+#: ../urpm.pm:1756
#, c-format
msgid "unable to parse hdlist file of \"%s\""
msgstr "methu didoli ffeil hdlist \"%s\""
-#: ../urpm.pm:1789
+#: ../urpm.pm:1795
#, c-format
msgid "unable to write list file of \"%s\""
msgstr "methu ysgrifennu i ffeil rhestr \"%s\""
-#: ../urpm.pm:1797
+#: ../urpm.pm:1803
#, c-format
msgid "writing list file for medium \"%s\""
msgstr "ysgrifennu rhestr ffeil ar gyfer cyfrwng \"%s\""
-#: ../urpm.pm:1799
+#: ../urpm.pm:1805
#, c-format
msgid "nothing written in list file for \"%s\""
msgstr "dim wedi ei ysgrifennu yn ffei rhestr ar gyfer \"%s\""
-#: ../urpm.pm:1814
+#: ../urpm.pm:1820
#, c-format
msgid "examining pubkey file of \"%s\"..."
msgstr "archwilio ffeil pubkey \"%s\""
-#: ../urpm.pm:1821
+#: ../urpm.pm:1827
#, c-format
msgid "...imported key %s from pubkey file of \"%s\""
msgstr "...allwedd %s wedi ei fewnforio o ffeil pubkey \"%s\""
-#: ../urpm.pm:1824
+#: ../urpm.pm:1830
#, c-format
msgid "unable to import pubkey file of \"%s\""
msgstr "methu mewnforio ffeil pubkey \"%s\""
-#: ../urpm.pm:1889
+#: ../urpm.pm:1895
#, c-format
msgid "reading headers from medium \"%s\""
msgstr "darllen pennawd o'r cyfrwng \"%s\""
-#: ../urpm.pm:1894
+#: ../urpm.pm:1900
#, c-format
msgid "building hdlist [%s]"
msgstr "adeiladu hdlist [%s]"
#. - XXX this happens when building a synthesis for a local media from RPMs... why ?
-#: ../urpm.pm:1909 ../urpm.pm:1945
+#: ../urpm.pm:1915 ../urpm.pm:1951
#, c-format
msgid ""
"Unable to build synthesis file for medium \"%s\". Your hdlist file may be "
@@ -738,90 +738,95 @@ msgstr ""
"Methu adeiladu ffeil synthesis ar gyfer cyfrwng \"%s\". Efallai bod eich "
"ffeil hdlist yn llygredig."
-#: ../urpm.pm:1913 ../urpm.pm:1949 ../urpmi:359
+#: ../urpm.pm:1919 ../urpm.pm:1955 ../urpmi:359
#, c-format
msgid "built hdlist synthesis file for medium \"%s\""
msgstr "adeiladu ffeil hdlist synthesis file ar gyfer cyfrwng \"%s\""
-#: ../urpm.pm:1972
+#: ../urpm.pm:1978
#, c-format
msgid "found %d headers in cache"
msgstr "canfod %d pennawd mewn storfa"
-#: ../urpm.pm:1976
+#: ../urpm.pm:1982
#, c-format
msgid "removing %d obsolete headers in cache"
msgstr "tynnu hen benawdau %d yn y storfa"
-#: ../urpm.pm:1997
+#: ../urpm.pm:2003
#, c-format
msgid "Error generating names file: dependency %d not found"
msgstr ""
-#: ../urpm.pm:2002
+#: ../urpm.pm:2008
#, c-format
msgid "Error generating names file: Can't write to file (%s)"
msgstr ""
-#: ../urpm.pm:2038
+#: ../urpm.pm:2044
#, c-format
msgid "mounting %s"
msgstr "gosod %s"
-#: ../urpm.pm:2060
+#: ../urpm.pm:2066
#, c-format
msgid "unmounting %s"
msgstr "dadosod %s"
-#: ../urpm.pm:2084
+#: ../urpm.pm:2090
#, c-format
msgid "invalid rpm file name [%s]"
msgstr "enw ffeil rpm annilys [%s]"
-#: ../urpm.pm:2090
+#: ../urpm.pm:2096
#, c-format
msgid "retrieving rpm file [%s] ..."
msgstr "adfer ffeil rpm (%s)..."
-#: ../urpm.pm:2108
+#: ../urpm.pm:2114
#, c-format
msgid "unable to access rpm file [%s]"
msgstr "methu cael mynediad ffeil rpm (%s)"
-#: ../urpm.pm:2113
+#: ../urpm.pm:2119
+#, fuzzy, c-format
+msgid "unable to parse spec file %s [%s]"
+msgstr "methu didoli ffeil hdlist \"%s\" yn ffeil (%s)"
+
+#: ../urpm.pm:2129
msgid "unable to register rpm file"
msgstr "methu cofrestr ffeil rpm"
-#: ../urpm.pm:2116
+#: ../urpm.pm:2133
msgid "error registering local packages"
msgstr "gwall cofrestru pecynnau lleol"
-#: ../urpm.pm:2140
+#: ../urpm.pm:2157
msgid "Search"
msgstr "Chwilio"
-#: ../urpm.pm:2227
+#: ../urpm.pm:2244
#, c-format
msgid "no package named %s"
msgstr "heb enwi pecyn %s"
#. - Warning : the following message is parsed in urpm::parallel_*
-#: ../urpm.pm:2229 ../urpme:97
+#: ../urpm.pm:2246 ../urpme:97
#, c-format
msgid "The following packages contain %s: %s"
msgstr "Mae pecynnau canlynol yn cynnwys %s: %s:"
-#: ../urpm.pm:2423 ../urpm.pm:2470 ../urpm.pm:2501
+#: ../urpm.pm:2440 ../urpm.pm:2487 ../urpm.pm:2518
#, c-format
msgid "there are multiple packages with the same rpm filename \"%s\""
msgstr "mae yna becynnau niferus gyda'r un enw ffeil rpm \"%s\""
-#: ../urpm.pm:2484
+#: ../urpm.pm:2501
#, c-format
msgid "unable to correctly parse [%s] on value \"%s\""
msgstr "methu didoli (%s) yn gywir ar werth \"%s\""
-#: ../urpm.pm:2517
+#: ../urpm.pm:2534
#, c-format
msgid ""
"medium \"%s\" uses an invalid list file:\n"
@@ -830,161 +835,161 @@ msgstr ""
"cyfrwng \"%s\" yn defnyddio rhestr ffeiliau annilys:\n"
" nid yw'r drych yn un diweddar, ceisiwch ddull arall"
-#: ../urpm.pm:2521
+#: ../urpm.pm:2538
#, c-format
msgid "medium \"%s\" does not define any location for rpm files"
msgstr "nid yw cyfrwng \"%s\" yn diffinio unrhyw leoliad ar gyfer ffeiliau rpm"
-#: ../urpm.pm:2533
+#: ../urpm.pm:2550
#, c-format
msgid "package %s is not found."
msgstr "heb ganfod pecyn %s"
-#: ../urpm.pm:2584 ../urpm.pm:2598 ../urpm.pm:2618 ../urpm.pm:2632
+#: ../urpm.pm:2601 ../urpm.pm:2615 ../urpm.pm:2635 ../urpm.pm:2649
msgid "urpmi database locked"
msgstr "cronfa ddata urpmi wedi cloi"
-#: ../urpm.pm:2684 ../urpm.pm:2689 ../urpm.pm:2715
+#: ../urpm.pm:2701 ../urpm.pm:2706 ../urpm.pm:2732
#, c-format
msgid "medium \"%s\" is not selected"
msgstr "heb ddewis cyfrwng \"%s\""
#. - fallback to use other method for retrieving the file later.
-#: ../urpm.pm:2711
+#: ../urpm.pm:2728
#, c-format
msgid "unable to read rpm file [%s] from medium \"%s\""
msgstr "methu darllen ffeil rpm (%s) o gyfrwng \"%s\""
#. - we have a removable device that is not removable, well...
-#: ../urpm.pm:2719
+#: ../urpm.pm:2736
#, c-format
msgid "inconsistent medium \"%s\" marked removable but not really"
msgstr "cyfrwng annealladwy \"%s\" wedi ei nodi'n symudadwy ond nid yw"
-#: ../urpm.pm:2731
+#: ../urpm.pm:2748
#, c-format
msgid "unable to access medium \"%s\""
msgstr "methu cael mynediad at gyfrwng. \"%s\""
-#: ../urpm.pm:2786
+#: ../urpm.pm:2803
#, fuzzy, c-format
msgid "malformed URL: [%s]"
msgstr "allbwn gwallus: [%s]"
-#: ../urpm.pm:2793
+#: ../urpm.pm:2810
#, c-format
msgid "retrieving rpm files from medium \"%s\"..."
msgstr "adfer ffeiliau rpm o gyfrwng [%s]"
-#: ../urpm.pm:2916
+#: ../urpm.pm:2933
#, c-format
msgid "using process %d for executing transaction"
msgstr "defnyddio proses %d ar gyfer gweithredu trosglwyddiad"
-#: ../urpm.pm:2947
+#: ../urpm.pm:2964
#, c-format
msgid ""
"created transaction for installing on %s (remove=%d, install=%d, upgrade=%d)"
msgstr ""
"crëwyd trosglwyddiad ar gyfer gosod ar %s (tynnu=%d, gosod=%d, uwchraddio=%d)"
-#: ../urpm.pm:2950
+#: ../urpm.pm:2967
msgid "unable to create transaction"
msgstr "methu creu trosglwyddiad."
-#: ../urpm.pm:2958
+#: ../urpm.pm:2975
#, c-format
msgid "removing package %s"
msgstr "tynnu pecyn %s."
-#: ../urpm.pm:2960
+#: ../urpm.pm:2977
#, c-format
msgid "unable to remove package %s"
msgstr "methu tynnu pecyn %s"
-#: ../urpm.pm:2972
+#: ../urpm.pm:2989
#, c-format
msgid "unable to extract rpm from delta-rpm package %s"
msgstr "methu tynnu rpm o becyn delta-rpm %s"
-#: ../urpm.pm:2978
+#: ../urpm.pm:2995
#, c-format
msgid "adding package %s (id=%d, eid=%d, update=%d, file=%s)"
msgstr "ychwanegu pecyn %s (id=%d, eid=%d, update=%d, file=%s)"
-#: ../urpm.pm:2981
+#: ../urpm.pm:2998
#, c-format
msgid "unable to install package %s"
msgstr "methu gosod pecyn %s"
-#: ../urpm.pm:3038
+#: ../urpm.pm:3055
#, c-format
msgid "More information on package %s"
msgstr "Rhagor o wybodaeth ar becyn %s"
-#: ../urpm.pm:3209 ../urpm.pm:3242
+#: ../urpm.pm:3227 ../urpm.pm:3265
#, c-format
msgid "due to missing %s"
msgstr "oherwydd %s coll"
-#: ../urpm.pm:3210 ../urpm.pm:3240
+#: ../urpm.pm:3228 ../urpm.pm:3263
#, c-format
msgid "due to unsatisfied %s"
msgstr "%s heb ei foddloni"
-#: ../urpm.pm:3211
+#: ../urpm.pm:3234
#, c-format
msgid "trying to promote %s"
msgstr "ceisio hybu %s"
-#: ../urpm.pm:3212
+#: ../urpm.pm:3235
#, c-format
msgid "in order to keep %s"
msgstr "fel modd i gadw %s"
-#: ../urpm.pm:3235
+#: ../urpm.pm:3258
#, c-format
msgid "in order to install %s"
msgstr "er mwyn gosod %s"
-#: ../urpm.pm:3246
+#: ../urpm.pm:3269
#, c-format
msgid "due to conflicts with %s"
msgstr "oherwydd gwrthdaro gyda %s"
-#: ../urpm.pm:3247
+#: ../urpm.pm:3270
msgid "unrequested"
msgstr "diofyn"
-#: ../urpm.pm:3265
+#: ../urpm.pm:3288
#, c-format
msgid "Invalid signature (%s)"
msgstr "Llofnod annilys (%s)"
-#: ../urpm.pm:3298
+#: ../urpm.pm:3321
#, c-format
msgid "Invalid Key ID (%s)"
msgstr "Enw Allwedd Annilys (%s)"
-#: ../urpm.pm:3300
+#: ../urpm.pm:3323
#, c-format
msgid "Missing signature (%s)"
msgstr "Llofnod coll (%s)"
-#: ../urpm.pm:3359
+#: ../urpm.pm:3382
msgid "examining MD5SUM file"
msgstr "archwilio ffeil MD5SUM"
-#: ../urpm.pm:3369
+#: ../urpm.pm:3392
#, c-format
msgid "warning: md5sum for %s unavailable in MD5SUM file"
msgstr "rhybudd: nid yw md5sum ar gyfer %s ar gael yn ffeil MD5SUM"
-#: ../urpm.pm:3380
+#: ../urpm.pm:3403
msgid "computing md5sum of existing source hdlist (or synthesis)"
msgstr "cyfrifo md5sum ffynhonnell hdlist presennol (neu synthesis)"
-#: ../urpm.pm:3410
+#: ../urpm.pm:3433
msgid "This operation is forbidden while running in restricted mode"
msgstr ""
@@ -1474,7 +1479,7 @@ msgstr " -f - argraffu fersiwn a rhyddhad ac arch gydag enw.\n"
msgid "Incorrect format: you may use only one multi-valued tag"
msgstr ""
-#: ../urpmf:173 ../urpmi:228 ../urpmq:115
+#: ../urpmf:173 ../urpmi:228 ../urpmq:125
#, c-format
msgid "using specific environment on %s\n"
msgstr "ddefnyddio amgylchedd penodol ar %s\n"
@@ -2339,20 +2344,20 @@ msgstr ""
" bydd enwau neu ffeiliau rpm sy'n cael eu rhoi ar y llinell orchymyn yn cael "
"eu holi.\n"
-#: ../urpmq:156
+#: ../urpmq:166
msgid "--list-nodes can only be used with --parallel"
msgstr "dim ond gyda --paralel mae modd defnyddio --list-nodes"
-#: ../urpmq:314
+#: ../urpmq:323
#, c-format
msgid "skipping media %s: no hdlist"
msgstr "hepgor cyfrwng %s: dim hdliist"
-#: ../urpmq:388
+#: ../urpmq:397
msgid "No filelist found\n"
msgstr "Heb ganfod filelist\n"
-#: ../urpmq:400
+#: ../urpmq:409
msgid "No changelog found\n"
msgstr "Heb ganfod changelog\n"
hl opt">::read_credentials($h->{mntpoint})) { my ($options, $unknown) = fs::mount_options::unpack($h); $options->{"$_="} = $credentials->{$_} foreach qw(username password); fs::mount_options::pack($h, $options, $unknown); } } $h; } @l; } sub merge_fstabs { my ($loose, $fstab, @l) = @_; foreach my $p (@$fstab) { my ($l1, $l2) = partition { fs::get::is_same_hd($_, $p) } @l; my ($p2) = @$l1 or next; @l = @$l2; $p->{mntpoint} = $p2->{mntpoint} if delete $p->{unsafeMntpoint}; if (!$loose) { $p->{fs_type} = $p2->{fs_type} if $p2->{fs_type}; $p->{options} = $p2->{options} if $p2->{options}; add2hash_($p, $p2); } else { $p->{isMounted} ||= $p2->{isMounted}; $p->{real_mntpoint} ||= $p2->{real_mntpoint}; } $p->{device_alias} ||= $p2->{device_alias} if $p->{device} ne $p2->{device} && $p2->{device} !~ m|/|; $p->{fs_type} && $p2->{fs_type} && $p->{fs_type} ne $p2->{fs_type} && $p->{fs_type} ne 'auto' && $p2->{fs_type} ne 'auto' and log::l("err, fstab and partition table do not agree for $p->{device} type: $p->{fs_type} vs $p2->{fs_type}"); } @l; } sub add2all_hds { my ($all_hds, @l) = @_; @l = merge_fstabs('', [ fs::get::really_all_fstab($all_hds) ], @l); foreach (@l) { my $s = $_->{fs_type} eq 'nfs' ? 'nfss' : $_->{fs_type} eq 'cifs' ? 'smbs' : $_->{fs_type} eq 'davfs2' ? 'davs' : isTrueLocalFS($_) || isSwap($_) || isOtherAvailableFS($_) ? '' : 'special'; push @{$all_hds->{$s}}, $_ if $s; } } sub get_major_minor { my ($fstab) = @_; foreach (@$fstab) { eval { my (undef, $major, $minor) = devices::entry($_->{device}); ($_->{major}, $_->{minor}) = ($major, $minor); } if !$_->{major}; } } sub merge_info_from_mtab { my ($fstab) = @_; my @l1 = map { my $l = $_; my $h = fs::type::fs_type2subpart('swap'); $h->{$_} = $l->{$_} foreach qw(device major minor); $h; } read_fstab('', '/proc/swaps'); my @l2 = map { read_fstab('', $_) } '/etc/mtab', '/proc/mounts'; foreach (@l1, @l2) { log::l("found mounted partition on $_->{device} with $_->{mntpoint}"); if ($::isInstall && $_->{mntpoint} =~ m!^/tmp/\w*image$!) { $_->{real_mntpoint} = delete $_->{mntpoint}; } $_->{isMounted} = 1; set_isFormatted($_, 1); } merge_fstabs('loose', $fstab, @l1, @l2); } # - when using "$loose", it does not merge in type&options from the fstab sub merge_info_from_fstab { my ($fstab, $prefix, $uniq, $loose) = @_; my @l = grep { if ($uniq) { my $part = fs::get::mntpoint2part($_->{mntpoint}, $fstab); !$part || fs::get::is_same_hd($part, $_); #- keep it only if it is the mount point AND the same device } else { 1; } } read_fstab($prefix, '/etc/fstab', 'keep_default'); merge_fstabs($loose, $fstab, @l); } sub get_info_from_fstab { my ($all_hds) = @_; my @l = read_fstab($::prefix, '/etc/fstab', 'keep_default'); add2all_hds($all_hds, @l); } sub prepare_write_fstab { my ($fstab, $o_prefix, $b_keep_credentials) = @_; $o_prefix ||= ''; my %new; my (@smb_credentials, @davfs_credentials); my @l = map { my $device = isLoopback($_) ? ($_->{mntpoint} eq '/' ? "/initrd/loopfs" : $_->{loopback_device}{mntpoint}) . $_->{loopback_file} : fs::wild_device::from_part($o_prefix, $_); my $comment = $_->{comment}; $comment = '' if $comment =~ m!^Entry for /dev/.* :!; $comment ||= "# Entry for /dev/$_->{device} :\n" if $device =~ /^(UUID|LABEL)=/; my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}}; mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|; my $mntpoint = fs::type::carry_root_loopback($_) ? '/initrd/loopfs' : $real_mntpoint; my ($freq, $passno) = exists $_->{freq} ? ($_->{freq}, $_->{passno}) : isTrueLocalFS($_) && !$_->{dmcrypt_name} && $_->{options} !~ /encryption=/ && (!$_->{is_removable} || member($_->{mntpoint}, fs::type::directories_needed_to_boot())) ? (1, $_->{mntpoint} eq '/' ? 1 : fs::type::carry_root_loopback($_) ? 0 : 2) : (0, 0); if (($device eq 'none' || !$new{$device}) && ($mntpoint eq 'swap' || !$new{$mntpoint})) { #- keep in mind the new line for fstab. $new{$device} = 1; $new{$mntpoint} = 1; my $options = $_->{options} || 'defaults'; if ($_->{fs_type} eq 'cifs' && $options =~ /password=/ && !$b_keep_credentials) { require fs::remote::smb; if (my ($opts, $smb_credentials) = fs::remote::smb::fstab_entry_to_credentials($_)) { $options = $opts; push @smb_credentials, $smb_credentials; } } elsif ($_->{fs_type} eq 'davfs2' && !$b_keep_credentials) { require fs::remote::davfs; if (my ($opts, $davfs_credentials) = fs::remote::davfs::fstab_entry_to_credentials($_)) { $options = $opts || 'defaults'; push @davfs_credentials, $davfs_credentials; } } my $fs_type = $_->{fs_type} || 'auto'; s/ /\\040/g foreach $mntpoint, $device, $options; my $file_dep = $options =~ /\b(loop|bind)\b/ ? $device : ''; [ $file_dep, $mntpoint, $comment . join(' ', $device, $mntpoint, $fs_type, $options, $freq, $passno) . "\n" ]; } else { (); } } grep { $_->{device} && ($_->{mntpoint} || $_->{real_mntpoint}) && $_->{fs_type} && ($_->{isFormatted} || !$_->{notFormatted}) } @$fstab; sub sort_it { my (@l) = @_; if (my $file_based = find { $_->[0] } @l) { my ($before, $other) = partition { $file_based->[0] =~ /^\Q$_->[1]/ } @l; $file_based->[0] = ''; #- all dependencies are now in before if (@$other && @$before) { sort_it(@$before), sort_it(@$other); } else { sort_it(@l); } } else { sort { $a->[1] cmp $b->[1] } @l; } } @l = sort_it(@l); join('', map { $_->[2] } @l), \@smb_credentials, \@davfs_credentials; } sub fstab_to_string { my ($all_hds, $o_prefix) = @_; my $fstab = [ fs::get::really_all_fstab($all_hds), @{$all_hds->{special}} ]; my ($s, undef) = prepare_write_fstab($fstab, $o_prefix, 'keep_credentials'); $s; } sub write_fstab { my ($all_hds, $o_prefix) = @_; log::l("writing $o_prefix/etc/fstab"); my $fstab = [ fs::get::really_all_fstab($all_hds), @{$all_hds->{special}} ]; my ($s, $smb_credentials, $davfs_credentials) = prepare_write_fstab($fstab, $o_prefix, ''); renamef("$o_prefix/etc/fstab", "$o_prefix/etc/fstab.old"); output("$o_prefix/etc/fstab", $s); require fs::remote::davfs; fs::remote::smb::save_credentials($_) foreach @$smb_credentials; fs::remote::davfs::save_credentials($davfs_credentials); fs::dmcrypt::save_crypttab($all_hds) if @{$all_hds->{dmcrypts}}; } sub set_removable_mntpoints { my ($all_hds) = @_; my %names; foreach (@{$all_hds->{raw_hds}}) { my $name = detect_devices::suggest_mount_point($_) or next; $name eq 'zip' || $name eq 'cdrom' and next; my $s = ++$names{$name}; $_->{mntpoint} ||= "/media/$name" . ($s == 1 ? '' : $s); } } sub get_raw_hds { my ($prefix, $all_hds) = @_; push @{$all_hds->{raw_hds}}, detect_devices::removables(); $_->{is_removable} = 1 foreach @{$all_hds->{raw_hds}}; get_major_minor($all_hds->{raw_hds}); my @fstab = read_fstab($prefix, '/etc/fstab', 'keep_default'); $all_hds->{nfss} = [ grep { $_->{fs_type} eq 'nfs' } @fstab ]; $all_hds->{smbs} = [ grep { $_->{fs_type} eq 'cifs' } @fstab ]; $all_hds->{davs} = [ grep { $_->{fs_type} eq 'davfs2' } @fstab ]; $all_hds->{special} = [