~mvo/+junk/apt-clone

« back to all changes in this revision

Viewing changes to apt_clone.py

  • Committer: Michael Vogt
  • Date: 2011-03-08 21:25:48 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110308212548-siuseklmdzs66wjw
apt_clone.py: explicitely call mark_auto() to ensure the auto install info is correct

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
                continue
208
208
            (name, version, auto) = line.split()
209
209
            pkgs.add(name)
210
 
            from_user = not int(auto)
 
210
            auto_installed = int(auto)
 
211
            from_user = not auto_installed
211
212
            if name in cache:
212
 
                cache[name].mark_install(auto_inst=False,
213
 
                                         auto_fix=False,
214
 
                                         from_user=from_user)
 
213
                cache[name].mark_install(from_user=from_user)
 
214
                # ensure the auto install info is 
 
215
                cache[name].mark_auto(auto_installed)
215
216
        # check what is broken and try to fix
216
217
        if cache.broken_count > 0:
217
218
            resolver = apt_pkg.ProblemResolver(cache._depcache)