Hello, The webrev for proposed changes for the progress is available at: http://cr.opensolaris.org/~migi/ips_progress_changes/
I've made few tests and it looks like everything is working. The pkg(1) itself is not changed, as the additional progress functions are not consumed by FancyUNIXProgressTracker. Once we will have those bits in together with other (cancel support, api changes - I'm working on those) we will be able to remove *all* duplicated code from IPS GUI. It would be really nice if we could get this request working: http://defect.opensolaris.org/bz/show_bug.cgi?id=2587 best Michal Michal Pryc wrote: > Hello, > Please disregard my previous message. In the proposal of progresstracker > there are few typos. I am preparing webrev with tested version. > > best > Michal > > Michal Pryc wrote: >> Hello, >> Before producing webrev for the progress changes which we are >> proposing. I was trying to make few tests to make sure that our bits >> are functional and working. During first smoke test on the unchanged >> IPS from the changeset 425 I found a problem, since I couldn't use >> pkg(1) anymore: >> >> # pkg list SUNWlang-ru >> Traceback (most recent call last): >> File "/usr/bin/pkg", line 1488, in ? >> ret = main_func() >> File "/usr/bin/pkg", line 1450, in main_func >> return list_inventory(img, pargs) >> File "/usr/bin/pkg", line 167, in list_inventory >> img.load_catalogs(progress.NullProgressTracker()) >> File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line >> 1039, in load_catalogs >> self.cache_catalogs() >> File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line >> 963, in cache_catalogs >> catalog.Catalog.read_catalog(cache, >> AttributeError: type object 'Catalog' has no attribute 'read_catalog' >> >> # pkg uninstall SUNWlang-ru >> Traceback (most recent call last): >> File "/usr/bin/pkg", line 1488, in ? >> ret = main_func() >> File "/usr/bin/pkg", line 1456, in main_func >> return uninstall(img, pargs) >> File "/usr/bin/pkg", line 534, in uninstall >> img.load_catalogs(progresstracker) >> File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line >> 1039, in load_catalogs >> self.cache_catalogs() >> File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line >> 963, in cache_catalogs >> catalog.Catalog.read_catalog(cache, >> AttributeError: type object 'Catalog' has no attribute 'read_catalog' >> >> >> are there any steps required to have functional pkg(1) from the trunk >> on top of the: >> # cat /etc/release >> OpenSolaris 2008.11 snv_93 X86 >> Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. >> Use is subject to license terms. >> Assembled 08 July 2008 >> >> best >> Michal >> >> jmr wrote: >>> Hi, >>> >>> When IPS GUI was released with 2008.05 we needed some things that IPS >>> did not provide, namely: >>> - An client API for consumers of IPS to code to. >>> - Fine grained progress notification, ProgressTracker did not provide >>> enough progress information for our needs. >>> - Ability to cancel running tasks. >>> >>> So Michal lifted code from IPS itself and hacked on it. Not pretty >>> but it worked for the first rev. IPS GUI is currently broken (#2195, >>> #2328) as the underlying IPS has moved on from the 2008.05 release, >>> particularly with changes added for incorporations. >>> >>> So what to do? >>> >>> Well we need to: >>> - Introduce an API the IPS GUI and other clients including pkg(1) and >>> the installer can use. >>> - Update the ProgressTracker to allow a client to derive from it and >>> get whatever fine grained progress information they need. >>> - Add in support for canceling tasks. Currently IPS GUI uses a >>> simple threading model to allow canceling at the file level. A better >>> solution would be to allow canceling at any point in the download >>> using an event based networking model aka twisted, but we may have to >>> stick with the simple solution initially at least to get things back >>> up and running for IPS GUI. >>> >>> To this end we are proposing the following attached changes for the >>> Progress (other changes for API and Canceling tasks to follow). >>> Michal and myself made them against the current IPS gate and they are >>> not tested yet. When they are we can create a Webrev, but as I'm off >>> on holidays for a week and a half I wanted to get these proposed >>> changes out for folks to take a look at. >>> >>> The changes are broken down into mods for Evaluate, Download and >>> Install stages. >>> >>> We could not see a way to get at file byte count easily in the >>> current code and if anyone has any idea how to do so we are all ears >>> :) We'd like to be able to give file byte count progress, not just he >>> overall byte count chunks currently available as progress. We'd also >>> like to be able to control the chunk size notification. >>> >>> >>> JR & Michal >>> >>> # HG changeset patch >>> # User [EMAIL PROTECTED] >>> # Date 1216118043 -3600 >>> # Node ID cf2b4d30f7b1b5b4e6289f59b2fb86078a09a5a9 >>> # Parent be3c47d9061ff2a855c1c12a39e7d02d105b5055 >>> IPS GUI - Evaluate proposed changes >>> >>> # HG changeset patch >>> # User [EMAIL PROTECTED] >>> # Date 1216142807 -3600 >>> # Node ID 56b4469abe423ec76df0f22d487ece5a3fb20858 >>> # Parent cf2b4d30f7b1b5b4e6289f59b2fb86078a09a5a9 >>> IPS GUI - Download proposed changes but without file byte count >>> >>> # HG changeset patch >>> # User [EMAIL PROTECTED] >>> # Date 1216203697 -3600 >>> # Node ID f6692bf1b4050fa088d774c1258a99a77b9702a1 >>> # Parent 56b4469abe423ec76df0f22d487ece5a3fb20858 >>> IPS GUI - Install (Remove/Update/Install Phases) proposed changes >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> pkg-discuss mailing list >>> [email protected] >>> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss >> >> > > _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
