[EMAIL PROTECTED] wrote:
> On Tue, Jul 22, 2008 at 11:37:55AM +0100, Michal Pryc wrote:
>> Since IPS is using cache then the final_path is the actual file being 
>> downloaded.
>> Later on this file is being copied to the final destination. Am I wrong?
> 
> Sortof.  final_path is the destination in the cache directory that this
> file will be moved to after it has been successfully downloaded.  The
> file is named by SHA-1 hash, so printing this name to the user isn't
> going to tell them anything informative.  In fact, it's likely to be
> confusing instead of helpful.
> 
>> So you might be right that showing this cache file is useless for 
>> people, but let's say for debug information it could be important data.
> 
> I don't think we should be showing debug information in the GUI by
> default.  Dan is working on enhancing pkg's debug facilities.  That
> seems like the right place for this kind of work.
> 
>> One way could be getting such information before line 223:
>>
>> http://cr.opensolaris.org/~migi/ips_progress_changes/src/modules/client/filelist.py.html
>>
>> using some object checking and then retrieving attributes from the:
>>
>> self.fhash[hashval]
>>
>> As this we will have information from:
>> inst_path = self.fhash[hashval][0].attrs.get("path")
>>
>> but I think this might be not the best approach, since this is list of 
>> hashes so I am not sure when the self.fhash[hashval] might have more 
>> then 1 object in it and what we should do in such case. As well I am not 
>> sure if all the objects will have "path" attribute in this place?
> 
> That's exactly the problem with printing the filename for an object that
> is named by the hash of it's content.  Many files may contain the same
> information.  Something that is named by hash doesn't tell the user
> anything informative; however, since it's possible for multiple files to
> contain the same data, you may have many actions associated with a
> particular hashval.

Hello :-)

So maybe iteration through the self.fhash[hashval] would do the job??

something like:
  for attr in self.fhash[hashval]:
    self.progtrack.download_start_file_real(attr.attrs.get("path"))


> The path attribute is guaranteed to be in all file actions.
> 
>>  From the GUI stand point of view we really want to have information 
>> about files being downloaded
> 
> What do you need this information for?  I think it would be sufficient
> to count the number of files downloaded and use a progress bar, instead
> of trying to print every single file name.
It is requirement made during design of the GUI, as you will see on the 
right side (A) I was also asking the same question:
http://xdesign.sfbay.sun.com/projects/solaris/subprojects/package_mngt/UI_specs/ui_spec_phase2/html-mockup/05_downloading_dialog.htm

But anyway having this functionality doesn't cost us a lot. Having 
abstract progress class allows to choose if the client want to consume 
such progress or not.

-- 
All the best
Michal
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to