|
Bugzilla – Full Text Bug Listing |
| Summary: | Package Manager requires "Insert CD1" but which CD1? | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | Lukas Ocilka <locilka> |
| Component: | libzypp | Assignee: | E-mail List <zypp-maintainers> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Minor | ||
| Priority: | P2 - High | CC: | dmacvicar, kkaempf, kukuk, lslezak, ma |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | SUSE Technical Services | Services Priority: | 500 |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
Screenshot of the popup window
YaST log |
||
Created attachment 175959 [details]
YaST log
The problem is that the libzypp callback provides only URL. Pkg-bindings could look up a repository with the reported URL but there could be more than one repo with the same URL - all CD/DVD repositories have the same URL (cd:// or dvd://) so it's impossible to distinguish between them. Pkg-bindings currently return empty string as the repository name. Jano, we need to add the repository name to the media change callback API. *** Bug 339677 has been marked as a duplicate of this bug. *** We should establish a standard of a (repository) Label which would be included in the metadata and pass this label to the media callback. We have LABEL in the susetags content file, which is written into the Product summary. This should be passed to the media callback. As for yum metada, we don't seem to be using products.xml just yet, so we can just make it up for this purpose. As for the cd/dvd distinction, this is a bit more complicated. Media back-end knows only which media number to ask for. The URI scheme can't be used here, since both cd and dvd can be used for both cd and dvd. IMO, this information should be included in the metadata, too. I don't know if there is a reasonably simple way of detecting whether a CD or a DVD is in the drive when adding a repository. If there is, we could store this information somewhere and use it, but i still think including this info in the metadata is a better way. So, given the above is done, we can pass that info to the media callback and construct a message like this in case of media change request for cd/dvd: "Please insert the medium labeled 'openSUSE 11.0 DVD 1' into the drive..." For online media, the DVD/CD and the media number will be ommitted in all messages and the media change prompt could read "The specified URI (<URI>) does not contain a valid repository. Please provide another URI:". Whether we decide to use susetags LABEL/product.summary or something else, we must document it (at least in the zypp/Product.h and zypp/ResObject.h :O) but i think this deserves Product::label() ). BTW: and we should ensure that the label in the metadata on CDs/DVDs will be the same as the label on the CDs/DVDs themselves :O) As a media may contain multiple products it makes sense to provide this in e.g. the media1/media file. See yast2/trunk/packagemanager/doc/media/media-descr.html:
doublesided Media is double sided. YaST will ask for 'front side' for
odd-numbered media and 'back side' for even-numbered media.
MEDIA<N> UTF-8 encoded string to use when asking for media <N>.
MEDIA<N>.<lang>
Example:
linux# cat /mnt/media.1/media
SuSE Linux AG
20020921153042
3
MEDIA1 SUSE Linux 9.1 DVD 1
MEDIA2 SUSE Linux 9.1 DVD 2
MEDIA3 SUSE Linux 9.1 DVD 3
Cangeing a CD the media1/media data should be accessible anyway, because we had to check the media ID.
Setting Services Priority because found-by is "Beta-NTS" or "Novell Technical Services" Reporter -- please change value as desired. Well, the media file contains the media set identifier and the size of the set (number of CDs, DVDs). In its original purpose, its not supposed to contain a user-readable string. The product name belongs in the content file, where even translations are available. libzypp is supposed to manage this information. Somewhat depends on the layout of the media. If we have a CD with 2 or more repositories, will each repo contain a product? And if so, will each product name appear on the CD cover? A common (repo type independent) media set description would be desirable. In that case MediaSetAccess could handle the label internally. Until then, someone has to set a label. In libzypp (4.7.0 for 11.0): I fixed MediaSetAccess to provide a label (3rd arg) to MediaChangeReport::requestMedia. The label is set to the corresponding repositories name. Todo for pkg-bindings: To me it looks like the MediaChange requestMedia callback does not pass the label (3rd arg) no to YCP. And I don't know if the YCP code would evaluate it. I also displayed current repository name as a label in zypper. I changed it now to use the label string passed by libzypp. Reassigning to zypp-maintainers to attract more eyes so that we can rediscover the solution :O) Speaking for myself, i would favor a special media set description file (possibly with all translations depending on where the CDs are to be distributed). (In reply to comment #10 from Michael Andres) > Todo for pkg-bindings: > To me it looks like the MediaChange requestMedia callback does not pass the > label (3rd arg) no to YCP. And I don't know if the YCP code would evaluate it. Fixed in yast2-pkg-bindings-2.16.31. The problem is that in my tests the passed value is still empty. I just have checked it with the current libzypp from SVN. The label is used in the YCP code properly, that should be OK. I verified this works in both yast and zypper in code11 (and fixed one glitch in zypper where it only correctly asked for new media, if there already was another (not desired) successfully mounted). Both yast and zypper show the cd/dvd repository name passed by libzypp in the requestMedia callback. It seems the repository name is all we need; there doesn't seem to be demand for something more - closing this now. |
Created attachment 175958 [details] Screenshot of the popup window In YaST I wanted to install some software but I hadn't my openSUSE 10.3 DVD in drive. Media "CD1" is requested without any label. Of course, I know that it is DVD1 of the openSUSE installation media but this seems to be a general problem. Attaching screenshot, then YaST log...