Project

Profile

Help

Story #1980

Updated by pthomas@redhat.com almost 8 years ago

Langpacks langpacks upload overwrite the previous upload. I would like to see a, A message warning the user that the upload will overwrite any previous langpacks in the repository. 

 This should repository will be extended to any other metadata types which allows only one    associated with a repository. 

 Following is an example for langpacks upload. useful. 

 1. Create a repository 
 2. Upload langpacks A 
 3. Upload a second langpacks 

 $ pulp-admin rpm repo create --repo-id=repo_1 \ 
   --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/pulp_unittest/ 
 Successfully created repository [repo_1] 

 $ pulp-admin rpm repo sync run --repo-id=repo_1 

 Now let's build two package groups for our demo repo test files: 

 $ pulp-admin rpm repo uploads group --repo-id=repo_1 \ 
   --group-id=pulp_test_packages --name="Pulp Test Packages" \ 
   --description="A package group of Pulp test files." \ 
   --mand-name=pulp-dot-2.0-test --mand-name=pulp-test-package 

 $ pulp-admin rpm repo uploads group --repo-id=repo_1 \ 
   --group-id=pulp_dotted_name_packages --name="Pulp Dotted Name Packages" \ 
   --description="A group of packages that have dots in their names." \ 
   --mand-name=pulp-dot-2.0-test 

 And now we can create a package environment that is a collection of these two groups: 

 $ pulp-admin rpm repo uploads environment --repo-id repo_1 --environment-id test-env \ 
 --name test-env --description test-env --group pulp_dotted_name_packages \ 
 --group pulp_test_packages 

 +----------------------------------------------------------------------+ 
                               Unit Upload 
 +----------------------------------------------------------------------+ 

 Extracting necessary metadata for each request... 
 ... completed 

 Creating upload requests on the server... 
 [==================================================] 100% 
 Initializing upload 
 ... completed 

 Starting upload of selected units. If this process is stopped through ctrl+c, 
 the uploads will be paused and may be resumed later using the resume command or 
 canceled entirely using the cancel command. 

 Importing into the repository... 
 This command may be exited via ctrl+c without affecting the request. 


 [\] 
 Running... 

 Task Succeeded 


 Deleting the upload request... 
 ... completed 

 The package environment details can be listed as well: 

 $ pulp-admin rpm repo content environment --repo-id repo_1 --match id=test-env 

 Description: test-env 
 Group Ids:     pulp_dotted_name_packages, pulp_test_packages 
 Id:            test-env 
 Name:          test-env 
 Options: 

 Note 

 Package environments will also be created and associated with a repository if they are specified in a comps file and you Upload a comps.xml file. 
 Copying Package Environments 

 Like package groups, environments can be copied between repos, which will bring along their groups. Assuming you've performed the steps from the :ref:`creating_package_environments` section, let's begin by creating an empty second repo: 

 $ pulp-admin rpm repo create --repo-id=repo_2 
 Successfully created repository [repo_2] 

 Now let's copy test-env from repo_1 to repo_2: 

 $ pulp-admin rpm repo copy environment --match id=test-env \ 
   --from-repo-id=repo_1 --to-repo-id=repo_2 
 Progress on this task can be viewed using the commands under "repo tasks". 

 Note 

 Use the --recursive flag to copy any dependencies of units being copied from the source repo into the destination repo. 

 Observe that repo_2 contains newly copied package environment: 

 $ pulp-admin repo list --repo-id repo_2 

 +----------------------------------------------------------------------+ 
                               Repositories 
 +----------------------------------------------------------------------+ 

 Id:                     repo_2 
 Display Name:           None 
 Description:            None 
 Content Unit Counts: 
   Package Environment: 1 

 Package Langpacks 
 Creating Package Langpacks 

 You can also define your own package langpacks with the :command:`pulp_admin` utility. Let's create and sync a repo: 

 $ pulp-admin rpm repo create --repo-id=repo_1 

 Now let's build a package langpacks entry for the hyphen package: 

 $ pulp-admin rpm repo uploads langpacks -i hyphen -n hyphen-%s --repo-id repo_1 
 +----------------------------------------------------------------------+ 
                               Unit Upload 
 +----------------------------------------------------------------------+ 

 Extracting necessary metadata for each request... 
 ... completed 

 Creating upload requests on the server... 
 [==================================================] 100% 
 Initializing upload 
 ... completed 

 Starting upload of selected units. If this process is stopped through ctrl+c, 
 the uploads will be paused and may be resumed later using the resume command or 
 canceled entirely using the cancel command. 

 Importing into the repository... 
 ... completed 

 Deleting the upload request... 
 ... completed 

 We can see that the package langpacks is now part of our repo: 

 $ pulp-admin rpm repo content langpacks --repo-id=repo_1 
 Matches: 
   Install: hyphen 
   Name:      hyphen-%s 

 [root@ibm-x3550m3-12 ~]# pulp-admin rpm repo uploads langpacks -i test1    -n test1-%s --repo-id repo_1 
 +----------------------------------------------------------------------+ 
                               Unit Upload 
 +----------------------------------------------------------------------+ 

 Extracting necessary metadata for each request... 
 ... completed 

 Creating upload requests on the server... 
 [==================================================] 100% 
 Initializing upload 
 ... completed 

 Starting upload of selected units. If this process is stopped through ctrl+c, 
 the uploads will be paused and may be resumed later using the resume command or 
 canceled entirely using the cancel command. 

 Importing into the repository... 
 This command may be exited via ctrl+c without affecting the request. 


 [\] 
 Running... 

 Task Succeeded 

 [root@ibm-x3550m3-12 ~]# pulp-admin rpm repo content langpacks --repo-id=repo_1 
 Matches:  
   Install: test 
   Name:      test-%s 



Back