Project

Profile

Help

Story #1980

As a user, I see a warning message when I upload Langpacks or any other metadata types..

Added by pthomas@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

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

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

Following is an example for langpacks upload.

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

History

#1 Updated by pthomas@redhat.com over 4 years ago

  • Tracker changed from Issue to Story
  • Subject changed from Warning message in Langpacks upload can help to As a user,I see a warning message when I upload in Langpacks or any other metadata types..
  • Description updated (diff)
  • Platform Release deleted (master)

#2 Updated by pthomas@redhat.com over 4 years ago

  • Subject changed from As a user,I see a warning message when I upload in Langpacks or any other metadata types.. to As a user, I see a warning message when I upload Langpacks or any other metadata types..

#3 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#4 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF