| … | |
… | |
| 78 | counter_f.close() |
78 | counter_f.close() |
| 79 | except: |
79 | except: |
| 80 | counter = 0 |
80 | counter = 0 |
| 81 | counter += 1 |
81 | counter += 1 |
| 82 | if not os.path.isdir(self._chroot_dir + "/var"): |
82 | if not os.path.isdir(self._chroot_dir + "/var"): |
| 83 | os.mkdir(self._chroot_dir + "/var", mode=0755) |
83 | os.mkdir(self._chroot_dir + "/var", 0755) |
| 84 | if not os.path.isdir(self._chroot_dir + "/var/cache"): |
84 | if not os.path.isdir(self._chroot_dir + "/var/cache"): |
| 85 | os.mkdir(self._chroot_dir + "/var/cache", mode=0755) |
85 | os.mkdir(self._chroot_dir + "/var/cache", 0755) |
| 86 | if not os.path.isdir(self._chroot_dir + "/var/cache/edb"): |
86 | if not os.path.isdir(self._chroot_dir + "/var/cache/edb"): |
| 87 | os.mkdir(self._chroot_dir + "/var/cache/edb", mode=0775) |
87 | os.mkdir(self._chroot_dir + "/var/cache/edb", 0775) |
| 88 | # chown to root:portage |
88 | # chown to root:portage |
| 89 | try: |
89 | try: |
| 90 | counter_f = open(self._chroot_dir + "/var/cache/edb/counter", "w") |
90 | counter_f = open(self._chroot_dir + "/var/cache/edb/counter", "w") |
| 91 | counter_f.write(str(counter)) |
91 | counter_f.write(str(counter)) |
| 92 | counter_f.close() |
92 | counter_f.close() |