summaryrefslogtreecommitdiffstats
path: root/perl-install/pixmaps/monitor.png
blob: 097c022bd9a515fa1191f5d85c6a230a1279dff3 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 b3 00 00 00 a0 08 06 00 00 00 47 56 5d .PNG........IHDR.............GV]
0020 c6 00 00 00 04 67 41 4d 41 00 00 d6 d8 d4 4f 58 32 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 .....gAMA.....OX2....tEXtSoftwar
0040 65 00 41 64 6f 62 65 20 49 6d 61 67 65 52 65 61 64 79 71 c9 65 3c 00 00 08 db 49 44 41 54 78 da e.Adobe.ImageReadyq.e<....IDATx.
0060 62 b9 77 ef 1e 03 08 28 2a 2a fe 67 18 05 a3 60 08 82 fb f7 ef 33 82 68 80 00 62 1a 4d c8 a3 60 b.w....(**.g...`.....3.h..b.M..`
0080 a8 03 58 fa 05 08 20 c6 ff 40 00 13 3c 77 fc 1c c3 0f 20 e4 00 c2 51 7a 94 1e 0a b4 91 a5 11 43 ..X......@..<w........Qz.......C
00a0 76 5a 36 c3 8f 3f 3f 18 00 02 08 9e 98 c1 09 19 28 c0 c0 02 e4 fc 61 60 e0 60 e1 18 e5 8f f2 87 vZ6..??.........(.....a`.`......
00c0 04 7f ee ec b9 e0 c2 18 20 80 98 60 a5 32 38 a5 03 15 80 00 58 e1 28 7f 94 3f 44 f8 e0 04 0e 04 ...........`.28.....X.(..?D.....
00e0 00 01 c4 84 dc f6 00 a5 74 70 11 0e 4a f1 a3 fc 51 fe 10 e1 83 4a 6a 10 00 08 20 94 c4 3c 9a e3 ........tp..J...Q....Jj......<..
0100 47 f9 43 99 0f 10 40 a3 6d e6 51 fe b0 69 33 03 04 d0 68 9b 79 94 3f 6c da cc 00 01 c4 82 d1 66 G.C...@.m.Q..i3...h.y.?l.......f
0120 46 4a f1 c8 fc b9 f3 e7 8e 0e 68 8e 02 ba 83 b9 f3 e6 32 1c 3b 7c 0c 23 3d 22 f3 61 6d 66 80 00 FJ........h.......2.;|.#=".amf..
0140 62 c1 d5 66 46 a7 41 60 ff 63 ab d1 d0 1d 05 74 05 cf 5f 7d c1 9b 2e e1 34 30 61 03 04 10 bc 99 b..fF.A`.c.....t.._}....40a.....
0160 41 a8 d7 38 0a 46 c1 40 80 ff 40 48 cc a8 06 08 00 04 10 d1 6d e6 51 30 0a 06 24 31 ff 27 be cd A..8.F.@..@H........m.Q0..$1.'..
0180 0c 10 40 24 8d 33 8f 82 51 40 6f f0 f3 d7 1f a2 c7 99 01 02 88 a4 71 e6 51 30 0a e8 0d 7e ff fe ..@$.3..Q@o...........q.Q0...~..
01a0 47 f4 a8 06 40 00 8d b6 99 47 c1 a0 06 8c 8c 0c 44 b7 99 01 02 68 b4 cd 3c 0a 06 3d 20 b6 cd 0c G...@....G......D....h..<..=....
01c0 10 40 a3 6d e6 51 30 e8 01 b1 6d 66 80 00 1a 6d 33 8f 82 21 51 32 13 93 3e 01 02 68 b4 cd 3c 0a .@.m.Q0...mf...m3..!Q2..>..h..<.
01e0 86 44 c9 4c 4c fa 04 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 .D.LL.....6.(.6mf...m3..a.f....6
0200 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 .(.6mf...m3..a.f....6.(.6mf...m3
0220 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 ..a.f....6.(.6mf...m3..a.f....6.
0240 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f (.6mf...m3..a.f....6.(.6mf...m3.
0260 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 .a.f....6.(.6mf...m3..a.f....6.(
0280 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 .6mf...m3..a.f....6.(.6mf...m3..
02a0 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 a.f....6.(.6mf...m3..a.f....6.(.
02c0 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 6mf...m3..a.f....6.(.6mf...m3..a
02e0 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 .f....6.(.6mf...m3..a.f....6.(.6
0300 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 mf...m3..a.f....6.(.6mf...m3..a.
0320 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d f....6.(.6mf...m3..a.f....6.(.6m
0340 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 f...m3..a.f....6.(.6mf...m3..a.f
0360 06 08 a0 d1 36 f3 28 18 36 6d 66 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 36 6d 66 ....6.(.6mf...m3..a.f....6.(.6mf
0380 80 00 1a 6d 33 8f 82 61 d3 66 06 08 a0 d1 36 f3 28 18 d4 00 74 11 3c b1 6d 66 80 00 1a 6d 33 8f ...m3..a.f....6.(...t.<.mf...m3.
03a0 82 41 0d 98 99 99 88 6e 33 03 04 d0 68 9b 79 14 0c 6a c0 ce c6 4c 74 9b 19 20 80 46 db cc a3 60 .A.....n3...h.y..j...Lt....F...`
03c0 70 77 fe d8 58 88 6e 33 03 04 d0 68 9b 79 14 0c 89 d1 0c 62 da cc 00 01 34 da 66 1e 05 43 62 34 pw..X.n3...h.y.....b....4.f..Cb4
03e0 83 98 36 33 40 00 8d b6 99 47 c1 90 28 99 89 49 9f 00 01 34 da 66 1e 05 43 a2 64 26 26 7d 02 04 ..63@....G..(..I...4.f..C.d&&}..
0400 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 .h.y...63@....G..i3...h.y...63@.
0420 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 ...G..i3...h.y...63@....G..i3...
0440 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d h.y...63@....G..i3...h.y...63@..
0460 b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 ..G..i3...h.y...63@....G..i3...h
0480 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 .y...63@....G..i3...h.y...63@...
04a0 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b .G..i3...h.y...63@....G..i3...h.
04c0 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 y...63@....G..i3...h.y...63@....
04e0 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 G..i3...h.y...63@....G..i3...h.y
0500 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 ...63@....G..i3...h.y...63@....G
0520 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 ..i3...h.y...63@....G..i3...h.y.
0540 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 ..63@....G..i3...h.y...63@....G.
0560 b0 69 33 03 04 d0 68 9b 79 14 0c 9b 36 33 40 00 8d b6 99 47 c1 b0 69 33 03 04 d0 68 9b 79 14 0c .i3...h.y...63@....G..i3...h.y..
0580 6a f0 9f 84 36 33 40 00 8d b6 99 47 c1 a0 06 2c 24 dc 9d 0d 10 40 a3 6d e6 51 30 a8 01 2f 37 1b j...63@....G...,$....@.m.Q0../7.
05a0 d1 6d 66 80 00 1a 6d 33 8f 82 41 0d 98 a1 25 33 31 e9 13 20 80 46 db cc a3 60 48 8c 66 10 d3 66 .mf...m3..A...%31....F...`H.f..f
05c0 06 08 a0 d1 36 f3 28 18 12 a3 19 c4 b4 99 01 02 68 b4 cd 3c 0a 86 44 c9 4c 4c fa 04 08 a0 d1 36 ....6.(.........h..<..D.LL.....6
05e0 f3 28 18 12 25 33 31 e9 13 20 80 46 db cc a3 60 d8 b4 99 01 02 68 b4 cd 3c 0a 86 4d 9b 19 20 80 .(..%31....F...`.....h..<..M....
0600 46 db cc a3 60 d8 b4 99 01 02 68 b4 cd 3c 0a 86 4d 9b 19 20 80 46 db cc a3 60 d8 b4 99 01 02 68 F...`.....h..<..M....F...`.....h
0620 b4 cd 3c 0a 86 4d 9b 19 20 80 46 db cc a3 60 d8 b4 99 01 02 68 b4 cd 3c 0a 86 4d 9b 19 20 80 46 ..<..M....F...`.....h..<..M....F
0640 db cc a3 60 d8 b4 99 01 02 68 b4 cd 3c 0a 86 4d 9b 19 20 80 18 ff 03 01 88 71 ec f8 31 88 42 86 ...`.....h..<..M.........q..1.B.
0660 1f a3 f4 28 3d a4 e8 a5 f3 97 82 13 36 40 00 c1 13 f3 b9 e3 e7 20 29 1e 54 64 ff 81 16 e5 a3 fc ...(=.......6@........).Td......
0680 51 fe 10 e0 cf 9d 3d 17 5c 32 03 04 10 d1 6d e6 51 fe 28 7f b0 f2 61 6d 66 80 00 22 a9 cd 3c ca Q.....=.\2....m.Q.(...amf.."..<.
06a0 1f e5 0f 46 3e ac cd 0c 10 40 24 8d 33 8f f2 47 f9 83 99 0f 10 40 a3 6d e6 51 fe b0 69 33 03 04 ...F>....@$.3..G.....@.m.Q..i3..
06c0 d0 68 9b 79 94 3f 6c da cc 00 01 34 da 66 1e e5 0f 9b 36 33 40 00 c1 13 33 a8 a8 1e cd f1 a3 fc .h.y.?l....4.f....63@...3.......
06e0 a1 c6 9f 3a 7b 2a 9c 0f 10 40 8c f7 ee dd 63 68 69 6e f9 3f 3a cf 34 0a 86 32 a8 a9 ad 61 04 08 ...:{*...@....chin.?:.4..2...a..
0700 20 26 18 03 65 0d 06 0b ea 6a a5 51 fe 28 7f 30 f3 61 e9 17 20 80 c0 25 33 39 40 51 51 71 74 14 .&..e....j.Q.(.0.a.....%39@QQqt.
0720 64 94 4f 75 fe dc f9 73 51 12 28 29 00 20 80 58 28 5e 04 02 6d c3 c0 68 23 4b 23 a2 f5 26 a7 25 d.Ou...sQ.()...X(^..m..h#K#..&.%
0740 33 24 27 26 53 55 ff 28 4d 3f ba c4 36 07 1c 0f 53 8e cf 21 2b fe 60 20 3b 2d 9b 21 3a 31 9a e2 3$'&SU.(M?..6...S..!+.`.;-.!:1..
0760 55 9a 00 01 c4 42 8d f6 0a b8 57 c9 82 e8 65 1e 3b 7c 8c a8 1c 09 eb 85 52 55 3f cb 28 9f 5e 7c U....B....W...e.;|......RU?.(.^|
0780 86 df c0 c0 67 25 3f fe 50 cc a3 c2 fa 79 80 00 62 a2 c7 7a d3 51 fe f0 e4 83 12 32 b5 c6 89 b1 ....g%?.P....y..b..z.Q.....2....
07a0 8d 1b 93 0a 00 02 88 e2 c4 8c 2d 47 51 32 6e 48 a9 fe 51 3e fd f8 e0 92 19 47 bc 91 33 4e 0c 37 ..........-GQ2nH..Q>.....G..3N.7
07c0 f7 0f 79 69 11 20 80 a8 de 66 06 81 a5 8b 97 12 5f c5 50 59 ff 28 4d 3f 9a 98 92 99 58 1a b9 ad ..yi.....f......_.PY.(M?....X...
07e0 4c 6e 9b 19 20 80 28 1e cd 00 2d ea 1f ed 85 8f f2 61 7c 2b 5b 2b 86 e4 a4 64 d2 3b 81 a9 d9 60 Ln....(...-......a|+[+...d.;...`
0800 fd 94 8c 66 00 04 10 0b b5 db cc a3 f4 c8 a6 41 85 1b 38 61 92 b3 73 84 c2 36 33 40 00 51 9c 98 ...f...........A..8a..s..63@.Q..
0820 61 2b 96 46 c1 28 a0 1a 20 b3 cd 0c 10 40 14 75 00 41 e3 bc a3 33 51 a3 7c 9a f1 49 04 00 01 44 a+.F.(.......@.u.A...3Q.|..I...D
0840 76 9b 79 28 02 78 3b 9f c4 71 d0 e1 b2 de 97 9c 76 e8 50 02 00 01 c4 c4 30 02 c1 48 5d ef 3b dc v.y(.x;..q......v.P.....0..H].;.
0860 01 40 00 8d c8 c4 3c 52 d7 fb 0e 77 00 10 40 23 b6 64 1e 91 25 f4 30 07 00 01 34 e4 da cc b0 76 .@....<R...w..@#.d..%.0...4....v
0880 ef 28 a0 2f b8 7f ff fe a0 6f 6f 03 04 10 d3 68 34 8d 02 62 47 ad 06 3b 00 08 a0 21 db 35 18 9d .(./.....oo....h4..bG..;...!.5..
08a0 79 64 a0 eb fa e2 a1 00 00 02 68 48 97 cc a3 ab d7 68 cf 47 a6 07 3b 00 08 a0 21 9b 98 47 57 af yd........hH.....h.G..;...!..GW.
08c0 d1 97 3f 14 00 40 00 0d d9 c4 3c 5a 82 8e 8e 53 a3 03 80 00 1a d2 cd 8c d1 12 93 4e 25 f2 10 19 ..?..@....<Z...S...........N%...
08e0 a7 06 08 a0 d1 36 f3 28 7f d8 b4 99 01 02 68 b4 cd 3c ca 1f 36 6d 66 80 00 1a 6d 33 8f f2 87 4d .....6.(......h..<..6mf...m3...M
0900 9b 19 20 80 46 db cc a3 fc 61 d3 66 06 08 a0 21 3b 69 02 5e d6 38 3a b1 41 7b fe 10 6a 33 03 04 ....F....a.f...!;i.^.8:.A{..j3..
0920 d0 90 2c 99 e1 7b cc 70 ec ea 1d e5 d3 88 3f c8 01 40 80 01 00 00 61 27 5d 19 a1 1d 49 00 00 00 ..,..{.p......?..@....a']...I...
0940 00 49 45 4e 44 ae 42 60 82 .IEND.B`.
'>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
package install_steps_interactive; # $Id$


use diagnostics;
use strict;
use vars qw(@ISA $new_bootstrap);

@ISA = qw(install_steps);


#-######################################################################################
#- misc imports
#-######################################################################################
use common;
use partition_table qw(:types);
use partition_table::raw;
use install_steps;
use install_interactive;
use install_any;
use install_messages;
use detect_devices;
use run_program;
use devices;
use fsedit;
use loopback;
use mouse;
use modules;
use modules::interactive;
use lang;
use keyboard;
use any;
use fs;
use log;

#-######################################################################################
#- In/Out Steps Functions
#-######################################################################################
sub errorInStep {
    my ($o, $err) = @_;
    $o->ask_warn(N("Error"), [ N("An error occurred"), formatError($err) ]);
}

sub kill_action {
    my ($o) = @_;
    $o->kill;
}

#-######################################################################################
#- Steps Functions
#-######################################################################################
#------------------------------------------------------------------------------
sub selectLanguage {
    my ($o) = @_;

    $o->{locale}{lang} = any::selectLanguage($o, $o->{locale}{lang}, $o->{locale}{langs} ||= {});
    install_steps::selectLanguage($o);

    if ($o->isa('interactive::gtk')) {
	$o->ask_warn('', formatAlaTeX(
"If you see this message it is because you chose a language for
which DrakX does not include a translation yet; however the fact
that it is listed means there is some support for it anyway.

That is, once GNU/Linux will be installed, you will be able to at
least read and write in that language; and possibly more (various
fonts, spell checkers, various programs translated etc. that
varies from language to language).")) if $o->{locale}{lang} !~ /^en/ && !lang::load_mo();
    } else {
	#- no need to have this in po since it is never translated
	$o->ask_warn('', "The characters of your language can't be displayed in console,
so the messages will be displayed in english during installation") if $ENV{LANGUAGE} eq 'C';
    }
}
    
sub acceptLicense {
    my ($o) = @_;

    my $r = $::testing ? 'Accept' : 'Refuse';

    ($::recovery ?
     $o->ask_yesorno('', N("Do you want to recover your system?"), 0) :
     $o->ask_from_({ title => N("License agreement"), 
		     cancel => N("Quit"),
		     messages => formatAlaTeX(install_messages::main_license() . "\n\n\n" . install_messages::warning_about_patents()),
		     interactive_help_id => 'acceptLicense',
		     callbacks => { ok_disabled => sub { $r eq 'Refuse' } },
		   },
		   [ { list => [ N_("Accept"), N_("Refuse") ], val => \$r, type => 'list', format => sub { translate($_[0]) } } ]))
      or do {
	  install_any::ejectCdrom();
	  $o->exit;
      };
}

#------------------------------------------------------------------------------
sub selectKeyboard {
    my ($o, $clicked) = @_;

    my $from_usb = keyboard::from_usb();
    my $l = keyboard::lang2keyboards(lang::langs($o->{locale}{langs}));

    if ($::expert || $clicked || !($from_usb || @$l && $l->[0][1] >= 90) || listlength(lang::langs($o->{locale}{langs})) > 1) {
	add2hash($o->{keyboard}, $from_usb);
	my @best = uniq($from_usb ? $from_usb->{KEYBOARD} : (), (map { $_->[0] } @$l), 'us_intl');

	my $format = sub { translate(keyboard::KEYBOARD2text($_[0])) };
	my $other;
	my $ext_keyboard = my $KEYBOARD = $o->{keyboard}{KEYBOARD};
	$o->ask_from_(
		      { title => N("Keyboard"), 
			messages => N("Please choose your keyboard layout."),
			interactive_help_id => 'selectKeyboard',
			advanced_messages => N("Here is the full list of keyboards available"),
			advanced_label => N("More"),
			callbacks => { changed => sub { $other = $_[0] == 1 } },
		      },
		      [ if_(@best > 1, { val => \$KEYBOARD, type => 'list', format => $format, sort => 1,
					 list => [ @best ] }),
			{ val => \$ext_keyboard, type => 'list', format => $format,
			  list => [ difference2([ keyboard::KEYBOARDs() ], \@best) ], advanced => @best > 1 }
		      ]);
	$o->{keyboard}{KEYBOARD} = $other ? $ext_keyboard : $KEYBOARD;
	delete $o->{keyboard}{unsafe};
    }
    keyboard::group_toggle_choose($o, $o->{keyboard}) or goto &selectKeyboard;
    install_steps::selectKeyboard($o);
}

#------------------------------------------------------------------------------
sub selectInstallClass {
    my ($o) = @_;

    if (my @l = install_any::find_root_parts($o->{fstab}, $o->{prefix})) {
	log::l("proposing to upgrade partitions " . join(" ", map { $_->{part}{device} } @l));

	my @releases = uniq(map { $_->{release} } @l);
	if (@releases != @l) {
	    #- same release name so adding the device to differentiate them:
	    $_->{release} .= " ($_->{part}{device})" foreach @l;
	}

	my $p;
	$o->ask_from_({ title => N("Install/Upgrade"),
			messages => N("Is this an install or an upgrade?"),
			interactive_help_id => 'selectInstallClass',
		      },
		      [ { val => \$p,
			  list => [ @l, N_("Install") ], 
			  type => 'list',
			  format => sub { ref($_[0]) ? N("Upgrade %s", $_[0]{release}) : translate($_[0]) }
			} ]);
	if (ref $p) {
	    my $part = $p->{part};
	    log::l("choosing to upgrade partition $part->{device}");
	    install_any::use_root_part($o->{all_hds}, $part, $o->{prefix});
	    foreach (grep { $_->{mntpoint} } @{$o->{fstab}}) {
		my ($options, $_unknown) = fs::mount_options_unpack($_);
		$options->{encrypted} or next;
		$o->ask_from_({ focus_first => 1 },
			      [ { label => N("Encryption key for %s", $_->{mntpoint}),
				  hidden => 1, val => \$_->{encrypt_key} } ]);
	    }
	    $o->{isUpgrade} = 1;
	}
    }
}

#------------------------------------------------------------------------------
sub selectMouse {
    my ($o, $force) = @_;

    $force ||= $o->{mouse}{unsafe};

    if ($force) {
	my $prev = $o->{mouse}{type} . '|' . $o->{mouse}{name};

	$o->ask_from_({ messages => N("Please choose your type of mouse."),
			interactive_help_id => 'selectMouse',
		      },
		     [ { list => [ mouse::fullnames() ], separator => '|', val => \$prev, format => sub { join('|', map { translate($_) } split('\|', $_[0])) } } ]);
	$o->{mouse} = mouse::fullname2mouse($prev);
    }

    if ($force && $o->{mouse}{type} eq 'serial') {
	$o->{mouse}{device} = 
	  $o->ask_from_listf_raw({ title => N("Mouse Port"),
				   messages => N("Please choose which serial port your mouse is connected to."),
				   interactive_help_id => 'selectSerialPort',
				 },
			    \&mouse::serial_port2text,
			    [ mouse::serial_ports() ]) or return &selectMouse;
    }
    if (arch() =~ /ppc/ && $o->{mouse}{nbuttons} == 1) {
	#- set a sane default F11/F12
	$o->{mouse}{button2_key} = 87;
	$o->{mouse}{button3_key} = 88;
	$o->ask_from('', N("Buttons emulation"),
		[
		{ label => N("Button 2 Emulation"), val => \$o->{mouse}{button2_key}, list => [ mouse::ppc_one_button_keys() ], format => \&mouse::ppc_one_button_key2text },
		{ label => N("Button 3 Emulation"), val => \$o->{mouse}{button3_key}, list => [ mouse::ppc_one_button_keys() ], format => \&mouse::ppc_one_button_key2text },
		]) or return;
    }
    
    if ($o->{mouse}{device} eq "usbmouse") {
	modules::interactive::load_category($o, 'bus/usb', 1, 1);
	eval { 
	    devices::make("usbmouse");
	    modules::load(qw(hid mousedev usbmouse));
	};
    }

    $o->SUPER::selectMouse;
    1;
}
#------------------------------------------------------------------------------
sub setupSCSI {
    my ($o) = @_;

    if (!$::noauto && arch() =~ /i.86/) {
	if ($o->{pcmcia} ||= !$::testing && c::pcmcia_probe()) {
	    my $w = $o->wait_message(N("PCMCIA"), N("Configuring PCMCIA cards..."));
	    my $results = modules::configure_pcmcia($o->{pcmcia});
	    undef $w;
	    $results and $o->ask_warn('', $results);
	}
    }
    { 
	my $_w = $o->wait_message(N("IDE"), N("Configuring IDE"));
	modules::load(modules::category2modules('disk/cdrom'));
    }
    modules::interactive::load_category($o, 'bus/firewire', 1);

    my $have_non_scsi = detect_devices::hds(); #- at_least_one scsi device if we have no disks
    modules::interactive::load_category($o, 'disk/scsi|hardware_raid|firewire', 1, !$have_non_scsi);
    modules::interactive::load_category($o, 'disk/scsi|hardware_raid|firewire') if !detect_devices::hds(); #- we really want a disk!

    install_interactive::tellAboutProprietaryModules($o);

    install_any::getHds($o, $o);
}

sub ask_mntpoint_s { #- }{}
    my ($o, $fstab) = @_;

    my @fstab = grep { isTrueFS($_) } @$fstab;
    @fstab = grep { isSwap($_) } @$fstab if @fstab == 0;
    @fstab = @$fstab if @fstab == 0;
    die \N("No partition available") if @fstab == 0;

    {
	my $_w = $o->wait_message('', N("Scanning partitions to find mount points"));
	install_any::suggest_mount_points($fstab, $o->{prefix}, 'uniq');
	log::l("default mntpoint $_->{mntpoint} $_->{device}") foreach @fstab;
    }
    if (@fstab == 1) {
	$fstab[0]{mntpoint} = '/';
    } else {
	$o->ask_from_({ messages => N("Choose the mount points"),
			interactive_help_id => 'ask_mntpoint_s',
		      },
		      [ map { { label => partition_table::description($_), 
				  val => \$_->{mntpoint},
				    not_edit => 0,
				      list => [ '', fsedit::suggestions_mntpoint(fsedit::empty_all_hds()) ] }
			  } grep { !$_->{real_mntpoint} || common::usingRamdisk() } @fstab ]) or return;
    }
    $o->SUPER::ask_mntpoint_s($fstab);
}

#------------------------------------------------------------------------------
sub doPartitionDisks {
    my ($o) = @_;

    if (arch() =~ /ppc/ && detect_devices::get_mac_generation() =~ /NewWorld/) { #- need to make bootstrap part if NewWorld machine - thx Pixel ;^)
	if (defined $partition_table::mac::bootstrap_part) {
	    #- don't do anything if we've got the bootstrap setup
	    #- otherwise, go ahead and create one somewhere in the drive free space
	} else {
            undef = $partition_table::mac::freepart; #- please "perl -w"
            my $freepart = $partition_table::mac::freepart;
	    if ($freepart && $freepart->{size} >= 1) {	        
		log::l("creating bootstrap partition on drive /dev/$freepart->{hd}{device}, block $freepart->{start}");
		$partition_table::mac::bootstrap_part = $freepart->{part};	
		log::l("bootstrap now at $partition_table::mac::bootstrap_part");
		fsedit::add($freepart->{hd}, { start => $freepart->{start}, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' });
		$new_bootstrap = 1;    
	    } else {
		$o->ask_warn('', N("No free space for 1MB bootstrap! Install will continue, but to boot your system, you'll need to create the bootstrap partition in DiskDrake"));
	    }
	}
    }

    if (!$o->{isUpgrade}) {
        install_interactive::partitionWizard($o);
    }
}

#------------------------------------------------------------------------------
sub rebootNeeded {
    my ($o) = @_;
    $o->ask_warn('', N("You need to reboot for the partition table modifications to take place"));

    install_steps::rebootNeeded($o);
}

#------------------------------------------------------------------------------
sub choosePartitionsToFormat {
    my ($o, $fstab) = @_;

    $o->SUPER::choosePartitionsToFormat($fstab);

    my @l = grep { !$_->{isMounted} && $_->{mntpoint} && 
		   (!isSwap($_) || $::expert) &&
		   (!isFat_or_NTFS($_) || $_->{notFormatted} || $::expert) &&
		   (!isOtherAvailableFS($_) || $::expert || $_->{toFormat})
	       } @$fstab;
    $_->{toFormat} = 1 foreach grep { isSwap($_) && !$::expert } @$fstab;

    return if @l == 0 || !$::expert && every { $_->{toFormat} } @l;

    #- keep it temporary until the guy has accepted
    $_->{toFormatTmp} = $_->{toFormat} || $_->{toFormatUnsure} foreach @l;

    $o->ask_from_(
        { messages => N("Choose the partitions you want to format"),
	  interactive_help_id => 'formatPartitions',
          advanced_messages => N("Check bad blocks?"),
        },
        [ map { 
	    my $e = $_;
	    ({
	      text => partition_table::description($e), type => 'bool',
	      val => \$e->{toFormatTmp}
	     }, if_(!isLoopback($_) && !isThisFs("reiserfs", $_) && !isThisFs("xfs", $_) && !isThisFs("jfs", $_), {
	      text => partition_table::description($e), type => 'bool', advanced => 1, 
	      disabled => sub { !$e->{toFormatTmp} },
	      val => \$e->{toFormatCheck}
        })) } @l ]
    ) or die 'already displayed';
    #- ok now we can really set toFormat
    foreach (@l) {
	$_->{toFormat} = delete $_->{toFormatTmp};
	$_->{isFormatted} = 0;
    }
}


sub formatMountPartitions {
    my ($o, $_fstab) = @_;
    my $w;
    catch_cdie {
        fs::formatMount_all($o->{all_hds}{raids}, $o->{fstab}, $o->{prefix}, sub {
        	my ($msg) = @_;
        	$w ||= $o->wait_message('', $msg);
        	$w->set($msg);
        });
    } sub { 
	$@ =~ /fsck failed on (\S+)/ or return;
	$o->ask_yesorno('', N("Failed to check filesystem %s. Do you want to repair the errors? (beware, you can lose data)", $1), 1);
    };
    undef $w; #- help perl (otherwise wait_message stays forever in newt)
    die \N("Not enough swap space to fulfill installation, please add some") if availableMemory() < 40 * 1024;
}

#------------------------------------------------------------------------------
sub setPackages {
    my ($o, $rebuild_needed) = @_;

    my $w = $o->wait_message('', $rebuild_needed ? N("Looking for available packages and rebuilding rpm database...") :
			     N("Looking for available packages..."));
    install_any::setPackages($o, $rebuild_needed);

    $w->set(N("Looking at packages already installed..."));
    pkgs::selectPackagesAlreadyInstalled($o->{packages}, $o->{prefix});

    if ($rebuild_needed) {
	$w->set(N("Finding packages to upgrade..."));
	pkgs::selectPackagesToUpgrade($o->{packages}, $o->{prefix});
    }
}
#------------------------------------------------------------------------------
sub choosePackages {
    my ($o, $packages, $compssUsers, $_first_time) = @_;

    #- this is done at the very beginning to take into account
    #- selection of CD by user if using a cdrom.
    $o->chooseCD($packages) if $o->{method} eq 'cdrom' && !$::oem;

    my $w = $o->wait_message('', N("Looking for available packages..."));
    my $availableC = &install_steps::choosePackages;
    my $individual;

    require pkgs;

    my $min_size = pkgs::selectedSize($packages);
    unless ($min_size < $availableC) {
	undef $w;
	$o->ask_warn('', N("Your system does not have enough space left for installation or upgrade (%d > %d)",
			   $min_size, $availableC));
	install_steps::rebootNeeded($o);
    }

    my $min_mark = 4;

    my $b = pkgs::saveSelected($packages);
    my $_level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}} }, $min_mark, 0);
    my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero.
    log::l("max size (level $min_mark) is : " . formatXiB($max_size));
    pkgs::restoreSelected($b);
    undef $w;

  chooseGroups:
    $o->chooseGroups($packages, $compssUsers, $min_mark, \$individual, $max_size) if !$o->{isUpgrade} && !$::corporate && $o->{meta_class} ne 'desktop';

    ($o->{packages_}{ind}) =
      pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $min_mark, $availableC);

    $o->choosePackagesTree($packages) or goto chooseGroups if $individual;

    install_any::warnAboutRemovedPackages($o, $o->{packages});
    install_any::warnAboutNaughtyServers($o) or goto chooseGroups if !$o->{isUpgrade};
}

sub choosePackagesTree {
    my ($o, $packages, $o_limit_to_medium) = @_;

    $o->ask_many_from_list('', N("Choose the packages you want to install"),
			   {
			    list => [ grep { !$o_limit_to_medium || pkgs::packageMedium($packages, $_) == $o_limit_to_medium }
				      @{$packages->{depslist}} ],
			    value => \&URPM::Package::flag_selected,
			    label => \&URPM::Package::name,
			    sort => 1,
			   });
}
sub loadSavePackagesOnFloppy {
    my ($o, $packages) = @_;
    $o->ask_from('', 
N("Please choose load or save package selection on floppy.
The format is the same as auto_install generated floppies."),
		 [ { val => \ (my $choice), list => [ N_("Load from floppy"), N_("Save on floppy") ], format => \&translate, type => 'list' } ]) or return;

    if ($choice eq 'Load from floppy') {
	while (1) {
	    my $w = $o->wait_message(N("Package selection"), N("Loading from floppy"));
	    log::l("load package selection from floppy");
	    my $O = eval { install_any::loadO(undef, 'floppy') };
	    if ($@) {
		undef $w;	#- close wait message.
		$o->ask_okcancel('', N("Insert a floppy containing package selection"))
		  or return;
	    } else {
		install_any::unselectMostPackages($o);
		foreach (@{$O->{default_packages} || []}) {
		    my $pkg = pkgs::packageByName($packages, $_);
		    pkgs::selectPackage($packages, $pkg) if $pkg;
		}
		return 1;
	    }
	}
    } else {
	log::l("save package selection to floppy");
	install_any::g_default_packages($o, 'quiet');
    }
}
sub chooseGroups {
    my ($o, $packages, $compssUsers, $min_level, $individual, $max_size) = @_;

    #- for all groups available, determine package which belongs to each one.
    #- this will enable getting the size of each groups more quickly due to
    #- limitation of current implementation.
    #- use an empty state for each one (no flag update should be propagated).
    
#- OLD VERSION
    my $b = pkgs::saveSelected($packages);
    install_any::unselectMostPackages($o);
    pkgs::setSelectedFromCompssList($packages, {}, $min_level, $max_size);
    my $system_size = pkgs::selectedSize($packages);
    my ($sizes, $pkgs) = pkgs::computeGroupSize($packages, $min_level);
    pkgs::restoreSelected($b);
    log::l("system_size: $system_size");

    my @groups = @{$o->{compssUsersSorted}};
    my %stable_flags = grep_each { $::b } %{$o->{compssUsersChoice}};
    delete $stable_flags{$_} foreach map { @{$compssUsers->{$_}{flags}} } @groups;

    my $compute_size = sub {
	my %pkgs;
	my %flags = %stable_flags; @flags{@_} = ();
	my $total_size;
	A: while (my ($k, $size) = each %$sizes) {
	    Or: foreach (split "\t", $k) {
		  foreach (split "&&") {
		      exists $flags{$_} or next Or;
		  }
		  $total_size += $size;
		  $pkgs{$_} = 1 foreach @{$pkgs->{$k}};
		  next A;
	      }
	  }
	log::l("computed size $total_size");
	log::l("chooseGroups: ", join(" ", sort keys %pkgs));

	int $total_size;
    };
    my %val = map {
	$_ => every { $o->{compssUsersChoice}{$_} } @{$compssUsers->{$_}{flags}}
    } @groups;

#    @groups = grep { $size{$_} = round_down($size{$_} / sqr(1024), 10) } @groups; #- don't display the empty or small one (eg: because all packages are below $min_level)
    my ($size, $unselect_all);
    my $available_size = install_any::getAvailableSpace($o) / sqr(1024);
    my $size_to_display = sub { 
	my $lsize = $system_size + $compute_size->(map { @{$compssUsers->{$_}{flags}} } grep { $val{$_} } @groups);

	#- if a profile is deselected, deselect everything (easier than deselecting the profile packages)
	$unselect_all ||= $size > $lsize;
	$size = $lsize;
	N("Total size: %d / %d MB", pkgs::correctSize($size / sqr(1024)), $available_size);
    };

    while (1) {
	if ($available_size < 140) {
	    # too small to choose anything. Defaulting to no group chosen
	    $val{$_} = 0 foreach %val;
	    last;
	}

	$o->reallyChooseGroups($size_to_display, $individual, \%val) or return;
	last if $::testing || pkgs::correctSize($size / sqr(1024)) < $available_size;
       
	$o->ask_warn('', N("Selected size is larger than available space"));	
    }

    $o->{compssUsersChoice}{$_} = 0 foreach map { @{$compssUsers->{$_}{flags}} } grep { !$val{$_} } keys %val;
    $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}{flags}} } grep {  $val{$_} } keys %val;

    log::l("compssUsersChoice: " . (!$val{$_} && "not ") . "selected [$_] as [$o->{compssUsers}{$_}{label}]") foreach keys %val;

    #- do not try to deselect package (by default no groups are selected).
    $o->{isUpgrade} or $unselect_all and install_any::unselectMostPackages($o);
    #- if no group have been chosen, ask for using base system only, or no X, or normal.
    if (!$o->{isUpgrade} && !any { $_ } values %val) {
	my $docs = !$o->{excludedocs};	
	my $minimal = !any { $_ } values %{$o->{compssUsersChoice}};

	$o->ask_from(N("Type of install"), 
		     N("You haven't selected any group of packages.
Please choose the minimal installation you want:"),
		     [
		      { val => \$o->{compssUsersChoice}{X}, type => 'bool', text => N("With X"), disabled => sub { $minimal } },
		      { val => \$docs, type => 'bool', text => N("With basic documentation (recommended!)"), disabled => sub { $minimal } },
		      { val => \$minimal, type => 'bool', text => N("Truly minimal install (especially no urpmi)") },
		     ],
		     changed => sub { $o->{compssUsersChoice}{X} = $docs = 0 if $minimal },
	) or return &chooseGroups;

	$o->{excludedocs} = !$docs || $minimal;

	#- reselect according to user selection.
	if ($minimal) {
	    $o->{compssUsersChoice}{$_} = 0 foreach keys %{$o->{compssUsersChoice}};
	} else {
	    my $X = $o->{compssUsersChoice}{X}; #- don't let setDefaultPackages modify this one
	    install_any::setDefaultPackages($o, 'clean');
	    $o->{compssUsersChoice}{X} = $X;
	}
	install_any::unselectMostPackages($o);
    }
    1;
}

sub reallyChooseGroups {
    my ($o, $size_to_display, $individual, $val) = @_;

    my $size_text = &$size_to_display;

    my ($path, $all);
    $o->ask_from_({ messages => N("Package Group Selection"),
		    interactive_help_id => 'choosePackages',
		    callbacks => { changed => sub { $size_text = &$size_to_display } },
		  }, [
        { val => \$size_text, type => 'label' }, {},
	 (map { 
	       my $old = $path;
	       $path = $o->{compssUsers}{$_}{path};
	       if_($old ne $path, { val => translate($path) }),
		 {
		  val => \$val->{$_},
		  type => 'bool',
		  disabled => sub { $all },
		  text => translate($o->{compssUsers}{$_}{label}),
		  help => translate($o->{compssUsers}{$_}{descr}),
		 }
	   } @{$o->{compssUsersSorted}}),
	 if_($o->{meta_class} eq 'desktop', { text => N("All"), val => \$all, type => 'bool' }),
	 if_($individual, { text => N("Individual package selection"), val => $individual, advanced => 1, type => 'bool' }),
    ]);

    if ($all) {
	$val->{$_} = 1 foreach keys %$val;
    }
    1;    
}

sub chooseCD {
    my ($o, $packages) = @_;
    my @mediums = grep { $_ != $install_any::boot_medium } pkgs::allMediums($packages);
    my @mediumsDescr;
    my %mediumsDescr;

    if (!common::usingRamdisk()) {
	#- mono-cd in case of no ramdisk
	foreach (@mediums) {
	    pkgs::mediumDescr($packages, $install_any::boot_medium) eq pkgs::mediumDescr($packages, $_) and next;
	    undef $packages->{mediums}{$_}{selected};
	}
	log::l("low memory install, using single CD installation (as it is not ejectable)");
	return;
    }

    #- the boot medium is already selected.
    $mediumsDescr{pkgs::mediumDescr($packages, $install_any::boot_medium)} = 1;

    #- build mediumDescr according to mediums, this avoid asking multiple times
    #- all the medium grouped together on only one CD.
    foreach (@mediums) {
	my $descr = pkgs::mediumDescr($packages, $_);
	$packages->{mediums}{$_}{ignored} and next;
	exists $mediumsDescr{$descr} or push @mediumsDescr, $descr;
	$mediumsDescr{$descr} ||= $packages->{mediums}{$_}{selected};
    }

    #- if no other medium available or a poor beginner, we are choosing for him!
    #- note first CD is always selected and should not be unselected!
    return if @mediumsDescr == () || !$::expert;

#    $o->set_help('chooseCD');
    $o->ask_many_from_list('',
N("If you have all the CDs in the list below, click Ok.
If you have none of those CDs, click Cancel.
If only some CDs are missing, unselect them, then click Ok."),
			   {
			    list => \@mediumsDescr,
			    label => sub { N("Cd-Rom labeled \"%s\"", $_[0]) },
			    val => sub { \$mediumsDescr{$_[0]} },
			   }) or do {
			       $mediumsDescr{$_} = 0 foreach @mediumsDescr; #- force unselection of other CDs.
			   };

    #- restore true selection of medium (which may have been grouped together)
    foreach (@mediums) {
	my $descr = pkgs::mediumDescr($packages, $_);
	$packages->{mediums}{$_}{ignored} and next;
	$packages->{mediums}{$_}{selected} = $mediumsDescr{$descr};
	log::l("select status of medium $_ is $packages->{mediums}{$_}{selected}");
    }
}

#------------------------------------------------------------------------------
sub installPackages {
    my ($o, $packages) = @_;
    my ($current, $total) = (0, 0);

    my $w = $o->wait_message(N("Installing"), N("Preparing installation"));

    my $old = \&pkgs::installCallback;
    local *pkgs::installCallback = sub {
	my ($data, $type, $id, $subtype, $_amount, $total_) = @_;
	if ($type eq 'user' && $subtype eq 'install') {
	    $total = $total_;
	} elsif ($type eq 'inst' && $subtype eq 'start') {
	    my $p = $data->{depslist}[$id];
	    $w->set(N("Installing package %s\n%d%%", $p->name, $total && 100 * $current / $total));
	    $current += $p->size;
	} else { goto $old }
    };

    #- the modification is not local as the box should be living for other package installation.
    #- BEWARE this is somewhat duplicated (but not exactly from gtk code).
    undef *install_any::changeMedium;
    *install_any::changeMedium = sub {
	my ($method, $medium) = @_;

	#- if not using a cdrom medium, always abort.
	$method eq 'cdrom' && !$::oem and do {
	    my $name = pkgs::mediumDescr($o->{packages}, $medium);
	    local $| = 1; print "\a";
	    my $r = $name !~ /commercial/i || ($o->{useless_thing_accepted2} ||= $o->ask_from_list_('', formatAlaTeX(install_messages::com_license()), [ N_("Accept"), N_("Refuse") ], "Accept") eq "Accept");
            $r &&= $o->ask_okcancel('', N("Change your Cd-Rom!

Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.
If you don't have it, press Cancel to avoid installation from this Cd-Rom.", $name), 1);
            return $r;
	};
    };
    my $install_result;
    catch_cdie { $install_result = $o->install_steps::installPackages($packages) }
      sub {
	  if ($@ =~ /^error ordering package list: (.*)/) {
	      $o->ask_yesorno('', [
N("There was an error ordering packages:"), $1, N("Go on anyway?") ], 1) and return 1;
	      ${$_[0]} = "already displayed";
	  } elsif ($@ =~ /^error installing package list: (.*)/) {
	      $o->ask_yesorno('', [
N("There was an error installing packages:"), $1, N("Go on anyway?") ], 1) and return 1;
	      ${$_[0]} = "already displayed";
	  }
	  0;
      };
    if ($pkgs::cancel_install) {
	$pkgs::cancel_install = 0;
	die "setstep choosePackages\n";
    }
    $install_result;
}

sub afterInstallPackages($) {
    my ($o) = @_;
    my $_w = $o->wait_message('', N("Post-install configuration"));
    $o->SUPER::afterInstallPackages;
}

sub copyKernelFromFloppy {
    my ($o) = @_;
    $o->ask_okcancel('', N("Please insert the Boot floppy used in drive %s", $o->{blank}), 1) or return;
    $o->SUPER::copyKernelFromFloppy;
}

sub updateModulesFromFloppy {
    my ($o) = @_;
    $o->ask_okcancel('', N("Please insert the Update Modules floppy in drive %s", $o->{updatemodules}), 1) or return;
    $o->SUPER::updateModulesFromFloppy;
}

#------------------------------------------------------------------------------
sub configureNetwork {
    my ($o) = @_;
    require network::network;
    network::network::easy_dhcp($o->{netc}, $o->{intf}) and $o->{netcnx}{type} = 'lan';
    $o->SUPER::configureNetwork;
}

#------------------------------------------------------------------------------
sub installUpdates {
    my ($o) = @_;
    my $u = $o->{updates} ||= {};
    
    $o->hasNetwork or return;

    if (is_empty_hash_ref($u)) {
	$o->ask_yesorno_({ messages => formatAlaTeX(
N("You now have the opportunity to download updated packages. These packages
have been updated after the distribution was released. They may
contain security or bug fixes.

To download these packages, you will need to have a working Internet 
connection.

Do you want to install the updates ?")),
			   interactive_help_id => 'installUpdates',
					       }) or return;
    }

    #- bring all interface up for installing crypto packages.
    install_interactive::upNetwork($o);

    #- update medium available and working.
    my $update_medium;
    do {
	require crypto;
	eval {
	    my @mirrors = do {
		my $_w = $o->wait_message('', N("Contacting Mandrake Linux web site to get the list of available mirrors..."));
		crypto::mirrors() };
	    #- if no mirror have been found, use current time zone and propose among available.
	    $u->{mirror} ||= crypto::bestMirror($o->{timezone}{timezone});
	    $o->ask_from_({ messages => N("Choose a mirror from which to get the packages"),
			    cancel => N("Cancel"),
			  }, [ { separator => '|',
				 format => \&crypto::mirror2text,
				 list => \@mirrors,
				 val => \$u->{mirror},
			       },
			     ],
			 ) or $u->{mirror} = '';
	};
	return if $@ || !$u->{mirror};

	eval {
	    if ($u->{mirror}) {
		my $_w = $o->wait_message('', N("Contacting the mirror to get the list of available packages..."));
		$update_medium = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror});
	    }
	};