Bug 790184 - Deleting a package group doesn't remove it from any categories it is in
Summary: Deleting a package group doesn't remove it from any categories it is in
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Todd Sanders
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-13 20:57 UTC by Jay Dobies
Modified: 2013-09-27 14:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-27 14:10:21 UTC


Attachments (Terms of Use)

Description Jay Dobies 2012-02-13 20:57:25 UTC
To replicate:
* Create a package group (test-group-2)
* Create a category (test-category-1)
* Add test-group-2 to test-category-1
* Delete test-group-2

The category in comps.xml still references test-group-2. We need to either:
* Have Pulp remove it from the category
* Not let the user delete the group until it's explicitly removed from the category

The easiest way to see this is to open a second terminal and do a watch on the comps.xml file in the repo:

watch -n 1 cat comps.xml

After deleting the group, my comps.xml was left in an inconsistent state:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>

  <group>
   <id>test-group-1</id>
   <default>true</default>
   <uservisible>true</uservisible>
   <display_order>1024</display_order>
   <name>Test Group 1</name>
   <description>Test Group 1 Description</description>
    <packagelist>
      <packagereq type="default">gofer</packagereq>
    </packagelist>
  </group>
  <category>
   <id>test-category-1</id>
   <display_order>99</display_order>
   <name>Test Category 1</name>
   <description>Test Category 1 Description</description>
    <grouplist>
     <groupid>test-group-2</groupid>
    </grouplist>
  </category>

</comps>

Comment 1 John Matthews 2012-02-14 01:40:42 UTC
Categories and Groups and even references of packages in a group are not a strong linkage.  It's valid to have a group reference in a Category and the group doesn't exist.

The reason is that the data from comps.xml may be aggregated across repos and a group defined in a category may exist in a diff repo from where the category is.  

I recommend we moved this to NOT_A_BUG

Comment 87 Michael Hrivnak 2013-09-27 14:10:21 UTC
I agree that this is not a bug. Also, pulp currently does not facilitate editing of groups and categories anyway.


Note You need to log in before you can comment on or make changes to this bug.