diff --git a/examples/tutorials/file_comparison.markdown b/examples/tutorials/file_comparison.markdown index a863999fb..d92b9e83b 100644 --- a/examples/tutorials/file_comparison.markdown +++ b/examples/tutorials/file_comparison.markdown @@ -22,7 +22,7 @@ Here is the order in which bundles are called in the command line above (some ot 1. [robot][#robot] - demonstrates use of `reports`. 2. [global_vars][#global_vars] - sets up some global variables for later use. -3. [packages][#packages] - installs packages that will be used later on. +3. [packages--v2][#packages] - installs packages that will be used later on. 4. [create_aout_source_file][#create_aout_source_file] - creates a source file. 5. [create_aout][#create_aout] - compiles the source file. 6. [test_delete][#test_delete] - deletes a file. diff --git a/examples/tutorials/manage-packages.markdown b/examples/tutorials/manage-packages.markdown index ce9c09269..2cf80f55d 100644 --- a/examples/tutorials/manage-packages.markdown +++ b/examples/tutorials/manage-packages.markdown @@ -126,7 +126,7 @@ The packages promise also supports version pinning, so that you can specify exactly the version you want to have installed. It is modular and extensible, so that it is easy to add support for new platforms and package managers. For complete documentation, please have a look at the [reference manual for the -packages promise][packages]. +packages promise][packages--v2]. Of course, running the policy by hand is only good for initial testing. Once your policy works the way you need, you will want to deploy it to your entire diff --git a/generator/_references.md b/generator/_references.md index 577a46a78..f23dd1680 100644 --- a/generator/_references.md +++ b/generator/_references.md @@ -64,3 +64,6 @@ [mpf-classification-bundles]: reference-masterfiles-policy-framework.html#classification-bundles-before-autorun.html [mpf-services-autorun]: reference-masterfiles-policy-framework-services-autorun.html [package-modules-the-api]: reference-language-concepts-modules-package-module-api.html#the-api +[packages#options]: reference-promise-types-packages-v2.html#options +[packages-v1]: reference-promise-types-packages-v1.html +[packages-v1#package_name_convention]: reference-promise-types-packages-v1.html#package_name_convention diff --git a/generator/_scripts/cfdoc_linkresolver.py b/generator/_scripts/cfdoc_linkresolver.py index c4f515e7b..06edb65f8 100644 --- a/generator/_scripts/cfdoc_linkresolver.py +++ b/generator/_scripts/cfdoc_linkresolver.py @@ -203,7 +203,7 @@ def parseMarkdownForAnchors(file_name, config): def applyLinkMap(file_name, config): - # print("applyLinkMap() filename = %s" % file_name) + print("applyLinkMap() filename = %s" % file_name) markdown_file = open(file_name, "r") markdown_lines = markdown_file.readlines() markdown_file.close() @@ -295,8 +295,8 @@ def applyLinkMap(file_name, config): candidate_start = -1 i += 1 if index != -1: - # print("applyLinkMap() candidate = %s" % candidate) - # print("applyLinkMap() markdownline = %s" % markdown_line) + print("applyLinkMap() candidate = %s" % candidate) + print("applyLinkMap() markdownline = %s" % markdown_line) write_changes = True new_line += markdown_line[:index] new_line += "[" + candidate + "]" + anchor diff --git a/redirects.conf b/redirects.conf index 217fc2371..0e9c641d0 100644 --- a/redirects.conf +++ b/redirects.conf @@ -55,3 +55,7 @@ RewriteRule ^/latest/guide-latest-release-supported-platforms.html /docs/latest/ RewriteRule ^/nickanderson https://www.linkedin.com/in/hithisisnick/ RewriteRule ^/thisistheway https://orgmode.org RewriteRule ^/orgmode https://orgmode.org + +# CFE-4315 renaming packages old/new/deprecated to v1 and v2 +RewriteRule ^/docs/(.*)/reference-promise-types-packages.html https://%{SERVER_NAME}/docs/$1/reference-promise-types-packages--v2.html +RewriteRule ^/docs/(.*)/reference-promise-types-packages-deprecated.html https://%{SERVER_NAME}/docs/$1/reference-promise-types-packages--v1.html diff --git a/reference/language-concepts/normal-ordering.markdown b/reference/language-concepts/normal-ordering.markdown index 9fea7ae42..636f6f9d3 100644 --- a/reference/language-concepts/normal-ordering.markdown +++ b/reference/language-concepts/normal-ordering.markdown @@ -114,7 +114,7 @@ following, converging towards a final state: 4. [classes][classes] 5. [users][users] 6. [files][files] -7. [packages][packages] +7. [packages--v2][packages] 8. [guest_environments][guest_environments] 9. [methods][methods] 10. [processes][processes] diff --git a/reference/promise-types.markdown b/reference/promise-types.markdown index 7389f0227..651a3d764 100644 --- a/reference/promise-types.markdown +++ b/reference/promise-types.markdown @@ -19,7 +19,7 @@ depends on the [bundle][bundles] type: | [commands][commands] - execute a command | | x | | | | [databases][databases] - configure a database | | x | | | | [files][files] - configure a file | | x | | | -| [packages][packages] - install a package | | x | | | +| [packages--v2][packages] - install a package | | x | | | | [guest_environments][guest_environments] | | x | | | | [methods][methods] - take on a whole bundle of other promises | | x | | | | [processes][processes] - start or terminate processes | | x | | | diff --git a/reference/promise-types/packages-deprecated.markdown b/reference/promise-types/packages-v1.markdown similarity index 98% rename from reference/promise-types/packages-deprecated.markdown rename to reference/promise-types/packages-v1.markdown index ebf423999..684bb3207 100644 --- a/reference/promise-types/packages-deprecated.markdown +++ b/reference/promise-types/packages-v1.markdown @@ -1,13 +1,14 @@ --- layout: default -title: packages (deprecated) +title: packages (v1) published: true --- -**NOTE:** This package promise is deprecated and has been superseded by -[the new package promise][packages]. It is recommended to use the new package -promise whenever possible. Simply using attributes from the new package promise -interface will select the new implementation. +**NOTE:** This package promise is deprecated. +When possible use the latest [package promise version][packages]. + +If specific attributes are not specified and there is no `default:package_module_knowledge.platform_default` variable set then this v1 packages promise will be used. +Also note that if no specific `package_method` attribute is included a default of [`generic`][#Default package method] will be used. NOTE: CFEngine 3.6 introduces bundles `package_absent`, `package_present`, `package_latest`, `package_specific_present`, `package_specific_absent`, and diff --git a/reference/promise-types/packages.markdown b/reference/promise-types/packages-v2.markdown similarity index 99% rename from reference/promise-types/packages.markdown rename to reference/promise-types/packages-v2.markdown index 1514d7fc3..c324e9629 100644 --- a/reference/promise-types/packages.markdown +++ b/reference/promise-types/packages-v2.markdown @@ -1,6 +1,6 @@ --- layout: default -title: packages +title: packages (v2) published: true --- @@ -13,7 +13,7 @@ CFEngine 3.6 and older had a different package promise implementation, which is still functional, but considered deprecated. However, it may still be in use by existing policy files, and it may cover platforms which the new implementation does not currently cover. To read about the old package promise, go to the -[old package promise section][packages (deprecated)]. +[v1 package promise (package_method)][packages-v1]. The actual communication with the package manager on the system is handled by so called [package modules][Package modules], which are specifically written for @@ -46,7 +46,7 @@ string needs to be a bare package name, you cannot use a file name for this. * The promiser must be the fully qualified path to a file *or* a *package name*. `package_modules` do not have the concept of a - flexible [naming convention][packages (deprecated)#package_name_convention]. + flexible [naming convention][packages-v1#package_name_convention]. For example, here are valid ways to specify a specific package version when using the `package_module` based implementation.