Bug 340182

Summary: profile-manager: check for duplicates in resource groups, allow directories
Product: [openSUSE] openSUSE 10.3 Reporter: Jiří Suchomel <jsuchome>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: martin.kunz, tgoettlicher
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: added header line "active?" in the table of the profile-manager-listings.

Description Jiří Suchomel 2007-11-08 13:46:20 UTC
From bug #337913:

@Jiri: Something is a little bit mistakable in the dialogs of the
profile-manager. I first thought, that i should add the files like
/etc/sysconfig/network/ifcfg-eth0 to the resource-group "network".
In fact i don't need to add them, because they are already monitored by the
default "file" /etc/sysconfig/network (which is a folder, not a file). Perhaps
it is possible to point that out in the helps (or better parse the added files
if they are already watch by another "file" ;-) )
Also the cross is not described, for which the file is active or inactive.

Another little problem: I'm not able to add a folder to be monitored via the
dialog of the profile-manager (not by the search-function, only by typing it
into the field).
Comment 1 Jiří Suchomel 2007-11-08 13:52:19 UTC
> Another little problem: I'm not able to add a folder to be monitored via the
> dialog of the profile-manager (not by the search-function, only by typing it
> into the field).

Is it supported by scpm? If yes, is the type still "file"?

Comment 2 Jiří Suchomel 2007-11-08 13:55:35 UTC
Oh, yes it is, /etc/sysconfig/network is the default example...
Comment 3 Jiří Suchomel 2007-11-08 14:04:14 UTC
About the meaning of "X": in the "Configuration of Resource Groups" dialog, there's a help text saying:

"To achive an even more customized setup, create your own resource groups or modify existing ones. With Add or Edit, enter the resource group editor. It allows activation and deactivation of resources and gives the possibility to create additional resources and add them to your groups."

Don't you think it is enough? Should be a separate help text in the Edit popup iself? Joachim, do you have an idea?
Comment 4 Jiří Suchomel 2007-11-08 14:07:05 UTC
(In reply to comment #0 from Jiří­ Suchomel)
> Another little problem: I'm not able to add a folder to be monitored via the
> dialog of the profile-manager (not by the search-function, only by typing it
> into the field).

Stefan, do we have something for browsing for file or directory? It looks like AskForExistingFile is only for files and AskForExistingDirectory only for directories, which looks logical, but... Could it be possible to add an option parameter to, say, AskForExistingFile (like "allowDirectories") to support both?

Comment 5 Jiří Suchomel 2007-11-08 14:08:03 UTC
s/Stefan/Thomas/
Comment 6 Martin Kunz 2007-11-08 14:21:35 UTC
(In reply to comment #2 from Jiří­ Suchomel)
> Oh, yes it is, /etc/sysconfig/network is the default example...
> 

Some additional information:
It is supported by scpm, but as i see in the default example resource-group network it works only one depth of the folder. That means that - if you want to have one subfolder also monitored, you have to add it to the resource-group as a "file".
e.g. in the resource-example network the subfolder "/etc/sysconfig/network/if-down.d" is included. 
see here
mylaptop:~ # cat /usr/lib/scpm/resource_groups/network
description Basic network settings
service network
file /etc/hosts
file /etc/resolv.conf
file /etc/sysconfig/network
file /etc/sysconfig/network/config
file /etc/sysconfig/network/dhcp
file /etc/sysconfig/network/if-down.d
file /etc/sysconfig/network/if-up.d
file /etc/sysconfig/network/wireless
file /etc/host.conf inactive
file /etc/HOSTNAME inactive
file /etc/sysconfig/proxy inactive

But why is the real file /etc/sysconfig/network/config added to example resource_group network? Is this not a file in the subfolder of /etc/sysconfig/network ?
Comment 7 Martin Kunz 2007-11-08 14:50:00 UTC
Created attachment 182634 [details]
added header line "active?" in the table of the profile-manager-listings.
Comment 8 Jiří Suchomel 2007-11-08 14:52:37 UTC
(In reply to comment #7 from Martin Kunz)
> Created an attachment (id=182634) [details]
> added header line "active?" in the table of the profile-manager-listings.

You are right, that's the easy and logical solution.

Comment 9 Martin Kunz 2007-11-08 14:57:56 UTC
(In reply to comment #8 from Jiří­ Suchomel)
> (In reply to comment #7 from Martin Kunz)
> > Created an attachment (id=182634) [details] [details]
> > added header line "active?" in the table of the profile-manager-listings.
> 
> You are right, that's the easy and logical solution.
> 
Or some better word that in that "active?". 
Comment 10 Thomas Göttlicher 2007-11-08 15:14:02 UTC
(In reply to comment #4 from Jiri Suchomel)
> Stefan, do we have something for browsing for file or directory? It looks like
> AskForExistingFile is only for files and AskForExistingDirectory only for
> directories, which looks logical, but... Could it be possible to add an option
> parameter to, say, AskForExistingFile (like "allowDirectories") to support
> both?
We don't have anything that is able to select files and directories at the same
time. The QT toolkit doesn't have it too. For a simple reason: When the user
selects a directory in the file dialog and clicks OK it doesn't return this
directory name but opens this directory and shows its contents to the user.
Otherwise the user had no chance to browse through different directories when
he searches for a file.
Comment 11 Jiří Suchomel 2007-11-08 15:22:02 UTC
(In reply to comment #10 from Thomas Göttlicher)

> We don't have anything that is able to select files and directories at the same
> time. ...

OK, so this part of bug report cannot be solved in an easy way (without introducing specialized widget). It actually is possible to enter directories (manually), so I think users have to live with it.


Comment 12 Jiří Suchomel 2007-11-08 21:08:22 UTC
Fixed in yast2-profile-manager-2.16.0:

- read from correct config file (#337913)
- do not write translated "file"/"service" into DB (#337913)
- fixed checking for duplicate resources (#340182)
- added "Active" header to table with resources (#340182)