diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-31 10:52:54 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-05-31 10:52:54 +0000 |
| commit | 6e5b269ebc9bdc674a2866c798bf5aa38e01ac25 (patch) | |
| tree | 5f3ed4bd7b92e15d9d3a93d206abd714b9e865ab /apt | |
| parent | a0ecde5eca76ceb2155ab4322c678ef2b41a7965 (diff) | |
| download | python-apt-6e5b269ebc9bdc674a2866c798bf5aa38e01ac25.tar.gz | |
* added the code that updates /etc/enviroment
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/cache.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apt/cache.py b/apt/cache.py index 33574c6d..39af9327 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -41,7 +41,7 @@ class Cache(object): self._depcache.Commit(fprogress, iprogress) - +# ----------------------------- experimental interface class Filter(object): def apply(self, pkg): return True @@ -78,14 +78,15 @@ class FilteredCache(Cache): if __name__ == "__main__": print "Cache self test" apt_pkg.init() - #c = Cache() - #print c.has_key("aptitudex") - #p = c["aptitude"] - #print p.Name() - #print len(c) - - #for pkg in c.keys(): - # x= c[pkg].Name() + c = Cache() + print c.has_key("aptitude") + p = c["aptitude"] + print p.Name() + print len(c) + + for pkg in c.keys(): + x= c[pkg].Name() + c = FilteredCache() c.Upgrade() |
