summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
blob: 6e5b28f1a09ea859c5c43c7426dad06984168859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
package detect_devices; # $Id: detect_devices.pm 267151 2010-03-30 14:27:41Z blino $

use diagnostics;
use strict;
use vars qw($pcitable_addons $usbtable_addons);

#-######################################################################################
#- misc imports
#-######################################################################################
use log;
use MDK::Common; # help perl_checker
use common;
use devices;
use run_program;
use modules;
use c;
use feature 'state';

#-#####################################################################################
#- Globals
#-#####################################################################################
my %serialprobe;

#-######################################################################################
#- Functions
#-######################################################################################

sub get() {
    #- Detect the default BIOS boot harddrive is kind of tricky. We may have IDE,
    #- SCSI and RAID devices on the same machine. From what I see so far, the default
    #- BIOS boot harddrive will be
    #- 1. The first IDE device if IDE exists. Or
    #- 2. The first SCSI device if SCSI exists. Or
    #- 3. The first RAID device if RAID exists.

    getIDE(), getSCSI(), getVirtIO(), getDAC960(), getCompaqSmartArray(), getATARAID();
}
sub hds()         { grep { may_be_a_hd($_) } get() }
sub tapes()       { grep { $_->{media_type} eq 'tape' } get() }
sub cdroms()      { grep { $_->{media_type} eq 'cdrom' } get() }
sub burners()     { grep { isBurner($_) } cdroms() }
sub dvdroms()     { grep { isDvdDrive($_) } cdroms() }
sub raw_zips()    { grep { member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get() }
sub ls120s()      { grep { member($_->{media_type}, 'fd', 'hd') && isLS120Drive($_) } get() }
sub zips()        {
    map { 
	$_->{device} .= 4; 
	$_;
    } raw_zips();
}

sub floppies {
    my ($o_not_detect_legacy_floppies) = @_;
    require modules;
    state @fds;
    state $legacy_already_detected;
    if (arch =~ /mips|arm/) {
      $o_not_detect_legacy_floppies = 1;
    }
    if (!$o_not_detect_legacy_floppies && !$legacy_already_detected) {
        $legacy_already_detected = 1;
        eval { modules::load("floppy") if $::isInstall };
        #- do not bother probing /dev/fd0 and loading floppy device uselessly,
        #- it takes time and it is already done by boot process (if not in install):
        #-   /dev/fd0 is created by start_udev (/etc/udev/devices.d/default.nodes)
        #-   then hal probes /dev/fd0 and triggers floppy module loading through kernel's kmod
        if (any { (split)[1] eq 'fd' } cat_("/proc/devices")) {
            @fds = map {
                my $info = c::floppy_info(devices::make("fd$_"));
                if_($info && $info ne '(null)', { device => "fd$_", media_type => 'fd', info => $info });
            } qw(0 1);
        }
    }
        
    my @ide = ls120s() and eval { modules::load("ide_floppy") };

    eval { modules::load("usb_storage") } if $::isInstall && usbStorage();
    my @scsi = grep { $_->{media_type} eq 'fd' } getSCSI();
    @ide, @scsi, @fds;
}
sub floppies_dev() { map { $_->{device} } floppies() }
sub floppy() { first(floppies_dev()) }
#- example ls120, model = "LS-120 SLIM 02 UHD Floppy"

sub removables() {
    floppies(), cdroms(), zips();
}

sub get_sys_cdrom_info {
    my (@drives) = @_;

    my @drives_order;
    foreach (cat_("/proc/sys/dev/cdrom/info")) {
	my ($t, $l) = split ':';
	my @l;
	@l = split(' ', $l) if $l;
	if ($t eq 'drive name') {
	    @drives_order = map {
		my $dev = $_;
		find { $_->{device} eq $dev } @drives;
	    } @l;
	} else {
	    my $capacity;
	    if ($t eq 'Can write CD-R') {
		$capacity = 'burner';
	    } elsif ($t eq 'Can read DVD') {
		$capacity = 'DVD';
	    }
	    if ($capacity) {
		each_index {
		    ($drives_order[$::i] || {})->{capacity} .= "$capacity " if $_;
		} @l;
	    }
	}
    }
}

sub complete_usb_storage_info {
    my (@l) = @_;

    my @usb = grep { exists $_->{usb_vendor} } @l;

    foreach my $usb (usb_probe()) {
	if (my $e = find { !$_->{found} && $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
         my $host = get_sysfs_usbpath_for_block($e->{device});
         if ($host) {
             my $file = "/sys/block/$host/../serial";
             $e->{info} = chomp_(cat_($file)) if -e $file;
             $e->{usb_description} = join('|', 
                                          chomp_(cat_("/sys/block/$host/../manufacturer")),
                                          chomp_(cat_("/sys/block/$host/../product")));
         }
         local $e->{found} = 1;
	    $e->{"usb_$_"} ||= $usb->{$_} foreach keys %$usb;
	}
    }
}

sub isBurner { 
    my ($e) = @_;
    $e->{capacity} =~ /burner/ and return 1;
      
    #- do not work for SCSI
    my $f = tryOpen($e->{device}); #- SCSI burner are not detected this way.
    $f && c::isBurner(fileno($f));
}
sub isDvdDrive {
    my ($e) = @_;
    $e->{capacity} =~ /DVD/ || $e->{info} =~ /DVD/ and return 1;

    #- do not work for SCSI
    my $f = tryOpen($e->{device});
    $f && c::isDvdDrive(fileno($f));
}
sub isZipDrive { $_[0]{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
sub isLS120Drive { $_[0]{info} =~ /LS-?120|144MB/ }
sub isKeyUsb { begins_with($_[0]{usb_media_type} || '', 'Mass Storage') && $_[0]{media_type} eq 'hd' }
sub isFloppyUsb { $_[0]{usb_driver} && $_[0]{usb_driver} eq 'Removable:floppy' }
sub may_be_a_hd { 
    my ($e) = @_;
    $e->{media_type} eq 'hd' && !(
	isZipDrive($e) 
           || isLS120Drive($e)
           || begins_with($e->{usb_media_type} || '', 'Mass Storage|Floppy (UFI)')
    );
}

sub get_sysfs_field_from_link {
    my ($device, $field) = @_;
    my $l = readlink("$device/$field");
    $l =~ s!.*/!!;
    $l;
}

sub get_sysfs_usbpath_for_block {
    my ($device) = @_;
    my $host = readlink("/sys/block/$device");
    $host =~ s!/host.*!!;
    $host;
}

sub get_scsi_driver {
    my (@l) = @_;
    # find driver of host controller from sysfs:
    foreach (@l) {
	next if $_->{driver};
	my $host = get_sysfs_usbpath_for_block($_->{device});
	require list_modules;
	$_->{driver} = list_modules::filename2modname(get_sysfs_field_from_link("/sys/block/$host", 'driver'));
    }
}

sub getSCSI() {
    my $dev_dir = '/sys/bus/scsi/devices';

    my @scsi_types = (
	"Direct-Access",
	"Sequential-Access",
	"Printer",
	"Processor",
	"WORM",
	"CD-ROM",
	"Scanner",
	"Optical Device",
	"Medium Changer",
	"Communications",
    );

    my @l;
    foreach (all($dev_dir)) {
	my ($host, $channel, $id, $lun) = split ':';
	defined $lun or next;

	my $dir = "$dev_dir/$_";

	# handle both old and new kernels:
	my $node =  find { -e $_ } "$dir/block", top(glob_("$dir/block*")), "$dir/tape", top(glob_("$dir/scsi_generic*"));
	my ($device) = readlink($node) =~ m!/(?:scsi_(?:generic|tape)|block)/(.*)!;
        if (!$device) {
            ($device) = top(glob_("$node/*")) =~ m!/(?:scsi_(?:generic|tape)|block)/(.*)!;
        }
	warn("cannot get info for device ($_)"), next if !$device;

	my $usb_dir = readlink($dir) =~ m!/usb! && "$dir/../../../..";
	my $get_usb = sub { chomp_(cat_("$usb_dir/$_[0]")) };

	my $get = sub {
	    my $s = cat_("$dir/$_[0]");
	    $s =~ s/\s+$//;
	    $s;
	};

	# Old hp scanners report themselves as "Processor"s
	# (see linux/include/scsi/scsi.h and sans-find-scanner.1)
	my $raw_type = $scsi_types[$get->('type')];

	my $media_type = ${{ st => 'tape', sr => 'cdrom', sd => 'hd', sg => 'generic' }}{substr($device, 0, 2)} ||
	  $raw_type =~ /Scanner|Processor/ && 'scanner';

	my ($vendor, $model) = ($get->('vendor'), $get->('model'));
	my ($v, $m) = _get_hd_vendor($model);
	if ($v && $v) {
            ($vendor, $model) = ($v, $m);
	}
	push @l, { info =>  $vendor . ' ' . $model, host => $host, channel => $channel, id => $id, lun => $lun, 
	  description => join('|', $vendor, $model),
	  bus => 'SCSI', media_type => $media_type, device => $device,
	    $usb_dir ? (
	  usb_vendor => hex($get_usb->('idVendor')), usb_id => hex($get_usb->('idProduct')),
	    ) : (),
        };
    } 

    @l = sort { $a->{host} <=> $b->{host} || $a->{channel} <=> $b->{channel} || $a->{id} <=> $b->{id} || $a->{lun} <=> $b->{lun} } @l;

    complete_usb_storage_info(@l);

    foreach (@l) {
	$_->{media_type} = 'fd' if $_->{media_type} eq 'hd' && isFloppyUsb($_);
    }

    get_sys_cdrom_info(@l);
    get_scsi_driver(@l);
    @l;
}


my %hd_vendors = (
    "ASUS" => "Asus",
    "ATA Maxtor" => "Maxtor",
    "CD-ROM CDU" => "Sony",
    "CD-ROM Drive/F5D" => "ASUSTeK",
    "Compaq" => "Compaq",
    "CONNER" => "Conner Peripherals",
    "IBM" => "IBM",
    "FUJITSU" => "Fujitsu",
    "HITACHI" => "Hitachi",
    "Lite-On" => "Lite-On Technology Corp.",
    "LITE-ON" => "Lite-On Technology Corp.",
    "LTN" => "Lite-On Technology Corp.",
    "IOMEGA" => "Iomega",
    "MAXTOR" => "Maxtor",
    "Maxtor" => "Maxtor",
    "Micropolis" => "Micropolis",
    "Pioneer" => "Pioneer",
    "PLEXTOR" => "Plextor",
    "QUANTUM" => "Quantum", 
    "SAMSUNG" => "Samsung",
    "Seagate " => "Seagate Technology",
    "ST3" => "Seagate Technology",
    "TEAC" => "Teac",
    "TOSHIBA" => "Toshiba",
    "WDC" => "Western Digital Corp.",
);

# return ($vendor, $model)
sub _get_hd_vendor {
    my ($info) = @_;
    foreach my $name (keys %hd_vendors) {
        next if !$name;
        return ($hd_vendors{$name}, $2) if $info =~ /^$name(-|\s)*(.*)/;
    }
    return ("Hitachi", $info) if $info =~ /^HD[ST][0-9]/;
}


sub getIDE() {
    my @idi;

    #- what about a system with absolutely no IDE on it, like some sparc machine.
    -e "/proc/ide" or return ();

    #- Great. 2.2 kernel, things are much easier and less error prone.
    foreach my $d (sort @{[glob_('/proc/ide/hd*')]}) {
	cat_("$d/driver") =~ /ide-scsi/ and next; #- already appears in /proc/scsi/scsi
	my $t = chomp_(cat_("$d/media"));
	my $type = ${{ disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd' }}{$t} or next;
	my $info = chomp_(cat_("$d/model")) || "(none)";

	my $num = ord(($d =~ /(.)$/)[0]) - ord 'a';
	my ($vendor, $model) = _get_hd_vendor($info);

	my $host = $num;
	($host, my $id) = divide($host, 2);
	($host, my $channel) = divide($host, 2);

	push @idi, { media_type => $type, device => basename($d), 
		     info => $info, host => $host, channel => $channel, id => $id, bus => 'ide', 
		     if_($vendor, Vendor => $vendor), if_($model, Model => $model) };
    }
    get_sys_cdrom_info(@idi);
    @idi;
}

sub block_devices() {
    -d '/sys/block' 
      ? map { s|!|/|; $_ } all('/sys/block') 
      : map { $_->{dev} } do { require fs::proc_partitions; fs::proc_partitions::read_raw() };
}

sub getCompaqSmartArray() {
    my (@idi, $f);

    foreach ('array/ida', 'cpqarray/ida', 'cciss/cciss') {
	my $prefix = "/proc/driver/$_"; #- kernel 2.4 places it here
	$prefix = "/proc/$_" if !-e "${prefix}0"; #- kernel 2.2

	my ($name) = m|/(.*)|;
	for (my $i = 0; -r ($f = "${prefix}$i"); $i++) {
	    my @raw_devices = cat_($f) =~ m|^\s*($name/.*?):|gm;

	    #- this is ugly and buggy. keeping it for 2007.0
	    #- on a cciss, cciss/cciss0 didn't contain c0d0, but cciss/cciss1 did contain c0d1
	    #- the line below adds both c0d0 and c0d1 for cciss0, and so some duplicates
	    @raw_devices or @raw_devices = grep { m!^$name/! } block_devices();

	    foreach my $raw_device (@raw_devices) {
		my $device = -d "/dev/$raw_device" ? "$raw_device/disc" : $raw_device;
		push @idi, { device => $device, prefix => $raw_device . 'p', 
			     info => "Compaq RAID logical disk",
			     media_type => 'hd', bus => $name };
	    }
	}
    }
    #- workaround the buggy code above. this should be safe though
    uniq_ { $_->{device} } @idi;
}

sub getDAC960() {
    my %idi;

    #- We are looking for lines of this format:DAC960#0:
    #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
    foreach (syslog()) {
	my ($device, $info) = m|/dev/(rd/.*?): (.*?),| or next;
	$idi{$device} = { info => $info, media_type => 'hd', device => $device, bus => 'dac960' };
    }
    values %idi;
}

sub getATARAID() {
    my %l;
    foreach (syslog()) {
	my ($device) = m|^\s*(ataraid/d\d+):| or next;
	$l{$device} = { info => 'ATARAID block device', media_type => 'hd', device => $device, bus => 'ataraid' };
	log::l("ATARAID: $device");
    }
    values %l;
}

sub getVirtIO() {
    -d '/sys/bus/virtio/devices' or return;
    map {
            { device => basename($_), info => "VirtIO block device", media_type => 'hd', bus => 'virtio' };
    }
    glob("/sys/bus/virtio/devices/*/block/*");
}

# cpu_name : arch() =~ /^alpha/ ? "cpu	" :
# arch() =~ /^ppc/ ? "processor" : "vendor_id"

# cpu_model : arch() =~ /^alpha/ ? "cpu model" :
# arch() =~ /^ppc/ ? "cpu  " : "model name"

# cpu_freq = arch() =~ /^alpha/ ? "cycle frequency [Hz]" :
# arch() =~ /^ppc/ ? "clock" : "cpu MHz"

sub getCPUs() { 
    my (@cpus, $cpu);
    foreach (cat_("/proc/cpuinfo")) {
	   if (/^processor/) { # ix86 specific
		  push @cpus, $cpu if $cpu;
		  $cpu = {};
	   }
	   $cpu->{$1} = $2 if /^([^\t]+).*:\s(.*)$/;
	   $cpu->{processor}++ if $1 eq "processor";
    }
    push @cpus, $cpu;
    @cpus;
}

sub ix86_cpu_frequency() {
    cat_('/proc/cpuinfo') =~ /cpu MHz\s*:\s*(\d+)/ && $1;
}

sub probe_category {
    my ($category) = @_;

    require list_modules;
    my @modules = list_modules::category2modules($category);

    if_($category =~ /sound/ && arch() =~ /ppc/ && get_mac_model() !~ /IBM/,
	{ driver => 'snd_powermac', description => 'Macintosh built-in' },
    ),
    grep {
	if ($category eq 'network/isdn') {
	    my $b = $_->{driver} =~ /ISDN:([^,]*),?([^,]*)(?:,firmware=(.*))?/;
	    if ($b) {
                $_->{driver} = $1;
                $_->{type} = $2;
                $_->{type} =~ s/type=//;
                $_->{firmware} = $3;
                $_->{driver} eq "hisax" and $_->{options} .= " id=HiSax";
	    }
	    $b;
	} else {
	    member($_->{driver}, @modules);
	}
    } probeall();
}

sub getSoundDevices() {
    probe_category('multimedia/sound');
}

sub isTVcardConfigurable { member($_[0]{driver}, qw(bttv cx88 saa7134)) }

sub getTVcards() { probe_category('multimedia/tv') }

sub getInputDevices() {
    my (@devices, $device);
    my $event;
    foreach (cat_('/proc/bus/input/devices')) {
        if (/^I:/) {
            $device = {};
            $device->{vendor} = /Vendor=(\w+)/ && $1;
            $device->{id} = /Product=(\w+)/ && $1;
            $device->{bustype} = /Bus=(\w+)/ && $1;
        } elsif (/N: Name="(.*)"/) {
	    my $descr = $1;
	    $device->{description} = "|$descr";

	    #- I: Bus=0011 Vendor=0002 Product=0008 Version=7321
	    #- N: Name="AlpsPS/2 ALPS GlidePoint"
	    #- P: Phys=isa0060/serio1/input0
	    #- H: Handlers=mouse1 event2 ts1
	    #- B: EV=f
	    #- B: KEY=420 0 70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_TOOL_FINGER BTN_TOUCH
	    #-    or B: KEY=420 0 670000 0 0 0 0 0 0 0 0 #=> same with BTN_BACK
	    #- B: REL=3       #=> X Y
	    #- B: ABS=1000003 #=> X Y PRESSURE

	    #- I: Bus=0011 Vendor=0002 Product=0008 Version=2222
	    #- N: Name="AlpsPS/2 ALPS DualPoint TouchPad"
	    #- P: Phys=isa0060/serio1/input0
	    #- S: Sysfs=/class/input/input2
	    #- H: Handlers=mouse1 ts1 event2 
	    #- B: EV=f
	    #- B: KEY=420 0 70000 0 0 0 0 0 0 0 0
	    #- B: REL=3
	    #- B: ABS=1000003

	    #- I: Bus=0011 Vendor=0002 Product=0007 Version=0000
	    #- N: Name="SynPS/2 Synaptics TouchPad"
	    #- P: Phys=isa0060/serio1/input0
	    #- S: Sysfs=/class/input/input1
	    #- H: Handlers=mouse0 event1 ts0
	    #- B: EV=b
	    #- B: KEY=6420 0 70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_TOOL_FINGER BTN_TOUCH BTN_TOOL_DOUBLETAP BTN_TOOL_TRIPLETAP
	    #-    or B: KEY=6420 0 670000 0 0 0 0 0 0 0 0  #=> same with BTN_BACK
	    #-    or B: KEY=420 30000 670000 0 0 0 0 0 0 0 0 #=> same without BTN_TOOL_TRIPLETAP but with BTN_B
	    #- B: ABS=11000003 #=> X Y PRESSURE TOOL_WIDTH

	    #- I: Bus=0003 Vendor=056a Product=0065 Version=0108
	    #- N: Name="Wacom Bamboo"
	    #- B: KEY=1c63 0 70033 0 0 0 0 0 0 0 0 #=> BTN_0 BTN_1 BTN_4 BTN_5 BTN_LEFT BTN_RIGHT BTN_MIDDLE TOOL_PEN TOOL_RUBBER TOOL_BRUSH TOOL_FINGER TOOL_MOUSE TOUCH STYLUS STYLUS2
            #- B: ABS=100 3000103 #=> X Y WHEEL PRESSURE DISTANCE MISC

	    #- I: Bus=0003 Vendor=056a Product=0011 Version=0201
	    #- N: Name="Wacom Graphire2 4x5"
            #- B: KEY=1c43 0 70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE TOOL_PEN TOOL_RUBBER TOOL_FINGER TOOL_MOUSE TOUCH STYLUS STYLUS2
            #- B: ABS=100 3000003 #=> X Y PRESSURE DISTANCE MISC

	    $device->{Synaptics} = $descr eq 'SynPS/2 Synaptics TouchPad';
	    $device->{ALPS} = $descr =~ m!^AlpsPS/2 ALPS!;
	    $device->{Elantech} = $descr eq 'ETPS/2 Elantech Touchpad';

	} elsif (/H: Handlers=(.*)/) {
	    my @l = split(' ', $1);
	    $device->{driver} = $l[0]; #- keep it for compatibility
	    $device->{Handlers} = +{ map { (/^(.*?)\d*$/ ? $1 : $_, $_) } split(' ', $1) };
	    $event = $device->{Handlers}{event};
	} elsif (/S: Sysfs=(.+)/) {
	    $device->{sysfs_path} = $1;
	} elsif (/P: Phys=(.*)/) {
            $device->{location} = $1;
            $device->{bus} = 'isa' if $device->{location} =~ /^isa/;
            $device->{bus} = 'usb' if $device->{location} =~ /^usb/i;
	} elsif (/B: REL=(.* )?(.*)/) {
	    #- REL=3   #=> X Y
	    #- REL=103 #=> X Y WHEEL
	    #- REL=143 #=> X Y HWHEEL WHEEL
	    #- REL=1c3 #=> X Y HWHEEL DIAL WHEEL
	    my $REL = hex($2);
	    $device->{HWHEEL} = 1 if $REL & (1 << 6);
	    $device->{WHEEL} = 1 if $REL & (1 << 8); #- not reliable ("Mitsumi Apple USB Mouse" says REL=103 and KEY=1f0000 ...)

	} elsif (/B: KEY=(\S+)/) {	   
	    #- some KEY explained:
	    #- (but note that BTN_MIDDLE can be reported even if missing)
	    #- (and "Mitsumi Apple USB Mouse" reports 1f0000)
	    #- KEY=30000 0 0 0 0 0 0 0 0  #=> BTN_LEFT BTN_RIGHT
	    #- KEY=70000 0 0 0 0 0 0 0 0  #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE
	    #- KEY=1f0000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_SIDE BTN_EXTRA
	    if (! -f "/dev/input/$event") {
		    devices::make("/dev/input/$event");
	    }
	    my @KEYS = c::EVIocGBitKey("/dev/input/$event");
	    $device->{SIDE} = 1 if $KEYS[0] & (1 << 0x13);

        } elsif (/^\s*$/) {
	    push @devices, $device if $device;
	    undef $device;
	}
    }
    @devices;
}

sub getInputDevices_and_usb() {
    my @l = getInputDevices();

    foreach my $usb (usb_probe()) {
	if (my $e = find { hex($_->{vendor}) == $usb->{vendor} && hex($_->{id}) == $usb->{id} } @l) {
	    $e->{usb} = $usb;
	}
    }

    @l;
}

sub serialPorts() { map { "ttyS$_" } 0..7 }
sub serialPort2text {
    $_[0] =~ /ttyS(\d+)/ ? "$_[0] / COM" . ($1 + 1) : $_[0];
}

sub getSerialModem {
    my ($modules_conf, $o_mouse) = @_;
    my $mouse = $o_mouse || {};
    $mouse->{device} = readlink "/dev/mouse";
    my $serdev;
    if (arch() =~ /ppc/) {
	    $serdev = "macserial";
    } elsif (arch() =~ /mips/) {
	    $serdev = "8250";
    } else {
	    $serdev = "serial";
    }
    eval { modules::load($serdev) };

    my @modems;

    probeSerialDevices();
    foreach my $port (serialPorts()) {
	next if $mouse->{device} =~ /$port/;
     my $device = "/dev/$port";
	next if !-e $device || !hasModem($device);
     $serialprobe{$device}{device} = $device;
     push @modems, $serialprobe{$device};
    }
    my @devs = pcmcia_probe();
    foreach my $modem (@modems) {
        #- add an alias for macserial on PPC
        $modules_conf->set_alias('serial', $serdev) if arch() =~ /ppc/ && $modem->{device};
        foreach (@devs) { $_->{device} and $modem->{device} = $_->{device} }
    }
    @modems;
}

our $detect_serial_modem = 1;
sub getModem {
    my ($modules_conf) = @_;
    ($detect_serial_modem ? getSerialModem($modules_conf, {}) : ()), get_winmodems();
}

sub get_winmodems() {
    matching_driver__regexp('www\.linmodems\.org'),
    matching_driver(list_modules::category2modules('network/modem'),
    list_modules::category2modules('network/slmodem'));
}

sub getBewan() {
    matching_desc__regexp('Bewan Systems\|.*ADSL|BEWAN ADSL USB|\[Unicorn\]');
}

# generate from the following from eci driver sources:
# perl -e 'while (<>) { print qq("$1$2",\n"$3$4",\n) if /\b([a-z\d]*)\s*([a-z\d]*)\s*([a-z\d]*)\s*([a-z\d]*)$/ }' <modems.db|sort|uniq
sub getECI() {
    my @ids = (
              "05090801",
              "05472131",
              "06590915",
              "071dac81",
              "08ea00c9",
              "09150001",
              "09150002",
              "091500ca",
              "091500e7",
              "09150101",
              "09150102",
              "09150204",
              "09150206",
              "09150802",
              "09150916",
              "09158000",
              "09158001",
              "0915ac82",
              "0baf00e6",
              "0e600100",
              "0e600101",
              "0fe88000",
              "16900203",
              "16900205",
             );
    grep { member(sprintf("%04x%04x%04x%04x", $_->{vendor}, $_->{id}, $_->{subvendor}, $_->{subid}), @ids) } usb_probe();
}

sub get_xdsl_usb_devices() {
    my @bewan = detect_devices::getBewan();
    $_->{driver} = $_->{bus} eq 'USB' ? 'unicorn_usb_atm' : 'unicorn_pci_atm' foreach @bewan;
    my @eci = detect_devices::getECI();
    $_->{driver} = 'eciusb' foreach @eci;
    my @usb = detect_devices::probe_category('network/usb_dsl');
    $_->{description} = "USB ADSL modem (eagle chipset)" foreach
      grep { $_->{driver} eq 'ueagle_atm' && $_->{description} eq '(null)' } @usb;
    @usb, @bewan, @eci;
}

sub is_lan_interface {
    #- we want LAN like interfaces here (eg: ath|br|eth|fddi|plip|ra|tr|usb|wlan).
    #- there's also bnep%d for bluetooth, bcp%d...
    #- we do this by blacklisting the following interfaces:
    #-   hso%d are created by drivers/net/usb/hso.c
    #-   ippp|isdn|plip|ppp (initscripts suggest that isdn%d can be created but kernel sources claim not)
    #-   ippp%d are created by drivers/isdn/i4l/isdn_ppp.c
    #-   plip%d are created by drivers/net/plip.c
    #-   ppp%d are created by drivers/net/ppp_generic.c
    #-   pan%d are created by bnep
    is_useful_interface($_[0]) &&
    $_[0] !~ /^(?:hso|ippp|isdn|plip|ppp|pan)/;
}

sub is_useful_interface {
    #- sit0 which is *always* created by net/ipv6/sit.c, thus is always created since net.agent loads ipv6 module
    #- wifi%d are created by 3rdparty/hostap/hostap_hw.c (pseudo statistics devices, #14523)
    #- wmaster%d are created by net/mac80211/ieee80211.c ("master" 802.11 device)
    #- ax*, rose*, nr*, bce* and scc* are Hamradio devices (#28776)
    $_[0] !~ /^(?:lo|sit0|wifi|wmaster|ax|rose|nr|bce|scc)/;
}

sub is_wireless_interface {
    my ($interface) = @_;
    #- some wireless drivers don't always support the SIOCGIWNAME ioctl
    #-   ralink devices need to be up to support it
    #-   wlan-ng (prism2_*) need some special tweaks to support it
    #- use sysfs as fallback to detect wireless interfaces,
    #- i.e interfaces for which get_wireless_stats() is available
    c::isNetDeviceWirelessAware($interface) || -e "/sys/class/net/$interface/wireless";
}

sub get_all_net_devices() {
    #- we need both detection schemes since:
    #-   get_netdevices() use the SIOCGIFCONF ioctl that does not list interfaces that are down
    #-   /proc/net/dev does not list VLAN and IP aliased interfaces
    uniq(
        (map { if_(/^\s*([A-Za-z0-9:\.]*):/, $1) } cat_("/proc/net/dev")),
        c::get_netdevices(),
    );
}

sub get_lan_interfaces() { grep { is_lan_interface($_) } get_all_net_devices() }
sub get_net_interfaces() { grep { is_useful_interface($_) } get_all_net_devices() }
sub get_wireless_interface() { find { is_wireless_interface($_) } get_lan_interfaces() }

sub is_bridge_interface {
    my ($interface) = @_;
    -f "/sys/class/net/$interface/bridge/bridge_id";
}

sub get_ids_from_sysfs_device {
    my ($dev_path) = @_;
    my $dev_cat = sub { chomp_(cat_("$dev_path/$_[0]")) };
    my $usb_root = -f "$dev_path/bInterfaceNumber" && "../" || -f "$dev_path/idVendor" && "";
    my $is_pcmcia = -f "$dev_path/card_id";
    my $sysfs_ids;
    my $bus = get_sysfs_field_from_link($dev_path, "subsystem");
    #- FIXME: use $bus
    if ($is_pcmcia) {
      $sysfs_ids = { modalias => $dev_cat->('modalias') };
    } else {
        $sysfs_ids = $bus eq 'ieee1394' ?
          {
            version => "../vendor_id",
            specifier_id => "specifier_id",
            specifier_version => "version",
          } :
        defined $usb_root ?
          { id => $usb_root . 'idProduct', vendor => $usb_root . 'idVendor' } :
          { id => "device", subid => "subsystem_device", vendor => "vendor", subvendor => "subsystem_vendor" };
        $_ = hex($dev_cat->($_)) foreach values %$sysfs_ids;
        if ($bus eq 'pci') {
            my $device = basename(readlink $dev_path);
            my @ids = $device =~ /^(.{4}):(.{2}):(.{2})\.(.+)$/;
            @$sysfs_ids{qw(pci_domain pci_bus pci_device pci_function)} = map { hex($_) } @ids if @ids;
        }
    }
    $sysfs_ids;
}

sub device_matches_sysfs_ids {
    my ($device, $sysfs_ids) = @_;
    every { defined $device->{$_} && member($device->{$_}, $sysfs_ids->{$_}, 0xffff) } keys %$sysfs_ids;
}

sub device_matches_sysfs_device {
  my ($device, $dev_path) = @_;
  device_matches_sysfs_ids($device, get_ids_from_sysfs_device($dev_path));
}

#sub getISDN() {
#    mapgrep(sub {member (($_[0] =~ /\s*(\w*):/), @netdevices), $1 }, split(/\n/, cat_("/proc/net/dev")));
#}

sub getUPS() {
    # MGE serial PnP devices:
    (map {
        $_->{port} = $_->{DEVICE};
        $_->{bus} = "Serial";
        $_->{driver} = "mge-utalk" if $_->{MODEL} =~ /0001/;
        $_->{driver} = "mge-shut"  if $_->{MODEL} =~ /0002/;
        $_->{media_type} = 'UPS';
        $_->{description} = "MGE UPS SYSTEMS|UPS - Uninterruptible Power Supply" if $_->{MODEL} =~ /000[12]/;
        $_;
    } grep { $_->{DESCRIPTION} =~ /MGE UPS/ } values %serialprobe),
    # USB UPSs;
    (map { ($_->{name} = $_->{description}) =~ s/.*\|//; $_ }
        map {
            if ($_->{description} =~ /^American Power Conversion\|Back-UPS/ && $_->{driver} eq 'usbhid') {
                #- FIXME: should not be hardcoded, use $_->{sysfs_device} . */usb:(hiddev\d+)
                #- the device should also be assigned to the ups user
                $_->{port} = "/dev/hiddev0";
                $_->{driver} = 'hidups';
                $_;
            } elsif ($_->{description} =~ /^MGE UPS Systems\|/ && $_->{driver} =~ /ups$/) {
                $_->{port} = "auto";
                $_->{media_type} = 'UPS';
                $_->{driver} = 'newhidups';
                $_;
            } else {
                ();
            }
        } usb_probe());
}

$pcitable_addons = <<'EOF';
# add here lines conforming the pcitable format (0xXXXX\t0xXXXX\t"\w+"\t".*")
EOF

$usbtable_addons = <<'EOF';
# add here lines conforming the usbtable format (0xXXXX\t0xXXXX\t"\w+"\t".*")
EOF

sub install_addons {
    my ($prefix) = @_;

    #- this test means install_addons can only be called after ldetect-lst has been installed.
    if (-d "$prefix/usr/share/ldetect-lst") {
	my $update = 0;
	foreach ([ 'pcitable.d', $pcitable_addons ], [ 'usbtable.d', $usbtable_addons ]) {
	    my ($dir, $str) = @$_;
	    -d "$prefix/usr/share/ldetect-lst/$dir" && $str =~ /^[^#]/m and $update = 1 and
	      output "$prefix/usr/share/ldetect-lst/$dir/95drakx.lst", $str;
	}
	$update and run_program::rooted($prefix, "/usr/sbin/update-ldetect-lst");
    }
}

sub add_addons {
    my ($addons, @l) = @_;

    foreach (split "\n", $addons) {
	/^\s/ and die qq(bad detect_devices::probeall_addons line "$_");
	s/^#.*//;
	s/"(.*?)"/$1/g;
	next if /^$/;
	my ($vendor, $id, $driver, $description) = split("\t", $_, 4) or die qq(bad detect_devices::probeall_addons line "$_");
	foreach (@l) {
	    $_->{vendor} == hex $vendor && $_->{id} == hex $id or next;
	    put_in_hash($_, { driver => $driver, description => $description });
	}
    }
    @l;
}

sub get_pci_sysfs_path {
    my ($l) = @_;
    sprintf('%04x:%02x:%02x.%d', $l->{pci_domain}, $l->{pci_bus}, $l->{pci_device}, $l->{pci_function});
}


my (@pci, @usb);

sub pci_probe__real() {
    add_addons($pcitable_addons, map {
	my %l;
	@l{qw(vendor id subvendor subid pci_domain pci_bus pci_device pci_function pci_revision is_pciexpress media_type nice_media_type driver description)} = split "\t";
	$l{$_} = hex $l{$_} foreach qw(vendor id subvendor subid);
	$l{bus} = 'PCI';
	$l{sysfs_device} = '/sys/bus/pci/devices/' . get_pci_sysfs_path(\%l);
	\%l;
    } c::pci_probe());
}
sub pci_probe() {
    state $done;
    if (!$done) {
        @pci = pci_probe__real() if !@pci;
        foreach (@pci) {
            $_->{nice_bus} = $_->{is_pciexpress} ? "PCI Express" : "PCI";
        }
    }
    @pci;
}

sub usb_probe__real() {
    -e "/proc/bus/usb/devices" or return;

    add_addons($usbtable_addons, map {
	my %l;
	@l{qw(vendor id media_type driver description pci_bus pci_device usb_port)} = split "\t";
	$l{media_type} = join('|', grep { $_ ne '(null)' } split('\|', $l{media_type}));
	$l{$_} = hex $l{$_} foreach qw(vendor id);
	$l{sysfs_device} = "/sys/bus/usb/devices/$l{pci_bus}-" . ($l{usb_port} + 1);
	$l{bus} = 'USB';
	\%l;
    } c::usb_probe());
}
sub usb_probe() {
    if ($::isStandalone && @usb) {
	    @usb;
    } else {
	    @usb = usb_probe__real();
    }
}

sub firewire_probe() {
    my $dev_dir = '/sys/bus/ieee1394/devices';
    my @l = map {
        my $dir = "$dev_dir/$_";
        my $get = sub { chomp_(cat_($_[0])) };
        {
            version => hex($get->("$dir/../vendor_id")),
            specifier_id => hex($get->("$dir/specifier_id")),
            specifier_version => hex($get->("$dir/version")),
            bus => 'Firewire',
            sysfs_device => $dir,
        };
    } grep { -f "$dev_dir/$_/specifier_id" } all($dev_dir);

    my $e;
    foreach (cat_('/proc/bus/ieee1394/devices')) {
	if (m!Vendor/Model ID: (.*) \[(\w+)\] / (.*) \[(\w+)\]!) {
	    push @l, $e = { 
			   vendor => hex($2), id => hex($4), 
			   description => join('|', $1, $3),
			   bus => 'Firewire',
			  };
	} elsif (/Software Specifier ID: (\w+)/) {
	    $e->{specifier_id} = hex $1;
	} elsif (/Software Version: (\w+)/) {
	    $e->{specifier_version} = hex $1;	    
	}
    }

    foreach (@l) {
	if ($_->{specifier_id} == 0x00609e && $_->{specifier_version} == 0x010483) {
	    add2hash($_, { driver => 'sbp2', description => "Generic Firewire Storage Controller" });
	} elsif ($_->{specifier_id} == 0x00005e && $_->{specifier_version} == 0x000001) {
	    add2hash($_, { driver => 'eth1394', description => "IEEE 1394 IPv4 Driver (IPv4-over-1394 as per RFC 2734)" });
	}
    }
    @l;
}

sub pcmcia_controller_probe() {
    my ($controller) =  probe_category('bus/pcmcia');
    if (!$controller && !$::testing && !$::noauto && arch() =~ /i.86/) {
        my $driver = c::pcmcia_probe();
        $controller = { driver => $driver, description => "PCMCIA controller ($driver)" } if $driver;
    }
    $controller;
}

sub pcmcia_probe() {
    require modalias;
    require modules;
    my $dev_dir = '/sys/bus/pcmcia/devices';
    map {
        my $dir = "$dev_dir/$_";
        my $get = sub { chomp_(cat_("$dir/$_[0]")) };
        my $class_dev = first(glob_("$dir/tty/tty*"));
        my $device = $class_dev && basename($class_dev);
        my $modalias = $get->('modalias');
        my $driver = get_sysfs_field_from_link($dir, 'driver');
        #- fallback on modalias result
        #- but only if the module isn't loaded yet (else, it would already be binded)
        #- this prevents from guessing the wrong driver for multi-function devices
        my $module = $modalias && first(modalias::get_modules($modalias));
        $driver ||= !member($module, modules::loaded_modules()) && $module;
        {
            description => join(' ', grep { $_ } map { $get->("prod_id$_") } 1 .. 4),
            driver => $driver,
            if_($modalias, modalias => $modalias),
            if_($device, device => $device),
            bus => 'PCMCIA',
            sysfs_device => $dir,
        };
    } all($dev_dir);
}

my $dmi_probe;
sub dmi_probe() {
    if (arch() !~ /86/) {
        $dmi_probe ||= [];
    }
    else {
    $dmi_probe ||= [ map {
	/(.*?)\t(.*)/ && { bus => 'DMI', driver => $1, description => $2 };
    } $> ? () : c::dmi_probe() ];
    }
    @$dmi_probe;
}

# pcmcia_probe provides field "device", used in network.pm
# => probeall with $probe_type is unsafe
sub probeall() {
    return if $::noauto;

    pci_probe(), usb_probe(), firewire_probe(), pcmcia_probe(), dmi_probe(), getInputDevices_and_usb();
}
sub probeall_update_cache() {
    return if $::noauto;
    @pci = pci_probe__real(), @usb = usb_probe__real(), firewire_probe(), pcmcia_probe(), dmi_probe();
}
sub matching_desc__regexp {
    my ($regexp) = @_;
    grep { $_->{description} =~ /$regexp/i } probeall();
}
sub matching_driver__regexp {
    my ($regexp) = @_;
    grep { $_->{driver} =~ /$regexp/i } probeall();
}

sub matching_driver {
    my (@list) = @_;
    grep { member($_->{driver}, @list) } probeall();
}
sub probe_name {
    my ($name) = @_;
    map { $_->{driver} =~ /^$name:(.*)/ } probeall();
}
sub probe_unique_name {
    my ($name) = @_;
    my @l = uniq(probe_name($name));
    if (@l > 1) {
	log::l("oops, more than one $name from probe: ", join(' ', @l));
    }
    $l[0];
}

sub stringlist {
    my ($b_verbose) = @_;
    map {
	my $ids = $b_verbose || $_->{description} eq '(null)' ?  sprintf("vendor:%04x device:%04x", $_->{vendor}, $_->{id}) : '';
	my $subids = $_->{subid} && $_->{subid} != 0xffff ? sprintf("subv:%04x subd:%04x", $_->{subvendor}, $_->{subid}) : '';
	sprintf("%-16s: %s%s%s", 
		$_->{driver} || 'unknown', 
		$_->{description},
		$_->{media_type} ? sprintf(" [%s]", $_->{media_type}) : '',
		$ids || $subids ? " ($ids" . ($ids && $subids && " ") . "$subids)" : '',
	       );
    } probeall(); 
}

sub tryOpen($) {
    my $F;
    sysopen($F, devices::make($_[0]), c::O_NONBLOCK()) && $F;
}

sub tryWrite($) {
    my $F;
    sysopen($F, devices::make($_[0]), 1 | c::O_NONBLOCK()) && $F;
}

my @dmesg;
sub syslog() {
    if (-r "/tmp/syslog") {
	map { /<\d+>(.*)/ } cat_("/tmp/syslog");
    } else {
	@dmesg = `/bin/dmesg` if !@dmesg;
	@dmesg;
    }
}

sub get_mac_model() {
    my $mac_model = cat_("/proc/device-tree/model") || die "Cannot open /proc/device-tree/model";
    log::l("Mac model: $mac_model");
    $mac_model;	
}

sub get_mac_generation() {
    cat_('/proc/cpuinfo') =~ /^pmac-generation\s*:\s*(.*)/m ? $1 : "Unknown Generation";	
}

sub hasSMP() { 
    return if $::testing;
    (any { /NR_CPUS limit of 1 reached/ } syslog()) ||
     (any { /^processor\s*:\s*(\d+)/ && $1 > 0 } cat_('/proc/cpuinfo')) ||
      any { /\bProcessor #(\d+)\s+(\S*)/ && $1 > 0 && $2 ne 'invalid' } syslog();
}
sub hasPCMCIA() { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab)

my (@dmis, $dmidecode_already_runned);

# we return a list b/c several DMIs have the same name:
sub dmidecode() {
    return @dmis if $dmidecode_already_runned;

    return if $>;
    my ($ver, @l) = arch() =~ /86/ ? run_program::get_stdout('dmidecode') : ();

    my $tab = "\t";

    my ($major, $minor) = $ver =~ /(\d+)\.(\d+)/;

    if ($major > 2 || $major == 2 && $minor > 7) {
	#- new dmidecode output is less indented
	$tab = '';
	#- drop header
	shift @l while @l && $l[0] ne "\n";
    }

    foreach (@l) {
	if (/^$tab\t(.*)/) {
	    $dmis[-1]{string} .= "$1\n";
	    $dmis[-1]{$1} = $2 if /^$tab\t(.*): (.*)$/;
	} elsif (my ($s) = /^$tab(.*)/) {
	    next if $s =~ /^$/ || $s =~ /\bDMI type \d+/;
	    $s =~ s/ Information$//;
	    push @dmis, { name => $s };
	}
    }
    $dmidecode_already_runned = 1;
    @dmis;
}
sub dmidecode_category {
    my ($cat) = @_;
    my @l = grep { $_->{name} eq $cat } dmidecode();
    wantarray() ? @l : $l[0] || {};
}

#- size in MB
sub dmi_detect_memory() {
    my @l1 = map { $_->{'Enabled Size'} =~ /(\d+) MB/ && $1 } dmidecode_category('Memory Module');
    my @l2 = map { $_->{'Form Factor'} =~ /^(SIMM|SIP|DIP|DIMM|FB-DIMM|RIMM|SODIMM|SRIMM)$/ && 		     
		     ($_->{Size} =~ /(\d+) MB/ && $1 || $_->{Size} =~ /(\d+) kB/ && $1 * 1024);
		 } dmidecode_category('Memory Device');
    max(sum(@l1), sum(@l2));
}

sub computer_info() {
     my $Chassis = dmidecode_category('Chassis')->{Type} =~ /(\S+)/ && $1;

     my $date = dmidecode_category('BIOS')->{'Release Date'} || '';
     my $BIOS_Year = $date =~ m!(\d{4})! && $1 ||
	             $date =~ m!\d\d/\d\d/(\d\d)! && "20$1";
	
     +{ 
	 isLaptop => member($Chassis, 'Portable', 'Laptop', 'Notebook', 'Hand Held', 'Sub Notebook', 'Docking Station'),
	 isServer => member($Chassis, 'Pizza Box', 'Main Server Chassis', 'Rack Mount Chassis', 'Blade'),
	 if_($BIOS_Year, BIOS_Year => $BIOS_Year),
     };
}

#- try to detect a laptop, we assume pcmcia service is an indication of a laptop or
#- the following regexp to match graphics card apparently only used for such systems.
sub isLaptop() {
    arch() =~ /ppc/ ? 
      get_mac_model() =~ /Book/ :
      computer_info()->{isLaptop}
	|| glob_("/sys/bus/acpi/devices/PNP0C0D:*") #- ACPI lid button
	|| (matching_desc__regexp('C&T.*655[45]\d') || matching_desc__regexp('C&T.*68554') ||
	    matching_desc__regexp('Neomagic.*Magic(Media|Graph)') ||
	    matching_desc__regexp('ViRGE.MX') || matching_desc__regexp('S3.*Savage.*[IM]X') ||
	    matching_desc__regexp('Intel Corporation\|Mobile') ||
	    matching_desc__regexp('\bATI\b.*(Mobility|\bLT\b)'))
	|| (any { $_->{'model name'} =~ /\b(mobile|C7-M)\b/i } getCPUs())
	|| probe_unique_name("Type") eq 'laptop'
        #- ipw2100/2200/3945 are Mini-PCI (Express) adapters
	|| (any { member($_->{driver}, qw(ipw2100 ipw2200 ipw3945)) } pci_probe());
}

sub isServer() {
    computer_info()->{isServer}
      || (any { $_->{Type} =~ /ECC/ } dmidecode_category('Memory Module'))
      || dmidecode_category('System Information')->{Manufacturer} =~ /Supermicro/i
      || dmidecode_category('System Information')->{'Product Name'} =~ /NetServer|Proliant|PowerEdge|eServer|IBM System x|ThinkServer/i
      || matching_desc__regexp('LSI Logic.*SCSI')
      || matching_desc__regexp('MegaRAID')
      || matching_desc__regexp('NetServer')
      || (any { $_->{'model name'} =~ /(Xeon|Opteron)/i } getCPUs());
}

sub BIGMEM() {
    arch() !~ /x86_64|ia64/ && $> == 0 && dmi_detect_memory() > 4 * 1024;
}

sub is_i586() {
    my $cpuinfo = cat_('/proc/cpuinfo');
    if (arch() !~ /86/) {
        return 0;
    }
    $cpuinfo =~ /^cpu family\s*:\s*(\d+)/m && $1 < 6 ||
      $cpuinfo =~ /^model name\s*:\s*Transmeta.* TM5800/m || # mdvbz#37866
      !has_cpu_flag('cmov');
}

sub is_mips_lemote() {
    to_bool(cat_('/proc/cpuinfo') =~ /lemote/);
}

sub is_mips_ict() {
    to_bool(cat_('/proc/cpuinfo') =~ /ict/);
}

sub is_mips_gdium() {
    to_bool(cat_('/proc/cpuinfo') =~ /gdium/);
}

sub is_mips_st_ls2f() {
    to_bool(cat_('/proc/cpuinfo') =~ /st-ls2f/);
}

sub is_arm_openrd_client {
    to_bool(cat_('/proc/cpuinfo') =~ /OpenRD Client/);
}

sub is_arm_versatile {
    to_bool(cat_('/proc/cpuinfo') =~ /ARM-Versatile/);
}

sub is_arm_efikamix {
    to_bool(cat_('/proc/cpuinfo') =~ /Efika MX/);
}

sub is_xbox() {
    any { $_->{vendor} == 0x10de && $_->{id} == 0x02a5 } pci_probe();
}

sub is_virtualbox() {
    any { $_->{driver} eq 'vboxadd' } detect_devices::pci_probe();
}

sub is_vmware() {
    any { $_->{driver} =~ /Card:VMware/ } detect_devices::pci_probe();
}

sub is_netbook_nettop() {
    my @cpus = getCPUs();
    (any { $_->{'model name'} =~ /(\bIntel\(R\) Atom\(TM\)\B)/i } @cpus) ||
    (any { $_->{'model name'} =~ /(\bIntel\(R\) Celeron\(R\) M processor\b|\bVIA C7-M Processor\b|\bGeode\(TM\)\B)/i && $_->{'cpu MHz'} < 1500 } @cpus);
}

sub has_low_resources() {
    availableRamMB() < 100 || arch() =~ /i.86/ && ix86_cpu_frequency() < 350;
}

sub need_light_desktop() {
    has_low_resources() || is_netbook_nettop();
}

sub has_cpu_flag {
    my ($flag) = @_;
    cat_('/proc/cpuinfo') =~ /^flags.*\b$flag\b/m;
}

sub matching_types() {
    +{
	mips_lemote => is_mips_lemote(),
	mips_ict => is_mips_ict(),
	mips_st_ls2f => is_mips_st_ls2f(),
	laptop => isLaptop(),
	'touchpad' => hasTouchpad(),
	'64bit' => to_bool(arch() =~ /64/),
	wireless => to_bool(get_wireless_interface() || probe_category('network/wireless')),
    };
}

sub hasWacom()     { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() }
sub hasTouchpad()  { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() }

sub usbWacom()     { grep { $_->{vendor} eq '056a' } getInputDevices() }
sub usbKeyboards() { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() }
sub usbStorage()   { grep { $_->{media_type} =~ /Mass Storage\|/ } usb_probe() }
sub has_mesh()     { find { /mesh/ } all_files_rec("/proc/device-tree") }
sub has_53c94()    { find { /53c94/ } all_files_rec("/proc/device-tree") }

sub usbKeyboard2country_code {
    my ($usb_kbd) = @_;
    my ($F, $tmp);
    sysopen($F, sprintf("/proc/bus/usb/%03d/%03d", $usb_kbd->{pci_bus}, $usb_kbd->{pci_device}), 0) and
      sysseek $F, 0x28, 0 and
      sysread $F, $tmp, 1 and
      unpack("C", $tmp);
}

sub probeSerialDevices() {
    require list_modules;
    require modules;
    modules::append_to_modules_loaded_at_startup_for_all_kernels(modules::load_category($::o->{modules_conf}, 'various/serial'));
    foreach (0..3) {
	#- make sure the device are created before probing,
	devices::make("/dev/ttyS$_");
	#- and make sure the device is a real terminal (major is 4).
	int((stat "/dev/ttyS$_")[6]/256) == 4 or $serialprobe{"/dev/ttyS$_"} = undef;
    }

    #- for device already probed, we can safely (assuming device are
    #- not moved during install :-)
    #- include /dev/mouse device if using an X server.
    mkdir_p("/var/lock");
    -l "/dev/mouse" and $serialprobe{"/dev/" . readlink "/dev/mouse"} = undef;
    foreach (keys %serialprobe) { m|^/dev/(.*)| and touch "/var/lock/LCK..$1" }

    print STDERR "Please wait while probing serial ports...\n";
    #- start probing all serial ports... really faster than before ...
    #- ... but still take some time :-)
    my %current; 
    foreach (run_program::get_stdout('serial_probe')) {
	if (/^\s*$/) {
	    $serialprobe{$current{DEVICE}} = { %current } if $current{DEVICE};
	    %current = ();
	} elsif (/^([^=]+)=(.*?)\s*$/) {
	    $current{$1} = $2;
	}
    }

    foreach (values %serialprobe) {
	$_->{DESCRIPTION} =~ /modem/i and $_->{CLASS} = 'MODEM'; #- hack to make sure a modem is detected.
	$_->{DESCRIPTION} =~ /olitec/i and $_->{CLASS} = 'MODEM'; #- hack to make sure such modem gets detected.
	log::l("probed $_->{DESCRIPTION} of class $_->{CLASS} on device $_->{DEVICE}");
    }
}

sub probeSerial($) { $serialprobe{$_[0]} }

sub hasModem($) {
    $serialprobe{$_[0]} && $serialprobe{$_[0]}{CLASS} eq 'MODEM' && $serialprobe{$_[0]}{DESCRIPTION};
}

sub hasMousePS2 {
    my $t; sysread(tryOpen($_[0]) || return, $t, 256) != 1 || $t ne "\xFE";
}

sub probeall_unavailable_modules() {
    map {
        my $driver = $_->{driver};
        $driver !~ /:/ &&
        !member($driver, 'hub', 'unknown', 'amd64_agp') &&
        !modules::module_is_available($driver) ?
          $driver :
          ();
    } probeall();
}

sub probeall_dkms_modules() {
    my @unavailable_modules = probeall_unavailable_modules() or return;
    require modalias;
    my $dkms_modules = modalias::parse_file_modules($::prefix . "/usr/share/ldetect-lst/dkms-modules.alias");
    intersection([ keys(%$dkms_modules) ], \@unavailable_modules);
}

sub usb_description2removable {
    local ($_) = @_;
    return 'camera' if /\bcamera\b/i;
    return 'memory_card' if /\bmemory\s?stick\b/i || /\bcompact\s?flash\b/i || /\bsmart\s?media\b/i;
    return 'memory_card' if /DiskOnKey/i || /IBM-DMDM/i;
    return 'zip' if /\bzip\s?(100|250|750)/i;
    return 'floppy' if /\bLS-?120\b/i;
    return;
}

sub usb2removable {
    my ($e) = @_;
    $e->{usb_driver} or return;

    if ($e->{usb_driver} =~ /Removable:(.*)/) {
	return $1;
    } elsif (my $name = usb_description2removable($e->{usb_description})) {
	return $name;
    }
    undef;
}

sub suggest_mount_point {
    my ($e) = @_;

    my $name = $e->{media_type};
    if (member($e->{media_type}, 'hd', 'fd')) {
	if (exists $e->{usb_driver}) {
	    $name = usb2removable($e) || 'removable';
	} elsif (isZipDrive($e)) {
	    $name = 'zip';
	} elsif ($e->{media_type} eq 'fd') {
	    $name = 'floppy';
	} else {
	    log::l("suggest_mount_point: do not know what to with hd $e->{device}");
	}
    }
    $name;
}

1;

#- Local Variables:
#- mode:cperl
#- tab-width:8
#- End:
="hl slc">#: ../urpmf:79 #, c-format msgid " --summary - summary\n" msgstr "" #: ../urpmf:80 #, fuzzy, c-format msgid " --url - url\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmf:81 #, fuzzy, c-format msgid " --vendor - vendor\n" msgstr "დააჭირეთ Esc ღილაკს ინტერაქტიული რეჟიმისათვის" #: ../urpmf:82 #, fuzzy, c-format msgid " -m - the media in which the package was found\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmf:83 ../urpmq:95 #, c-format msgid " -f - print version, release and arch with name.\n" msgstr "" #: ../urpmf:140 #, c-format msgid "Incorrect format: you may use only one multi-valued tag" msgstr "" #: ../urpmf:189 ../urpmi:254 ../urpmq:138 #, c-format msgid "using specific environment on %s\n" msgstr "" #: ../urpmf:227 #, c-format msgid "" "Note: since no media searched uses hdlists, urpmf was unable to return any " "result\n" msgstr "" #: ../urpmf:228 #, c-format msgid "You may want to use --name to search for package names.\n" msgstr "" #: ../urpmi:79 #, fuzzy, c-format msgid "" "urpmi version %s\n" "Copyright (C) 1999-2006 Mandriva.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "mdkupdate ვერსია %s\n" "საავტორო უფლებები (C) %s Mandriva.\n" "პროგრამა უფასო გახლავთ და ნებადართულია მისი GNU GPL ლიცენზიის პირობების " "თანახმად გავრცელება.\n" "\n" "გამოყენება:\n" #: ../urpmi:88 #, c-format msgid "" " --searchmedia - use only the given media to search requested packages.\n" msgstr "" #: ../urpmi:91 #, c-format msgid "" " --auto - non-interactive mode, assume default answers to " "questions.\n" msgstr "" #: ../urpmi:92 ../urpmq:55 #, c-format msgid "" " --auto-select - automatically select packages to upgrade the system.\n" msgstr "" #: ../urpmi:93 #, fuzzy, c-format msgid " --auto-update - update media then upgrade the system.\n" msgstr " --update - განახლების კვანძები\n" #: ../urpmi:94 #, c-format msgid " --no-md5sum - disable MD5SUM file checking.\n" msgstr "" #: ../urpmi:95 #, c-format msgid " --force-key - force update of gpg key.\n" msgstr "" #: ../urpmi:96 #, c-format msgid "" " --no-uninstall - never ask to uninstall a package, abort the " "installation.\n" msgstr "" #: ../urpmi:97 #, c-format msgid " --no-install - don't install packages (only download)\n" msgstr "" #: ../urpmi:98 ../urpmq:57 #, c-format msgid "" " --keep - keep existing packages if possible, reject requested\n" " packages that lead to removals.\n" msgstr "" #: ../urpmi:100 #, c-format msgid "" " --split-level - split in small transaction if more than given packages\n" " are going to be installed or upgraded,\n" " default is %d.\n" msgstr "" #: ../urpmi:103 #, c-format msgid " --split-length - small transaction length, default is %d.\n" msgstr "" #: ../urpmi:104 #, c-format msgid " --fuzzy, -y - impose fuzzy search.\n" msgstr "" #: ../urpmi:105 #, fuzzy, c-format msgid " --src, -s - next package is a source package.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmi:106 #, c-format msgid " --install-src - install only source package (no binaries).\n" msgstr "" #: ../urpmi:107 #, c-format msgid " --clean - remove rpm from cache before anything else.\n" msgstr "" #: ../urpmi:108 #, c-format msgid " --noclean - don't clean rpms from cache.\n" msgstr "" #: ../urpmi:110 #, c-format msgid "" " --allow-nodeps - allow asking user to install packages without\n" " dependencies checking.\n" msgstr "" #: ../urpmi:112 #, c-format msgid "" " --allow-force - allow asking user to install packages without\n" " dependencies checking and integrity.\n" msgstr "" #: ../urpmi:115 ../urpmq:70 #, c-format msgid " --root - use another root for rpm installation.\n" msgstr "" #: ../urpmi:117 #, c-format msgid "" " --use-distrib - configure urpmi on the fly from a distrib tree, useful\n" " to install a chroot with --root option.\n" msgstr "" #: ../urpmi:121 ../urpmi.addmedia:45 ../urpmi.update:33 ../urpmq:76 #, c-format msgid " --wget - use wget to retrieve distant files.\n" msgstr "" #: ../urpmi:122 ../urpmi.addmedia:46 ../urpmi.update:34 ../urpmq:77 #, c-format msgid " --curl - use curl to retrieve distant files.\n" msgstr "" #: ../urpmi:123 ../urpmi.addmedia:47 ../urpmi.update:35 ../urpmq:78 #, c-format msgid " --prozilla - use prozilla to retrieve distant files.\n" msgstr "" #: ../urpmi:124 #, c-format msgid " --curl-options - additional options to pass to curl\n" msgstr "" #: ../urpmi:125 #, c-format msgid " --rsync-options- additional options to pass to rsync\n" msgstr "" #: ../urpmi:126 #, c-format msgid " --wget-options - additional options to pass to wget\n" msgstr "" #: ../urpmi:127 #, c-format msgid " --prozilla-options - additional options to pass to prozilla\n" msgstr "" #: ../urpmi:128 ../urpmi.addmedia:48 ../urpmi.update:36 #, c-format msgid " --limit-rate - limit the download speed.\n" msgstr "" #: ../urpmi:129 #, c-format msgid "" " --resume - resume transfer of partially-downloaded files\n" " (--no-resume disables it, default is disabled).\n" msgstr "" #: ../urpmi:131 ../urpmi.addmedia:49 ../urpmi.update:37 ../urpmq:79 #, c-format msgid "" " --proxy - use specified HTTP proxy, the port number is assumed\n" " to be 1080 by default (format is <proxyhost[:port]>).\n" msgstr "" #: ../urpmi:133 ../urpmi.addmedia:51 ../urpmi.update:39 ../urpmq:81 #, c-format msgid "" " --proxy-user - specify user and password to use for proxy\n" " authentication (format is <user:password>).\n" msgstr "" #: ../urpmi:135 #, c-format msgid "" " --bug - output a bug report in directory indicated by\n" " next arg.\n" msgstr "" #: ../urpmi:138 #, c-format msgid "" " --verify-rpm - verify rpm signature before installation\n" " (--no-verify-rpm disables it, default is enabled).\n" msgstr "" #: ../urpmi:140 #, c-format msgid "" " --test - only verify if the installation can be achieved " "correctly.\n" msgstr "" #: ../urpmi:141 #, c-format msgid " --excludepath - exclude path separated by comma.\n" msgstr "" #: ../urpmi:142 #, c-format msgid " --excludedocs - exclude doc files.\n" msgstr "" #: ../urpmi:143 #, c-format msgid " --ignoresize - don't verify disk space before installation.\n" msgstr "" #: ../urpmi:144 #, fuzzy, c-format msgid " --ignorearch - allow to install rpms for unmatched architectures.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmi:145 #, c-format msgid " --noscripts - do not execute package scriptlet(s)\n" msgstr "" #: ../urpmi:147 #, c-format msgid " --skip - packages which installation should be skipped\n" msgstr "" #: ../urpmi:148 #, c-format msgid "" " --more-choices - when several packages are found, propose more choices\n" " than the default.\n" msgstr "" #: ../urpmi:150 #, c-format msgid " --nolock - don't lock rpm db.\n" msgstr "" #: ../urpmi:151 #, c-format msgid " --strict-arch - upgrade only packages with the same architecture.\n" msgstr "" #: ../urpmi:152 ../urpmq:92 #, c-format msgid " -a - select all matches on command line.\n" msgstr "" #: ../urpmi:153 #, c-format msgid " -p - allow search in provides to find package.\n" msgstr "" #: ../urpmi:154 #, c-format msgid " -P - do not search in provides to find package.\n" msgstr "" #: ../urpmi:155 #, fuzzy, c-format msgid " --quiet, -q - quiet mode.\n" msgstr "დააჭირეთ Esc ღილაკს ინტერაქტიული რეჟიმისათვის" #: ../urpmi:157 #, c-format msgid " names or rpm files given on command line will be installed.\n" msgstr "" #: ../urpmi:186 #, c-format msgid "Error: can't use --auto-select along with package list.\n" msgstr "" #: ../urpmi:193 #, c-format msgid "" "Error: To generate a bug report, specify the usual command-line arguments\n" "along with --bug.\n" msgstr "" #: ../urpmi:220 #, c-format msgid "You can't install binary rpm files when using --install-src" msgstr "" #: ../urpmi:243 #, fuzzy, c-format msgid "" "Directory [%s] already exists, please use another directory for bug report " "or delete it" msgstr "ჯგუფის სახელი უკვე არსებობს, გთხოვთ ამოირჩიოთ სხვა ჯგუფის სახელი" #: ../urpmi:244 #, fuzzy, c-format msgid "Unable to create directory [%s] for bug report" msgstr "ვერ მოვახერხე დირექტორია %s-ის შექმნა" #: ../urpmi:253 #, c-format msgid "Environment directory %s does not exist" msgstr "" #: ../urpmi:271 #, c-format msgid "" "Error: %s appears to be mounted read-only.\n" "Use --allow-force to force operation." msgstr "" #: ../urpmi:362 #, c-format msgid "Updating media...\n" msgstr "" #: ../urpmi:437 #, c-format msgid "%s: %s (to upgrade)" msgstr "" #. -PO: here format is "<package_name> (to upgrade)" #: ../urpmi:439 #, c-format msgid "%s (to upgrade)" msgstr "" #: ../urpmi:441 #, fuzzy, c-format msgid "%s: %s (to install)" msgstr "ავტომატური ინსტალირება" #. -PO: here format is "<package_name> (to install)" #: ../urpmi:443 #, fuzzy, c-format msgid "%s (to install)" msgstr "ავტომატური ინსტალირება" #: ../urpmi:447 #, fuzzy, c-format msgid "" "In order to satisfy the '%s' dependency, one of the following packages is " "needed:" msgstr "დამოკიდებულებების შესასრულებლად შემდეგი პაკეტები ჩაიწერება (%d მბ)" #: ../urpmi:450 #, c-format msgid "What is your choice? (1-%d) " msgstr "თქვენი არჩევანი? (1-%d) " #: ../urpmi:481 #, c-format msgid "" "The following package cannot be installed because it depends on packages\n" "that are older than the installed ones:\n" "%s" msgstr "" #: ../urpmi:483 #, c-format msgid "" "The following packages can't be installed because they depend on packages\n" "that are older than the installed ones:\n" "%s" msgstr "" #: ../urpmi:491 ../urpmi:511 #, fuzzy, c-format msgid "" "\n" "Continue installation anyway?" msgstr "საინსტალაციო სერვერის კონფიგურირება" #: ../urpmi:491 ../urpmi:511 ../urpmi:604 ../urpmi.addmedia:133 #, c-format msgid " (Y/n) " msgstr " (ხ/ა) [ხ] " #: ../urpmi:503 #, fuzzy, c-format msgid "" "A requested package cannot be installed:\n" "%s" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:504 #, fuzzy, c-format msgid "" "Some requested packages cannot be installed:\n" "%s" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:535 #, fuzzy, c-format msgid "" "The installation cannot continue because the following package\n" "has to be removed for others to be upgraded:\n" "%s\n" msgstr "%s შედმეგ პაკეტებშია: %s\n" #: ../urpmi:537 #, fuzzy, c-format msgid "" "The installation cannot continue because the following packages\n" "have to be removed for others to be upgraded:\n" "%s\n" msgstr "%s შედმეგ პაკეტებშია: %s\n" #: ../urpmi:544 #, fuzzy, c-format msgid "" "The following package has to be removed for others to be upgraded:\n" "%s" msgstr "%s შედმეგ პაკეტებშია: %s\n" #: ../urpmi:545 #, fuzzy, c-format msgid "" "The following packages have to be removed for others to be upgraded:\n" "%s" msgstr "%s შედმეგ პაკეტებშია: %s\n" #: ../urpmi:547 #, c-format msgid "(test only, removal will not be actually done)" msgstr "" #: ../urpmi:589 #, c-format msgid "" "You need to be root to install the following dependencies:\n" "%s\n" msgstr "" #: ../urpmi:595 #, c-format msgid "(test only, installation will not be actually done)" msgstr "" #: ../urpmi:597 #, c-format msgid "Proceed with the installation of one package?" msgid_plural "Proceed with the installation of the %d packages?" msgstr[0] "" #: ../urpmi:623 #, fuzzy, c-format msgid "Press Enter when ready..." msgstr "გთხოვთ დაგვიდასტუროთ Enter ღილაკზე დაჭერით..." #: ../urpmi:628 #, c-format msgid "Cancel" msgstr "გამოქცევა" #: ../urpmi:671 #, fuzzy, c-format msgid "The following package has bad signature" msgstr "ერთერთი შემდეგი პაკეტი საჭიროა:" #: ../urpmi:672 #, fuzzy, c-format msgid "The following packages have bad signatures" msgstr "ერთერთი შემდეგი პაკეტი საჭიროა:" #: ../urpmi:673 #, fuzzy, c-format msgid "Do you want to continue installation ?" msgstr "გნებავთ დაამუშაოთ:" #: ../urpmi:692 #, c-format msgid "Installation failed" msgstr "ინსტალაცია ჩაიშალა" #: ../urpmi:711 #, fuzzy, c-format msgid "distributing %s" msgstr "ვაინსტალირებ: %s\n" #: ../urpmi:726 #, fuzzy, c-format msgid "installing %s from %s" msgstr "ვაინსტალირებ: %s\n" #: ../urpmi:728 #, fuzzy, c-format msgid "installing %s" msgstr "ვაინსტალირებ: %s\n" #: ../urpmi:759 #, c-format msgid "Try installation without checking dependencies? (y/N) " msgstr "გნებავთ ვცადე ჩაწერა დამოკიდებულებების შემოწმების გარეშე? (ხ/ა) [ა] " #: ../urpmi:776 #, fuzzy, c-format msgid "Try harder to install (--force)? (y/N) " msgstr "გნებავთ ვცადო ჩაწერა ძალით (--force)? (ხ/ა) [ა] " #: ../urpmi:815 #, fuzzy, c-format msgid "%d installation transaction failed" msgid_plural "%d installation transactions failed" msgstr[0] "ინსტალაციაშტან დაკავშირებული მითითებები" #: ../urpmi:825 #, fuzzy, c-format msgid "Installation is possible" msgstr "ინსტალაცია ჩაიშალა" #: ../urpmi:830 #, c-format msgid "Packages are up to date" msgstr "" #: ../urpmi:838 #, fuzzy, c-format msgid "Package %s is already installed" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:839 #, fuzzy, c-format msgid "Packages %s are already installed" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:842 #, fuzzy, c-format msgid "Package %s can not be installed" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:843 #, fuzzy, c-format msgid "Packages %s can not be installed" msgstr "უკვე ყველაფერი ჩაწერილია" #: ../urpmi:862 #, c-format msgid "restarting urpmi" msgstr "" #. -PO: The URI types strings 'file:', 'ftp:', 'http:', and 'removable:' must not be translated! #. -PO: neither the ``with''. Only what is between <brackets> can be translated. #: ../urpmi.addmedia:35 #, c-format msgid "" "usage: urpmi.addmedia [options] <name> <url>\n" "where <url> is one of\n" " [file:/]/<path>\n" " ftp://<login>:<password>@<host>/<path>\n" " ftp://<host>/<path>\n" " http://<host>/<path>\n" " removable://<path>\n" "\n" "and [options] are from\n" msgstr "" #: ../urpmi.addmedia:53 #, fuzzy, c-format msgid " --update - create an update medium.\n" msgstr " --update - განახლების კვანძები\n" #: ../urpmi.addmedia:54 #, c-format msgid " --probe-synthesis - use synthesis file.\n" msgstr "" #: ../urpmi.addmedia:55 #, c-format msgid " --probe-hdlist - use hdlist file.\n" msgstr "" #: ../urpmi.addmedia:56 #, c-format msgid " --probe-rpms - use rpm files (instead of synthesis/hdlist).\n" msgstr "" #: ../urpmi.addmedia:57 #, c-format msgid " --no-probe - do not try to find any synthesis or hdlist file.\n" msgstr "" #: ../urpmi.addmedia:59 #, c-format msgid "" " --distrib - automatically create all media from an installation\n" " medium.\n" msgstr "" #: ../urpmi.addmedia:61 #, c-format msgid " --interactive - with --distrib, ask confirmation for each media\n" msgstr "" #: ../urpmi.addmedia:62 #, c-format msgid " --all-media - with --distrib, add every listed media\n" msgstr "" #: ../urpmi.addmedia:63 #, c-format msgid "" " --from - use specified url for list of mirrors, the default is\n" " %s\n" msgstr "" #: ../urpmi.addmedia:65 #, c-format msgid "" " --virtual - create virtual media wich are always up-to-date,\n" " only file:// protocol is allowed.\n" msgstr "" #: ../urpmi.addmedia:67 ../urpmi.update:42 #, c-format msgid " --no-md5sum - disable MD5SUM file checking.\n" msgstr "" #: ../urpmi.addmedia:68 #, c-format msgid " --nopubkey - don't import pubkey of added media\n" msgstr "" #: ../urpmi.addmedia:69 #, c-format msgid " --raw - add the media in config, but don't update it.\n" msgstr "" #: ../urpmi.addmedia:70 ../urpmi.removemedia:42 ../urpmi.update:49 #, c-format msgid " -c - clean headers cache directory.\n" msgstr "" #: ../urpmi.addmedia:71 ../urpmi.removemedia:44 ../urpmi.update:51 #, c-format msgid " -q - quiet mode.\n" msgstr "" #: ../urpmi.addmedia:72 ../urpmi.removemedia:45 ../urpmi.update:52 #, c-format msgid " -v - verbose mode.\n" msgstr "" #: ../urpmi.addmedia:82 #, fuzzy, c-format msgid "unable to update medium \"%s\"\n" msgstr "ვერ ვუკავშირდები მედიას \"%s\"" #: ../urpmi.addmedia:111 #, c-format msgid "bad <url> (for local directory, the path must be absolute)" msgstr "" #: ../urpmi.addmedia:114 #, fuzzy, c-format msgid "Only superuser is allowed to add media" msgstr "" "მხოლოდ სრულუფლებიან მომხმარებელს აქვს უფლება \n" "ჩაწეროს პაკეტები." #: ../urpmi.addmedia:117 #, fuzzy, c-format msgid "creating config file [%s]" msgstr "დაწერე საკონფიგურაციო ფაილი [%s]" #: ../urpmi.addmedia:118 #, fuzzy, c-format msgid "Can't create config file [%s]" msgstr "დაწერე საკონფიგურაციო ფაილი [%s]" #: ../urpmi.addmedia:125 #, c-format msgid "no need to give <relative path of hdlist> with --distrib" msgstr "" #: ../urpmi.addmedia:133 #, c-format msgid "" "\n" "Do you want to add media '%s'" msgstr "" #: ../urpmi.addmedia:164 #, c-format msgid "<relative path of hdlist> missing\n" msgstr "" #: ../urpmi.addmedia:167 #, c-format msgid "Can't use %s with remote medium" msgstr "" #: ../urpmi.addmedia:190 #, fuzzy, c-format msgid "unable to create medium \"%s\"\n" msgstr "ვერ ვუკავშირდები მედიას \"%s\"" #: ../urpmi.recover:28 #, fuzzy, c-format msgid "" "urpmi.recover version %s\n" "Copyright (C) 2006 Mandriva.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "mdkupdate ვერსია %s\n" "საავტორო უფლებები (C) %s Mandriva.\n" "პროგრამა უფასო გახლავთ და ნებადართულია მისი GNU GPL ლიცენზიის პირობების " "თანახმად გავრცელება.\n" "\n" "გამოყენება:\n" #: ../urpmi.recover:34 #, c-format msgid " --checkpoint - set repackaging start now\n" msgstr "" #: ../urpmi.recover:35 #, c-format msgid " --noclean - don't clean repackage directory on checkpoint\n" msgstr "" #: ../urpmi.recover:37 #, c-format msgid "" " --list - list transactions since provided date/duration argument\n" msgstr "" #: ../urpmi.recover:38 #, c-format msgid " --list-all - list all transactions in rpmdb (long)\n" msgstr "" #: ../urpmi.recover:39 #, c-format msgid " --list-safe - list transactions since checkpoint\n" msgstr "" #: ../urpmi.recover:40 #, c-format msgid "" " --rollback - rollback until specified date,\n" " or rollback the specified number of transactions\n" msgstr "" #: ../urpmi.recover:42 #, fuzzy, c-format msgid " --disable - turn off repackaging\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmi.recover:57 #, c-format msgid "Invalid date or duration [%s]\n" msgstr "" #: ../urpmi.recover:65 #, c-format msgid "Repackage directory not defined\n" msgstr "" #: ../urpmi.recover:68 #, c-format msgid "Can't write to repackage directory [%s]\n" msgstr "" #: ../urpmi.recover:70 #, c-format msgid "Cleaning up repackage directory [%s]...\n" msgstr "" #: ../urpmi.recover:72 #, c-format msgid "%d file removed\n" msgid_plural "%d files removed\n" msgstr[0] "" #: ../urpmi.recover:82 #, c-format msgid "Spurious command-line arguments [%s]\n" msgstr "" #: ../urpmi.recover:84 #, c-format msgid "You can't specify --checkpoint and --rollback at the same time\n" msgstr "" #: ../urpmi.recover:86 #, c-format msgid "You can't specify --checkpoint and --list at the same time\n" msgstr "" #: ../urpmi.recover:88 #, c-format msgid "You can't specify --rollback and --list at the same time\n" msgstr "" #: ../urpmi.recover:90 #, c-format msgid "You can't specify --disable along with another option" msgstr "" #: ../urpmi.recover:115 #, c-format msgid "No transaction found since %s\n" msgstr "" #: ../urpmi.recover:130 #, c-format msgid "You must be superuser to do this" msgstr "" #: ../urpmi.recover:143 ../urpmi.recover:209 #, fuzzy, c-format msgid "Writing rpm macros file [%s]...\n" msgstr "ვიძახებ hdlists ფაილს..." #: ../urpmi.recover:185 #, fuzzy, c-format msgid "No rollback date found\n" msgstr "სურათები ვერ ვიპოვე" #: ../urpmi.recover:188 #, c-format msgid "Rollback until %s...\n" msgstr "" #: ../urpmi.recover:195 #, c-format msgid "Disabling repackaging\n" msgstr "" #: ../urpmi.removemedia:38 #, c-format msgid "" "usage: urpmi.removemedia (-a | <name> ...)\n" "where <name> is a medium name to remove.\n" msgstr "" #: ../urpmi.removemedia:41 #, c-format msgid " -a - select all media.\n" msgstr "" #: ../urpmi.removemedia:43 #, c-format msgid " -y - fuzzy match on media names.\n" msgstr "" #: ../urpmi.removemedia:65 #, fuzzy, c-format msgid "Only superuser is allowed to remove media" msgstr "" "მხოლოდ სრულუფლებიან მომხმარებელს აქვს უფლება \n" "ჩაწეროს პაკეტები." #: ../urpmi.removemedia:78 #, c-format msgid "nothing to remove (use urpmi.addmedia to add a media)\n" msgstr "" #: ../urpmi.removemedia:84 #, c-format msgid "" "the entry to remove is missing\n" "(one of %s)\n" msgstr "" #: ../urpmi.update:30 #, c-format msgid "" "usage: urpmi.update [options] <name> ...\n" "where <name> is a medium name to update.\n" msgstr "" #: ../urpmi.update:41 #, fuzzy, c-format msgid " --update - update only update media.\n" msgstr " --update - განახლების კვანძები\n" #: ../urpmi.update:43 #, c-format msgid " --force-key - force update of gpg key.\n" msgstr "" #: ../urpmi.update:44 #, c-format msgid " --ignore - don't update, mark the media as ignored.\n" msgstr "" #: ../urpmi.update:45 #, c-format msgid " --no-ignore - don't update, mark the media as enabled.\n" msgstr "" #: ../urpmi.update:47 #, c-format msgid "" " --probe-rpms - do not use synthesis/hdlist, use rpm files directly\n" msgstr "" #: ../urpmi.update:48 #, c-format msgid " -a - select all non-removable media.\n" msgstr "" #: ../urpmi.update:50 #, fuzzy, c-format msgid " -f - force updating synthesis/hdlist\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmi.update:71 #, fuzzy, c-format msgid "Only superuser is allowed to update media" msgstr "" "მხოლოდ სრულუფლებიან მომხმარებელს აქვს უფლება \n" "ჩაწეროს პაკეტები." #: ../urpmi.update:79 #, c-format msgid "nothing to update (use urpmi.addmedia to add a media)\n" msgstr "" #: ../urpmi.update:97 #, c-format msgid "" "the entry to update is missing\n" "(one of %s)\n" msgstr "" #: ../urpmi.update:101 #, c-format msgid "\"%s\"" msgstr "\"%s\"" #: ../urpmi.update:102 #, fuzzy, c-format msgid "ignoring media %s" msgstr "ვაგდებ მედიას \"%s\"" #: ../urpmi.update:102 #, fuzzy, c-format msgid "enabling media %s" msgstr "ვაგდებ მედიას \"%s\"" #: ../urpmq:43 #, fuzzy, c-format msgid "" "urpmq version %s\n" "Copyright (C) 2000-2006 Mandriva.\n" "This is free software and may be redistributed under the terms of the GNU " "GPL.\n" "\n" "usage:\n" msgstr "" "mdkupdate ვერსია %s\n" "საავტორო უფლებები (C) %s Mandriva.\n" "პროგრამა უფასო გახლავთ და ნებადართულია მისი GNU GPL ლიცენზიის პირობების " "თანახმად გავრცელება.\n" "\n" "გამოყენება:\n" #: ../urpmq:51 #, c-format msgid "" " --searchmedia - use only the given media to search requested (or updated) " "packages.\n" msgstr "" #: ../urpmq:56 #, c-format msgid " --fuzzy - impose fuzzy search (same as -y).\n" msgstr "" #: ../urpmq:59 #, fuzzy, c-format msgid " --list - list available packages.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:60 #, c-format msgid " --list-media - list available media.\n" msgstr "" #: ../urpmq:61 #, c-format msgid " --list-url - list available media and their url.\n" msgstr "" #: ../urpmq:62 #, c-format msgid " --list-nodes - list available nodes when using --parallel.\n" msgstr "" #: ../urpmq:63 #, c-format msgid " --list-aliases - list available parallel aliases.\n" msgstr "" #: ../urpmq:64 #, c-format msgid "" " --dump-config - dump the config in form of urpmi.addmedia argument.\n" msgstr "" #: ../urpmq:65 #, c-format msgid " --src - next package is a source package (same as -s).\n" msgstr "" #: ../urpmq:66 #, c-format msgid "" " --sources - give all source packages before downloading (root only).\n" msgstr "" #: ../urpmq:68 #, fuzzy, c-format msgid " --ignorearch - allow to query rpms for unmatched architectures.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:72 #, c-format msgid "" " --use-distrib - configure urpmi on the fly from a distrib tree.\n" " This permit to querying a distro.\n" msgstr "" #: ../urpmq:84 #, fuzzy, c-format msgid " --changelog - print changelog.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:85 #, c-format msgid " --summary, -S - print summary.\n" msgstr "" #: ../urpmq:87 #, c-format msgid " --whatrequires - reverse search to what requires package.\n" msgstr "" #: ../urpmq:88 #, fuzzy, c-format msgid "" " --whatrequires-recursive\n" " - extended reverse search (includes virtual packages).\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:90 #, fuzzy, c-format msgid "" " --whatprovides, -p\n" " - search in provides to find package.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:93 #, c-format msgid " -c - complete output with package to be removed.\n" msgstr "" #: ../urpmq:94 #, c-format msgid " -d - extend query to package dependencies.\n" msgstr "" #: ../urpmq:96 #, fuzzy, c-format msgid " -g - print groups with name also.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:97 #, c-format msgid " -i - print useful information in human readable form.\n" msgstr "" #: ../urpmq:98 #, fuzzy, c-format msgid " -l - list files in package.\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:99 #, fuzzy, c-format msgid " -m - equivalent to -du\n" msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #: ../urpmq:100 #, c-format msgid " -r - print version and release with name also.\n" msgstr "" #: ../urpmq:101 #, c-format msgid " -s - next package is a source package (same as --src).\n" msgstr "" #: ../urpmq:102 #, c-format msgid "" " -u - remove package if a more recent version is already " "installed.\n" msgstr "" #: ../urpmq:103 #, c-format msgid " -y - impose fuzzy search (same as --fuzzy).\n" msgstr "" #: ../urpmq:104 #, c-format msgid " -Y - like -y, but forces to match case-insensitively.\n" msgstr "" #: ../urpmq:105 #, c-format msgid " names or rpm files given on command line are queried.\n" msgstr "" #: ../urpmq:181 #, c-format msgid "--list-nodes can only be used with --parallel" msgstr "" #: ../urpmq:362 #, c-format msgid "no hdlist for medium \"%s\", only partial result for package %s" msgstr "" #: ../urpmq:363 #, c-format msgid "no hdlist for medium \"%s\", only partial result for packages %s" msgstr "" #: ../urpmq:366 #, c-format msgid "no hdlist for medium \"%s\", unable to return any result for package %s" msgstr "" #: ../urpmq:367 #, c-format msgid "" "no hdlist for medium \"%s\", unable to return any result for packages %s" msgstr "" #: ../urpmq:428 #, fuzzy, c-format msgid "No changelog found\n" msgstr "სურათები ვერ ვიპოვე" #, fuzzy #~ msgid "You need to be root to use --use-distrib" #~ msgstr "თქვენ უჯრის გაზიარების უფლება უნდა გაგაჩნდეთ" #, fuzzy #~ msgid "unable to remove package %s" #~ msgstr "ვერ ვწერ საკონფიგურაციო ფაილს [%s]" #, fuzzy #~ msgid "No filelist found\n" #~ msgstr "სურათები ვერ ვიპოვე" #, fuzzy #~ msgid "" #~ "To satisfy dependencies, the following %d packages are going to be " #~ "installed:\n" #~ "%s\n" #~ msgstr "დამოკიდებულებების შესასრულებლად შემდეგი პაკეტები ჩაიწერება (%d მბ)" #, fuzzy #~ msgid "Installation failed on node %s" #~ msgstr "ინსტალაცია ჩაიშალა" #, fuzzy #~ msgid "Installing packages on nodes..." #~ msgstr "პაკეტის ინსტალაცია: `%s' (%s/%s)..." #, fuzzy #~ msgid "Propagating synthesis to %s..." #~ msgstr "ვამოწმებ synthesis ფაილს [%s]" #, fuzzy #~ msgid "Distributing files to %s..." #~ msgstr "ვაინსტალირებ: %s\n" #, fuzzy #~ msgid "Performing install on %s..." #~ msgstr "ინსტალაციისათვის საჭირო ramdisk იმიჯები" #, fuzzy #~ msgid "Preparing install on %s..." #~ msgstr "ინსტალაციისათვის საჭირო ramdisk იმიჯები" #, fuzzy #~ msgid "" #~ "\n" #~ "unknown options '%s'\n" #~ msgstr "%s: უცნობი პარამეტრი `%s'\n" #~ msgid "unable to find hdlist file for \"%s\", medium ignored" #~ msgstr "ვერ ვპოულობ hdlist ფაილს \"%s\"-სთვის, მედიუმი იგნორირებულ იქნა" #~ msgid "inconsistent list file for \"%s\", medium ignored" #~ msgstr "არასწორი list ფაილის \"%s\"-სთვის, მედიუმი იგნორირებულ იქნა" #~ msgid "unable to inspect list file for \"%s\", medium ignored" #~ msgstr "ვერ ვამოწმებ list ფაილს \"%s\"-სთვის, მედიუმი იგნორირებულ იქნა" #, fuzzy #~ msgid "virtual medium \"%s\" is not local, medium ignored" #~ msgstr "" #~ "მედიუმი \"%s\" ცდილობს გამოიყენოს უკვე გამოყენებული list. შედეგად უარი " #~ "ეთქვა" #, fuzzy #~ msgid "" #~ "virtual medium \"%s\" should have valid source hdlist or synthesis, " #~ "medium ignored" #~ msgstr "" #~ "მედიუმი \"%s\" ცდილობს გამოიყენოს უკვე გამოყენებული hdlist. შედეგად უარი " #~ "ეთქვა" #, fuzzy #~ msgid "copying source hdlist (or synthesis) of \"%s\"..." #~ msgstr "\"%s\"-ის აღწერილობის ფაილის კოპირება..." #, fuzzy #~ msgid "retrieval of source hdlist (or synthesis) failed" #~ msgstr "source hdlist-ის (ან synthesis-ის) კოპირება o" #, fuzzy #~ msgid "unable to write list file of \"%s\"" #~ msgstr "ვერ ვწერ საკონფიგურაციო ფაილს [%s]" #, fuzzy #~ msgid "nothing written in list file for \"%s\"" #~ msgstr "არასწორი list ფაილის \"%s\"-სთვის, მედიუმი იგნორირებულ იქნა" #, fuzzy #~ msgid "The following package names were assumed: %s" #~ msgstr "ერთერთი შემდეგი პაკეტი საჭიროა:" #~ msgid "copying hdlists file..." #~ msgstr "hdlists ფაილის კოპირება..." #~ msgid "invalid hdlist description \"%s\" in hdlists file" #~ msgstr "არასწორი hdlist აღწერილობა \"%s\" hdlists-ის ფაილში" #, fuzzy #~ msgid "Search" #~ msgstr "მოძებნა:" #~ msgid "Is this OK?" #~ msgstr "თანახმა ხართ?" #, fuzzy #~ msgid "" #~ "To satisfy dependencies, the following %d packages are going to be " #~ "installed (%d MB)" #~ msgstr "დამოკიდებულებების შესასრულებლად შემდეგი პაკეტები ჩაიწერება (%d მბ)" #~ msgid "installing %s\n" #~ msgstr "ვაინსტალირებ: %s\n" #~ msgid "" #~ "Automatic installation of packages...\n" #~ "You requested installation of package %s\n" #~ msgstr "" #~ "პაკეტების ავტპმატური ინსტალაცია...\n" #~ "თქვენ მოინდომეთ %s პაკეტის ინსტალირება\n" #~ msgid "%s: command not found\n" #~ msgstr "%s: ბრძანება ვერ ვიპოვე\n" #, fuzzy #~ msgid "md5sum mismatch" #~ msgstr "პაროლები არ ემთხვევა." #, fuzzy #~ msgid " --all - print all tags.\n" #~ msgstr " --help - აჩვენე ეს დამხმარე ტექსტი.\n" #, fuzzy #~ msgid "" #~ "\n" #~ "Continue?" #~ msgstr "გაგრძელება" #, fuzzy #~ msgid "unable to write file [%s]" #~ msgstr "ვერ ვწერ საკონფიგურაციო ფაილს [%s]" #, fuzzy #~ msgid "retrieving mirrors at %s ..." #~ msgstr "ვიძახებ hdlists ფაილს..."