]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
Improve selection of distribution for which to build.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Feb 2012 14:49:54 +0000 (15:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Feb 2012 20:12:12 +0000 (21:12 +0100)
po/pakfire.pot
python/pakfire/base.py
python/pakfire/builder.py
python/pakfire/cli.py
python/pakfire/config.py
python/pakfire/constants.py
python/pakfire/distro.py
python/pakfire/repository/base.py
python/pakfire/repository/remote.py

index 99c89f55ced329b4b6db3838355f645ed4d66f8e..c0c3fbbb4806ad1b9e5c5d4dbd200d147a45533e 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-26 12:39+0100\n"
+"POT-Creation-Date: 2012-02-28 17:29+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -78,135 +78,147 @@ msgstr ""
 msgid "Ignored arguments:"
 msgstr ""
 
-#: ../python/pakfire/base.py:213 ../python/pakfire/base.py:243
-#: ../python/pakfire/base.py:289 ../python/pakfire/base.py:340
-#: ../python/pakfire/base.py:406 ../python/pakfire/base.py:443
-#: ../python/pakfire/base.py:496 ../python/pakfire/base.py:516
+#: ../python/pakfire/base.py:215 ../python/pakfire/base.py:245
+#: ../python/pakfire/base.py:291 ../python/pakfire/base.py:342
+#: ../python/pakfire/base.py:408 ../python/pakfire/base.py:445
+#: ../python/pakfire/base.py:498 ../python/pakfire/base.py:518
 msgid "Nothing to do"
 msgstr ""
 
-#: ../python/pakfire/base.py:275
+#: ../python/pakfire/base.py:277
 msgid "There are no packages to install."
 msgstr ""
 
-#: ../python/pakfire/base.py:330
+#: ../python/pakfire/base.py:332
 #, python-format
 msgid "Could not find any installed package providing \"%s\"."
 msgstr ""
 
-#: ../python/pakfire/base.py:336
+#: ../python/pakfire/base.py:338
 #, python-format
 msgid "Multiple reinstall candidates for \"%(pattern)s\": %(pkgs)s"
 msgstr ""
 
-#: ../python/pakfire/base.py:365
+#: ../python/pakfire/base.py:367
 #, python-format
 msgid "Could not find package %s in a remote repository."
 msgstr ""
 
-#: ../python/pakfire/base.py:434
+#: ../python/pakfire/base.py:436
 #, python-format
 msgid "Excluding %s."
 msgstr ""
 
-#: ../python/pakfire/base.py:484
+#: ../python/pakfire/base.py:486
 #, python-format
 msgid "\"%s\" package does not seem to be installed."
 msgstr ""
 
-#: ../python/pakfire/base.py:628
+#: ../python/pakfire/base.py:630
 msgid "Build command has failed."
 msgstr ""
 
-#: ../python/pakfire/base.py:705
+#: ../python/pakfire/base.py:707
 msgid "Everything is fine."
 msgstr ""
 
-#: ../python/pakfire/builder.py:135
+#: ../python/pakfire/builder.py:132
+msgid "You have not set the distribution for which you want to build."
+msgstr ""
+
+#: ../python/pakfire/builder.py:133
+msgid "Please do so in builder.conf or on the CLI."
+msgstr ""
+
+#: ../python/pakfire/builder.py:134
+msgid "Distribution configuration is missing."
+msgstr ""
+
+#: ../python/pakfire/builder.py:148
 #, python-format
 msgid "Cannot build for %s on this host."
 msgstr ""
 
 #. Log the package information.
-#: ../python/pakfire/builder.py:165
+#: ../python/pakfire/builder.py:178
 msgid "Package information:"
 msgstr ""
 
 #. Install all packages.
-#: ../python/pakfire/builder.py:336
+#: ../python/pakfire/builder.py:349
 msgid "Install packages needed for build..."
 msgstr ""
 
-#: ../python/pakfire/builder.py:341
+#: ../python/pakfire/builder.py:354
 msgid "Extracting"
 msgstr ""
 
-#: ../python/pakfire/builder.py:610
+#: ../python/pakfire/builder.py:653
 msgid "You cannot run a build when no package was given."
 msgstr ""
 
-#: ../python/pakfire/builder.py:615
+#: ../python/pakfire/builder.py:658
 #, python-format
 msgid "Could not find makefile in build root: %s"
 msgstr ""
 
-#: ../python/pakfire/builder.py:640
+#: ../python/pakfire/builder.py:679
 msgid "The build command failed. See logfile for details."
 msgstr ""
 
 #. Walk through the whole tree and collect all files
 #. that are on the same disk (not crossing mountpoints).
-#: ../python/pakfire/builder.py:695
+#: ../python/pakfire/builder.py:734
 msgid "Creating filelist..."
 msgstr ""
 
 #. Create a nice progressbar.
-#: ../python/pakfire/builder.py:714
+#: ../python/pakfire/builder.py:753
 msgid "Compressing files..."
 msgstr ""
 
-#: ../python/pakfire/builder.py:733
+#: ../python/pakfire/builder.py:772
 #, python-format
 msgid "Cache file was successfully created at %s."
 msgstr ""
 
-#: ../python/pakfire/builder.py:734
+#: ../python/pakfire/builder.py:773
 #, python-format
 msgid "  Containing %(files)s files, it has a size of %(size)s."
 msgstr ""
 
 #. Make a nice progress bar as always.
-#: ../python/pakfire/builder.py:745
+#: ../python/pakfire/builder.py:784
 msgid "Extracting files..."
 msgstr ""
 
 #. Update all packages.
-#: ../python/pakfire/builder.py:765
+#: ../python/pakfire/builder.py:804
 msgid "Updating packages from cache..."
 msgstr ""
 
 #. Package the result.
 #. Make all these little package from the build environment.
-#: ../python/pakfire/builder.py:893
+#: ../python/pakfire/builder.py:932
 msgid "Creating packages:"
 msgstr ""
 
 #. Execute the buildscript of this stage.
-#: ../python/pakfire/builder.py:913
+#: ../python/pakfire/builder.py:952
 #, python-format
 msgid "Running stage %s:"
 msgstr ""
 
-#: ../python/pakfire/builder.py:931
+#: ../python/pakfire/builder.py:970
 #, python-format
 msgid "Could not remove static libraries: %s"
 msgstr ""
 
-#: ../python/pakfire/builder.py:937
+#: ../python/pakfire/builder.py:976
 msgid "Compressing man pages did not complete successfully."
 msgstr ""
 
-#: ../python/pakfire/builder.py:957
+#: ../python/pakfire/builder.py:996
 msgid "Extracting debuginfo did not complete with success. Aborting build."
 msgstr ""
 
@@ -218,487 +230,487 @@ msgstr ""
 msgid "The path where pakfire should operate in."
 msgstr ""
 
-#: ../python/pakfire/cli.py:123
+#: ../python/pakfire/cli.py:128
 msgid "Enable verbose output."
 msgstr ""
 
-#: ../python/pakfire/cli.py:126
+#: ../python/pakfire/cli.py:131
 msgid "Path to a configuration file to load."
 msgstr ""
 
-#: ../python/pakfire/cli.py:130
+#: ../python/pakfire/cli.py:135
 msgid "Disable a repository temporarily."
 msgstr ""
 
-#: ../python/pakfire/cli.py:133
+#: ../python/pakfire/cli.py:138
 msgid "Enable a repository temporarily."
 msgstr ""
 
-#: ../python/pakfire/cli.py:137
+#: ../python/pakfire/cli.py:142
 msgid "Run pakfire in offline mode."
 msgstr ""
 
-#: ../python/pakfire/cli.py:142
+#: ../python/pakfire/cli.py:147
 msgid "Install one or more packages to the system."
 msgstr ""
 
-#: ../python/pakfire/cli.py:144
+#: ../python/pakfire/cli.py:149
 msgid "Give name of at least one package to install."
 msgstr ""
 
-#: ../python/pakfire/cli.py:150
+#: ../python/pakfire/cli.py:155
 msgid "Install one or more packages from the filesystem."
 msgstr ""
 
-#: ../python/pakfire/cli.py:152
+#: ../python/pakfire/cli.py:157
 msgid "Give filename of at least one package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:158
+#: ../python/pakfire/cli.py:163
 msgid "Reinstall one or more packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:160
+#: ../python/pakfire/cli.py:165
 msgid "Give name of at least one package to reinstall."
 msgstr ""
 
-#: ../python/pakfire/cli.py:166
+#: ../python/pakfire/cli.py:171
 msgid "Remove one or more packages from the system."
 msgstr ""
 
-#: ../python/pakfire/cli.py:168
+#: ../python/pakfire/cli.py:173
 msgid "Give name of at least one package to remove."
 msgstr ""
 
-#: ../python/pakfire/cli.py:174
+#: ../python/pakfire/cli.py:179
 msgid "Give a name of a package to update or leave emtpy for all."
 msgstr ""
 
-#: ../python/pakfire/cli.py:176
+#: ../python/pakfire/cli.py:181
 msgid "Exclude package from update."
 msgstr ""
 
-#: ../python/pakfire/cli.py:178 ../python/pakfire/cli.py:203
+#: ../python/pakfire/cli.py:183 ../python/pakfire/cli.py:208
 msgid "Allow changing the vendor of packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:180 ../python/pakfire/cli.py:205
+#: ../python/pakfire/cli.py:185 ../python/pakfire/cli.py:210
 msgid "Allow changing the architecture of packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:185
+#: ../python/pakfire/cli.py:190
 msgid "Update the whole system or one specific package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:192
+#: ../python/pakfire/cli.py:197
 msgid "Check, if there are any updates available."
 msgstr ""
 
-#: ../python/pakfire/cli.py:199
+#: ../python/pakfire/cli.py:204
 msgid "Downgrade one or more packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:201
+#: ../python/pakfire/cli.py:206
 msgid "Give a name of a package to downgrade."
 msgstr ""
 
-#: ../python/pakfire/cli.py:211
+#: ../python/pakfire/cli.py:216
 msgid "Print some information about the given package(s)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:213
+#: ../python/pakfire/cli.py:218
 msgid "Give at least the name of one package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:219
+#: ../python/pakfire/cli.py:224
 msgid "Search for a given pattern."
 msgstr ""
 
-#: ../python/pakfire/cli.py:221
+#: ../python/pakfire/cli.py:226
 msgid "A pattern to search for."
 msgstr ""
 
-#: ../python/pakfire/cli.py:227
+#: ../python/pakfire/cli.py:232
 msgid "Get a list of packages that provide a given file or feature."
 msgstr ""
 
-#: ../python/pakfire/cli.py:229
+#: ../python/pakfire/cli.py:234
 msgid "File or feature to search for."
 msgstr ""
 
-#: ../python/pakfire/cli.py:235
+#: ../python/pakfire/cli.py:240
 msgid "Get list of packages that belong to the given group."
 msgstr ""
 
-#: ../python/pakfire/cli.py:237
+#: ../python/pakfire/cli.py:242
 msgid "Group name to search for."
 msgstr ""
 
-#: ../python/pakfire/cli.py:243
+#: ../python/pakfire/cli.py:248
 msgid "Install all packages that belong to the given group."
 msgstr ""
 
-#: ../python/pakfire/cli.py:245
+#: ../python/pakfire/cli.py:250
 msgid "Group name."
 msgstr ""
 
-#: ../python/pakfire/cli.py:251
+#: ../python/pakfire/cli.py:256
 msgid "List all currently enabled repositories."
 msgstr ""
 
-#: ../python/pakfire/cli.py:255
+#: ../python/pakfire/cli.py:260
 msgid "Cleanup commands."
 msgstr ""
 
-#: ../python/pakfire/cli.py:263
+#: ../python/pakfire/cli.py:268
 msgid "Cleanup all temporary files."
 msgstr ""
 
-#: ../python/pakfire/cli.py:269
+#: ../python/pakfire/cli.py:274
 msgid "Check the system for any errors."
 msgstr ""
 
-#: ../python/pakfire/cli.py:275
+#: ../python/pakfire/cli.py:280
 msgid "Check the dependencies for a particular package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:277
+#: ../python/pakfire/cli.py:282
 msgid "Give name of at least one package to check."
 msgstr ""
 
-#: ../python/pakfire/cli.py:353 ../python/pakfire/transaction.py:352
+#: ../python/pakfire/cli.py:358 ../python/pakfire/transaction.py:352
 msgid "Repository"
 msgstr ""
 
-#: ../python/pakfire/cli.py:353
+#: ../python/pakfire/cli.py:358
 msgid "Enabled"
 msgstr ""
 
-#: ../python/pakfire/cli.py:353 ../python/pakfire/cli.py:1014
+#: ../python/pakfire/cli.py:358 ../python/pakfire/cli.py:1022
 msgid "Priority"
 msgstr ""
 
-#: ../python/pakfire/cli.py:353 ../python/pakfire/cli.py:1059
+#: ../python/pakfire/cli.py:358 ../python/pakfire/cli.py:1067
 msgid "Packages"
 msgstr ""
 
-#: ../python/pakfire/cli.py:365
+#: ../python/pakfire/cli.py:370
 msgid "Cleaning up everything..."
 msgstr ""
 
-#: ../python/pakfire/cli.py:381
+#: ../python/pakfire/cli.py:386
 msgid "You cannot run pakfire-builder in a pakfire chroot."
 msgstr ""
 
-#: ../python/pakfire/cli.py:384 ../python/pakfire/cli.py:720
+#: ../python/pakfire/cli.py:389 ../python/pakfire/cli.py:725
 msgid "Pakfire builder command line interface."
 msgstr ""
 
-#: ../python/pakfire/cli.py:442
+#: ../python/pakfire/cli.py:447
 msgid "Update the package indexes."
 msgstr ""
 
-#: ../python/pakfire/cli.py:448 ../python/pakfire/cli.py:740
+#: ../python/pakfire/cli.py:453 ../python/pakfire/cli.py:745
 msgid "Build one or more packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:450 ../python/pakfire/cli.py:634
-#: ../python/pakfire/cli.py:742
+#: ../python/pakfire/cli.py:455 ../python/pakfire/cli.py:639
+#: ../python/pakfire/cli.py:747
 msgid "Give name of at least one package to build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:454 ../python/pakfire/cli.py:746
-#: ../python/pakfire/cli.py:817
+#: ../python/pakfire/cli.py:459 ../python/pakfire/cli.py:751
+#: ../python/pakfire/cli.py:825
 msgid "Build the package for the given architecture."
 msgstr ""
 
-#: ../python/pakfire/cli.py:456 ../python/pakfire/cli.py:484
-#: ../python/pakfire/cli.py:748
+#: ../python/pakfire/cli.py:461 ../python/pakfire/cli.py:489
+#: ../python/pakfire/cli.py:753
 msgid "Path were the output files should be copied to."
 msgstr ""
 
-#: ../python/pakfire/cli.py:458 ../python/pakfire/cli.py:473
-#: ../python/pakfire/cli.py:750
+#: ../python/pakfire/cli.py:463 ../python/pakfire/cli.py:478
+#: ../python/pakfire/cli.py:755
 msgid "Mode to run in. Is either 'release' or 'development' (default)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:460
+#: ../python/pakfire/cli.py:465
 msgid "Run a shell after a successful build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:465
+#: ../python/pakfire/cli.py:470
 msgid "Go into a shell."
 msgstr ""
 
-#: ../python/pakfire/cli.py:467
+#: ../python/pakfire/cli.py:472
 msgid "Give name of a package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:471
+#: ../python/pakfire/cli.py:476
 msgid "Emulated architecture in the shell."
 msgstr ""
 
-#: ../python/pakfire/cli.py:478
+#: ../python/pakfire/cli.py:483
 msgid "Generate a source package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:480
+#: ../python/pakfire/cli.py:485
 msgid "Give name(s) of a package(s)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:489
+#: ../python/pakfire/cli.py:494
 msgid "Create a build environment cache."
 msgstr ""
 
-#: ../python/pakfire/cli.py:499
+#: ../python/pakfire/cli.py:504
 msgid "Create a new build environment cache."
 msgstr ""
 
-#: ../python/pakfire/cli.py:504
+#: ../python/pakfire/cli.py:509
 msgid "Remove all cached build environments."
 msgstr ""
 
-#: ../python/pakfire/cli.py:581
+#: ../python/pakfire/cli.py:586
 #, python-format
 msgid "Removing environment cache file: %s..."
 msgstr ""
 
-#: ../python/pakfire/cli.py:587
+#: ../python/pakfire/cli.py:592
 #, python-format
 msgid "Could not remove file: %s"
 msgstr ""
 
-#: ../python/pakfire/cli.py:593
+#: ../python/pakfire/cli.py:598
 msgid "Pakfire server command line interface."
 msgstr ""
 
-#: ../python/pakfire/cli.py:632
+#: ../python/pakfire/cli.py:637
 msgid "Send a scrach build job to the server."
 msgstr ""
 
-#: ../python/pakfire/cli.py:636
+#: ../python/pakfire/cli.py:641
 msgid "Limit build to only these architecture(s)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:642
+#: ../python/pakfire/cli.py:647
 msgid "Send a keepalive to the server."
 msgstr ""
 
-#: ../python/pakfire/cli.py:649
+#: ../python/pakfire/cli.py:654
 msgid "Update all repositories."
 msgstr ""
 
-#: ../python/pakfire/cli.py:655
+#: ../python/pakfire/cli.py:660
 msgid "Repository management commands."
 msgstr ""
 
-#: ../python/pakfire/cli.py:663
+#: ../python/pakfire/cli.py:668
 msgid "Create a new repository index."
 msgstr ""
 
-#: ../python/pakfire/cli.py:664
+#: ../python/pakfire/cli.py:669
 msgid "Path to the packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:665
+#: ../python/pakfire/cli.py:670
 msgid "Path to input packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:670
+#: ../python/pakfire/cli.py:675
 msgid "Dump some information about this machine."
 msgstr ""
 
-#: ../python/pakfire/cli.py:752
+#: ../python/pakfire/cli.py:757
 msgid "Do not verify build dependencies."
 msgstr ""
 
-#: ../python/pakfire/cli.py:771
+#: ../python/pakfire/cli.py:779
 msgid "Pakfire client command line interface."
 msgstr ""
 
-#: ../python/pakfire/cli.py:811
+#: ../python/pakfire/cli.py:819
 msgid "Build a package remotely."
 msgstr ""
 
-#: ../python/pakfire/cli.py:813
+#: ../python/pakfire/cli.py:821
 msgid "Give name of a package to build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:822
+#: ../python/pakfire/cli.py:830
 msgid "Print some information about this host."
 msgstr ""
 
-#: ../python/pakfire/cli.py:828
+#: ../python/pakfire/cli.py:836
 msgid "Check the connection to the hub."
 msgstr ""
 
-#: ../python/pakfire/cli.py:833
+#: ../python/pakfire/cli.py:841
 msgid "Show information about build jobs."
 msgstr ""
 
-#: ../python/pakfire/cli.py:843
+#: ../python/pakfire/cli.py:851
 msgid "Show a list of all active jobs."
 msgstr ""
 
-#: ../python/pakfire/cli.py:848
+#: ../python/pakfire/cli.py:856
 msgid "Show a list of all recently finished of failed build jobs."
 msgstr ""
 
-#: ../python/pakfire/cli.py:853
+#: ../python/pakfire/cli.py:861
 msgid "Show details about given build job."
 msgstr ""
 
-#: ../python/pakfire/cli.py:854
+#: ../python/pakfire/cli.py:862
 msgid "The ID of the build job."
 msgstr ""
 
-#: ../python/pakfire/cli.py:859
+#: ../python/pakfire/cli.py:867
 msgid "Show information about builds."
 msgstr ""
 
-#: ../python/pakfire/cli.py:867
+#: ../python/pakfire/cli.py:875
 msgid "Show details about the given build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:868
+#: ../python/pakfire/cli.py:876
 msgid "The ID of the build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:916 ../python/pakfire/server.py:303
+#: ../python/pakfire/cli.py:924 ../python/pakfire/server.py:303
 msgid "Hostname"
 msgstr ""
 
-#: ../python/pakfire/cli.py:917
+#: ../python/pakfire/cli.py:925
 msgid "Pakfire hub"
 msgstr ""
 
-#: ../python/pakfire/cli.py:920
+#: ../python/pakfire/cli.py:928
 msgid "Username"
 msgstr ""
 
 #. Hardware information
-#: ../python/pakfire/cli.py:924 ../python/pakfire/server.py:307
+#: ../python/pakfire/cli.py:932 ../python/pakfire/server.py:307
 msgid "Hardware information"
 msgstr ""
 
-#: ../python/pakfire/cli.py:925 ../python/pakfire/server.py:308
+#: ../python/pakfire/cli.py:933 ../python/pakfire/server.py:308
 msgid "CPU model"
 msgstr ""
 
-#: ../python/pakfire/cli.py:926 ../python/pakfire/server.py:309
+#: ../python/pakfire/cli.py:934 ../python/pakfire/server.py:309
 msgid "Memory"
 msgstr ""
 
-#: ../python/pakfire/cli.py:928 ../python/pakfire/server.py:311
+#: ../python/pakfire/cli.py:936 ../python/pakfire/server.py:311
 msgid "Native arch"
 msgstr ""
 
-#: ../python/pakfire/cli.py:930
+#: ../python/pakfire/cli.py:938
 msgid "Default arch"
 msgstr ""
 
-#: ../python/pakfire/cli.py:932 ../python/pakfire/server.py:313
+#: ../python/pakfire/cli.py:940 ../python/pakfire/server.py:313
 msgid "Supported arches"
 msgstr ""
 
-#: ../python/pakfire/cli.py:945
+#: ../python/pakfire/cli.py:953
 msgid "Your IP address"
 msgstr ""
 
-#: ../python/pakfire/cli.py:950
+#: ../python/pakfire/cli.py:958
 msgid "You are authenticated to the build service:"
 msgstr ""
 
-#: ../python/pakfire/cli.py:956
+#: ../python/pakfire/cli.py:964
 msgid "User name"
 msgstr ""
 
-#: ../python/pakfire/cli.py:957
+#: ../python/pakfire/cli.py:965
 msgid "Real name"
 msgstr ""
 
-#: ../python/pakfire/cli.py:958
+#: ../python/pakfire/cli.py:966
 msgid "Email address"
 msgstr ""
 
-#: ../python/pakfire/cli.py:959
+#: ../python/pakfire/cli.py:967
 msgid "Registered"
 msgstr ""
 
-#: ../python/pakfire/cli.py:966
+#: ../python/pakfire/cli.py:974
 msgid "You could not be authenticated to the build service."
 msgstr ""
 
-#: ../python/pakfire/cli.py:987
+#: ../python/pakfire/cli.py:995
 msgid "No ongoing jobs found."
 msgstr ""
 
-#: ../python/pakfire/cli.py:990
+#: ../python/pakfire/cli.py:998
 msgid "Active build jobs"
 msgstr ""
 
-#: ../python/pakfire/cli.py:996
+#: ../python/pakfire/cli.py:1004
 msgid "No jobs found."
 msgstr ""
 
-#: ../python/pakfire/cli.py:999
+#: ../python/pakfire/cli.py:1007
 msgid "Recently processed build jobs"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1006
+#: ../python/pakfire/cli.py:1014
 #, python-format
 msgid "A build with ID %s could not be found."
 msgstr ""
 
-#: ../python/pakfire/cli.py:1009
+#: ../python/pakfire/cli.py:1017
 #, python-format
 msgid "Build: %(name)s"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1013 ../python/pakfire/cli.py:1041
+#: ../python/pakfire/cli.py:1021 ../python/pakfire/cli.py:1049
 msgid "State"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1017
+#: ../python/pakfire/cli.py:1025
 msgid "Jobs"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1030
+#: ../python/pakfire/cli.py:1038
 #, python-format
 msgid "A job with ID %s could not be found."
 msgstr ""
 
-#: ../python/pakfire/cli.py:1037
+#: ../python/pakfire/cli.py:1045
 #, python-format
 msgid "Job: %(name)s"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1042 ../python/pakfire/packages/base.py:107
+#: ../python/pakfire/cli.py:1050 ../python/pakfire/packages/base.py:107
 #: ../python/pakfire/transaction.py:351
 msgid "Arch"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1047 ../python/pakfire/packages/base.py:142
+#: ../python/pakfire/cli.py:1055 ../python/pakfire/packages/base.py:142
 msgid "Build host"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1052
+#: ../python/pakfire/cli.py:1060
 msgid "Time created"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1053
+#: ../python/pakfire/cli.py:1061
 msgid "Time started"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1054
+#: ../python/pakfire/cli.py:1062
 msgid "Time finished"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1055
+#: ../python/pakfire/cli.py:1063
 msgid "Duration"
 msgstr ""
 
-#: ../python/pakfire/cli.py:1078
+#: ../python/pakfire/cli.py:1086
 msgid "Pakfire daemon command line interface."
 msgstr ""
 
@@ -717,20 +729,20 @@ msgstr ""
 msgid "Given algorithm '%s' is not supported."
 msgstr ""
 
-#: ../python/pakfire/config.py:192
+#: ../python/pakfire/config.py:196
 msgid "Configuration:"
 msgstr ""
 
-#: ../python/pakfire/config.py:194
+#: ../python/pakfire/config.py:198
 #, python-format
 msgid "Section: %s"
 msgstr ""
 
-#: ../python/pakfire/config.py:199
+#: ../python/pakfire/config.py:203
 msgid "No settings in this section."
 msgstr ""
 
-#: ../python/pakfire/config.py:201
+#: ../python/pakfire/config.py:205
 msgid "Loaded from files:"
 msgstr ""
 
index 2c02c4996d930a68c460d6f168dcdd935c9eabc5..2a7d2263c598f399bc43ce09b7fa7c0e635bdff7 100644 (file)
@@ -25,7 +25,6 @@ import string
 
 import actions
 import builder
-import config
 import distro
 import filelist
 import logger
@@ -38,6 +37,7 @@ import util
 import logging
 log = logging.getLogger("pakfire")
 
+from config import Config
 from constants import *
 from i18n import _
 
@@ -50,7 +50,7 @@ class Pakfire(object):
                (">" , satsolver.REL_GT,),
        )
 
-       def __init__(self, mode=None, path="/", configs=None, arch=None,
+       def __init__(self, mode=None, path="/", config=None, configs=None, arch=None,
                        enable_repos=None, disable_repos=None, **kwargs):
 
                if kwargs:
@@ -75,11 +75,13 @@ class Pakfire(object):
                        if self.path == "/":
                                self.check_is_ipfire()
 
-               # Read configuration file(s).
-               if mode == "builder":
-                       self.config = config.ConfigBuilder(files=configs)
+               # Get the configuration.
+               if config:
+                       assert configs is None, "You cannot pass configs and config."
+                       self.config = config
                else:
-                       self.config = config.Config(files=configs)
+                       # Read configuration file(s).
+                       self.config = Config(files=configs)
 
                # Dump the configuration.
                self.config.dump()
index e95874c437d0e8bb8878445119075cc7703c2161..517ff27e579994d7f866798c5f565de8b9ecba0a 100644 (file)
@@ -42,6 +42,7 @@ import _pakfire
 import logging
 log = logging.getLogger("pakfire")
 
+from config import ConfigBuilder
 from system import system
 from constants import *
 from i18n import _
@@ -65,7 +66,7 @@ class BuildEnviron(object):
        # The version of the kernel this machine is running.
        kernel_version = os.uname()[2]
 
-       def __init__(self, filename=None, configs=None, arch=None, build_id=None, logfile=None,
+       def __init__(self, filename=None, distro_name=None, configs=None, arch=None, build_id=None, logfile=None,
                        builder_mode="release", use_cache=None, **pakfire_args):
                # Set mode.
                assert builder_mode in ("development", "release",)
@@ -120,9 +121,21 @@ class BuildEnviron(object):
                if pakfire_args.has_key("mode"):
                        del pakfire_args["mode"]
 
+               config = ConfigBuilder(files=configs)
+               if not configs:
+                       if distro_name is None:
+                               distro_name = config.get("builder", "distro", None)
+
+                       config.load_distro_config(distro_name)
+
+               if not config.has_distro():
+                       log.error(_("You have not set the distribution for which you want to build."))
+                       log.error(_("Please do so in builder.conf or on the CLI."))
+                       raise ConfigError, _("Distribution configuration is missing.")
+
                self.pakfire = base.Pakfire(
                        mode="builder",
-                       configs=configs,
+                       config=config,
                        arch=arch,
                        **pakfire_args
                )
@@ -568,6 +581,36 @@ class BuildEnviron(object):
                # Return an iterator over the packages.
                return iter(repo)
 
+       def write_config(self):
+               # Cleanup everything in /etc/pakfire.
+               util.rm(self.chrootPath(CONFIG_DIR))
+
+               for i in (CONFIG_DIR, CONFIG_REPOS_DIR):
+                       i = self.chrootPath(i)
+                       if not os.path.exists(i):
+                               os.makedirs(i)
+
+               # Write general.conf.
+               f = open(self.chrootPath(CONFIG_DIR, "general.conf"), "w")
+               f.close()
+
+               # Write builder.conf.
+               f = open(self.chrootPath(CONFIG_DIR, "builder.conf"), "w")
+               f.write(self.distro.get_config())
+               f.close()
+
+               # Create pakfire configuration files.
+               for repo in self.pakfire.repos:
+                       conf = repo.get_config()
+
+                       if not conf:
+                               continue
+
+                       filename = self.chrootPath(CONFIG_REPOS_DIR, "%s.repo" % repo.name)
+                       f = open(filename, "w")
+                       f.write("\n".join(conf))
+                       f.close()
+
        def do(self, command, shell=True, personality=None, logger=None, *args, **kwargs):
                ret = None
 
@@ -615,11 +658,8 @@ class BuildEnviron(object):
                        raise BuildError, _("Could not find makefile in build root: %s") % pkgfile
                pkgfile = "/%s" % os.path.relpath(pkgfile, self.chrootPath())
 
-               # Create pakfire configuration file.
-               cfgfile = "/tmp/pakfire.conf"
-               f = open(self.chrootPath(cfgfile), "w")
-               f.write(self.distro.get_config())
-               f.close()
+               # Write pakfire configuration into the chroot.
+               self.write_config()
 
                # Create the build command, that is executed in the chroot.
                build_command = [
@@ -629,7 +669,6 @@ class BuildEnviron(object):
                        pkgfile,
                        "--arch", self.arch,
                        "--nodeps",
-                       "--config=%s" % cfgfile,
                        "--resultdir=/result",
                ]
 
index 6f702a62f9659a44a51666d2fc536d5e8d91f053..8bab886fdc9608f52274ce2a5554700406000216 100644 (file)
@@ -113,6 +113,11 @@ class Cli(object):
                if hasattr(self.args, "offline"):
                        ret["offline"] = self.args.offline
 
+               if hasattr(self.args, "config"):
+                       ret["configs"] = self.args.config
+               else:
+                       ret["configs"] = None
+
                return ret
 
        def parse_common_arguments(self, repo_manage_switches=True, offline_switch=True):
@@ -761,8 +766,10 @@ class CliBuilderIntern(Cli):
                else:
                        raise FileNotFoundError, pkg
 
-               pakfire._build(pkg, builder_mode=self.args.mode,
-                       arch=self.args.arch, resultdir=self.args.resultdir,)
+               conf = config.ConfigBuilder()
+
+               pakfire._build(pkg, builder_mode=self.args.mode, config=conf,
+                       arch=self.args.arch, resultdir=self.args.resultdir)
 
 
 class CliClient(Cli):
index 467b36aa96f0a272e2095fe9f6df53b62c9bd01c..c7ab14301459323a8080fef494e643e91120a14d 100644 (file)
@@ -66,6 +66,10 @@ class _Config(object):
                        if repo_path:
                                self.read_dir(repo_path, ext=".repo")
 
+               # Always read overwrite.conf.
+               # This is a undocumented feature to make bootstrapping easier.
+               self.read("overwrite.conf")
+
        def get_repos(self):
                repos = []
 
@@ -202,13 +206,28 @@ class _Config(object):
                for f in self._files:
                        log.debug("    %s" % f)
 
+       def has_distro(self):
+               return self._config.has_key("distro")
+
 
 class Config(_Config):
        files = ["general.conf"]
 
 
 class ConfigBuilder(_Config):
-       files = ["general.conf", "builder.conf", "default.conf"]
+       files = ["general.conf", "builder.conf"]
+
+       def load_distro_config(self, distro_name):
+               if distro_name is None:
+                       return False
+
+               filename = os.path.join(CONFIG_DISTRO_DIR, "%s.conf" % distro_name)
+
+               if not os.path.exists(filename):
+                       return False
+
+               self.read(filename)
+               return True
 
 
 class ConfigClient(_Config):
index 10d4b5c752933694729a6710c713e9594bb8f382..725c8aa05af4ec74719a770ad90d9f83f97d3228 100644 (file)
@@ -32,6 +32,7 @@ SCRIPT_DIR = "/usr/lib/pakfire"
 
 CONFIG_DIR = os.path.join(SYSCONFDIR, "pakfire")
 CONFIG_REPOS_DIR = os.path.join(CONFIG_DIR, "repos")
+CONFIG_DISTRO_DIR = os.path.join(CONFIG_DIR, "distros")
 
 CACHE_DIR = "/var/cache/pakfire"
 CCACHE_CACHE_DIR = os.path.join(CACHE_DIR, "ccache")
index 70a0042357edb04e58ca682cc2406a0ebe1f386b..1f78cc08907bd679974a51e6efdd1458f253e458 100644 (file)
@@ -20,6 +20,7 @@
 ###############################################################################
 
 import os
+import re
 
 import logging
 log = logging.getLogger("pakfire")
@@ -29,16 +30,52 @@ from repository import Repositories
 from system import system
 
 class Distribution(object):
-       def __init__(self, pakfire):
+       def __init__(self, pakfire, data=None):
                self.pakfire = pakfire
                self._data = {}
 
-               # Inherit configuration from Pakfire configuration.
-               self.update(self.pakfire.config.get_section("distro"))
+               if data is None:
+                       # Inherit configuration from Pakfire configuration.
+                       self.update(self.pakfire.config.get_section("distro"))
+               else:
+                       self._data = data
 
                # Dump all data
                self.dump()
 
+       @classmethod
+       def from_osrelease(cls, pakfire, path="/"):
+               filename = os.path.join(path, "etc", "os-release")
+
+               if not os.path.exists(filename):
+                       raise Exception, "Could not find %s." % filename
+
+               keymap = {
+                       "NAME"       : "name",
+                       "VERSION_ID" : "release",
+               }
+
+               data = {}
+
+               f = open(filename)
+               for line in f.readlines():
+                       m = re.match(r"^(.*)=(.*)$", line)
+                       if m:
+                               k, v = m.groups()
+
+                               v = v.replace("\"", "")
+                               v = v.strip()
+
+                               try:
+                                       k = keymap[k]
+                               except KeyError:
+                                       continue
+
+                               data[k] = v
+               f.close()
+
+               return cls(pakfire, data)
+
        @property
        def config(self):
                return self.pakfire.config
index e606826c11c25f69624274c979ff92c1f7ac776f..7fb836207f9ea0412ee1faa3c260e7123a0ab80c 100644 (file)
@@ -142,6 +142,13 @@ class RepositoryFactory(object):
 
                return "\n\n".join(dumps)
 
+       def get_config(self):
+               """
+                       Return the configuration as a list of string which
+                       can be written to a configuration file.
+               """
+               pass
+
 
 class RepositoryDummy(RepositoryFactory):
        """
index a261320f76a780f96be9e4cd785734875846d792..5118cc42b3b097024e9ad3b5ef4000b8852738ba 100644 (file)
@@ -137,3 +137,21 @@ class RepositorySolv(base.RepositoryFactory):
                                raise Exception, "XXX this should never happen..."
 
                return os.path.join(self.cache.path, cache_filename)
+
+       def get_config(self):
+               if self.enabled:
+                       enabled = "1"
+               else:
+                       enabled = "0"
+
+               lines = [
+                       "[repo:%s]" % self.name,
+                       "description = %s" % self.description,
+                       "enabled = %s" % enabled,
+                       "baseurl = %s" % self.baseurl,
+                       "mirrors = %s" % self._mirrors,
+                       #"gpgkey = %s" % self.gpgkey,
+                       "priority = %s" % self._priority,
+               ]
+
+               return lines