Bug 385868

Summary: registration does not work
Product: [openSUSE] openSUSE 11.0 Reporter: Stephan Kulow <coolo>
Component: libzyppAssignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: Duncan Mac-Vicar <dmacvicar>
Severity: Critical    
Priority: P5 - None CC: kkaempf, locilka, ma, mc, ro, schubi
Version: Beta 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stephan Kulow 2008-05-02 06:01:52 UTC
suseRegister does zypp-query-pool products @system and that is always empty.

Either suseRegister needs to remove the @system or zypp-query-pool needs to be changed. All in all this "products are not installed" is a desaster with so many problems and so few gains ;(
Comment 1 Stephan Kulow 2008-05-02 10:24:02 UTC
removed the @system now, leaving the bug open for a real evaluation once everyone is back from vacation :)
Comment 2 Stefan Schubert 2008-05-02 10:28:55 UTC
Ähm, @System is the system repo and not @system
Comment 3 Stephan Kulow 2008-05-05 08:01:46 UTC
As we found out, this is not the only problem so far - satsolver did not parse DISTPRODUCT/PRODUCT and the registration seems to be the only one using it.
Comment 4 Klaus Kämpf 2008-05-05 08:19:42 UTC
Yeah, but thats an historical artefact and probably wrong anyways. The registration server should be able to recognize all products (-livecd, -ftp, -dvd, etc.) properly.

Comment 5 Michael Calmer 2008-05-05 08:33:47 UTC
About @system:

@system was only a parameter for a filter. It shows only "installed" products. In the new terms these are "satisfied" products.

About DISTPRODUCT:

PRODUCT had always a very short and cryptic string which is not designed to be read by a customer. 
The registration strings were shown in statistics and in future in SMT)

Additionaly we may want to map different media (which all have a different PRODUCT string) to one product string for the registration (not for openSUSE but maybe for SLE products) 

These things were solved by an extra string for the registration which was called DISTPRODUCT. 

suse_register need a string which can be provided to NCC. NCC needs to know this string, so it should not change during development (Alpha => Beta => RC => Final).

We can use DISTPRODUCT or rename it to REGPRODUCT or we use PRODUCT if it meets our needs, but we have to agree on a way how we want to do it, and then implement it.  
Comment 6 Stephan Kulow 2008-05-05 10:52:50 UTC
*** Bug 382689 has been marked as a duplicate of this bug. ***
Comment 7 Stephan Kulow 2008-05-09 14:45:15 UTC
ma added support for /etc/zypp/products.d in zypp-query-pool --registable.

My Plan: autobuild generates a ini file as expected on the DVD as openSUSE-release.prod and Yast copies that file on both install and update to /etc/zypp/products.d/ if it's on DVD.

This way we know later on what product was used to install - and PM needs that information
Comment 8 Stephan Kulow 2008-05-09 14:46:04 UTC
A openSUSE-release.prod would look like this:

[openSUSE 11.0 %arch]
distproduct=openSUSE-DVD-retail
distversion=11.0-Beta3
Comment 9 Michael Andres 2008-05-09 19:44:26 UTC
In addition to satisfied products, libzypp-4.21.0 
will also print the products defined in /etc/zypp/products.d on:

  zypp-query-pool --registable
  zypp-query-pool --registable products
Comment 10 Michael Andres 2008-05-09 21:38:12 UTC
With libzypp-4.21.1 
zypp::Product will also return all product related values, which are now parsed and stored in the solv file. Thus zypp-query-pool will print distproduct and distversion even for satisfied products (these defined in a repo and not in products.d).

Now registration should work.
Comment 14 Jan Kupec 2008-05-12 15:34:17 UTC
done
Comment 15 Stephan Kulow 2008-05-12 15:44:31 UTC
/etc/zypp.d/products.d/openSUSE-release.prod will be owned by package openSUSE-release-dvd