File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ def create_reboot_required_file(self):
144144 If a reboot is needed, create a /run/reboot-required file.
145145 This is how Debian/Ubuntu distros does it.
146146 """
147- if self .applications .count_type (Applications .TYPES ["STATIC" ]):
147+ if os . getuid () == 0 and self .applications .count_type (Applications .TYPES ["STATIC" ]):
148148 with open ("/run/reboot-required" , "w" ) as fp :
149149 fp .write ("Tracer says reboot is required for:\n " )
150150 for app in self .applications .filter_types ([Applications .TYPES ["STATIC" ]]).unique ().sorted ("name" ):
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def packages_newer_than(self, unix_time):
8282 try :
8383 packages = PackagesCollection ()
8484 sqlite = self ._database_file ()
85- conn = sqlite3 .connect (sqlite )
85+ conn = sqlite3 .connect ('file:' + sqlite + '?mode=ro' , uri = True )
8686 conn .row_factory = sqlite3 .Row
8787 cursor = conn .cursor ()
8888 cursor .execute (sql , [unix_time ])
You can’t perform that action at this time.
0 commit comments