From 8b689a438e3cda411bc2c045d33537a1d49bf3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Fri, 16 Jun 2006 16:58:55 +0000 Subject: [PATCH] =?UTF-8?q?Program=20sonland=C4=B1r=C4=B1ld=C4=B1.=20pisi.?= =?UTF-8?q?util.FileError:=20Girdi/=C3=87=C4=B1kt=C4=B1=20hatas=C4=B1:=20/?= =?UTF-8?q?etc/init.d=20dosyas=C4=B1n=C4=B1n=20SHA1=20kontrol=20toplam?= =?UTF-8?q?=C4=B1=20hesaplanam=C4=B1yor=20Genel=20yard=C4=B1m=20i=C3=A7in?= =?UTF-8?q?=20l=C3=BCtfen=20'pisi=20help'=20komutunu=20kullan=C4=B1n=C4=B1?= =?UTF-8?q?z.=20Geri-iz:=20=20=20File=20"/usr/bin/pisi",=20line=2084,=20in?= =?UTF-8?q?=20=3F=20=20=20=20=20cli.run=5Fcommand()=20=20=20File=20"/usr/l?= =?UTF-8?q?ib/pardus/pisi/cli/pisicli.py",=20line=20111,=20in=20run=5Fcomm?= =?UTF-8?q?and=20=20=20=20=20self.command.run()=20=20=20File=20"/usr/lib/p?= =?UTF-8?q?ardus/pisi/cli/commands.py",=20line=20534,=20in=20run=20=20=20?= =?UTF-8?q?=20=20pisi.api.install(self.args,=20ctx.get=5Foption('reinstall?= =?UTF-8?q?'))=20=20=20File=20"/usr/lib/pardus/pisi/operations.py",=20line?= =?UTF-8?q?=2067,=20in=20install=20=20=20=20=20return=20install=5Fpkg=5Ffi?= =?UTF-8?q?les(packages)=20=20=20File=20"/usr/lib/pardus/pisi/operations.p?= =?UTF-8?q?y",=20line=20173,=20in=20install=5Fpkg=5Ffiles=20=20=20=20=20at?= =?UTF-8?q?omicoperations.install=5Fsingle=5Ffile(dfn[x])=20=20=20File=20"?= =?UTF-8?q?/usr/lib/pardus/pisi/atomicoperations.py",=20line=20406,=20in?= =?UTF-8?q?=20install=5Fsingle=5Ffile=20=20=20=20=20Install(pkg=5Flocation?= =?UTF-8?q?).install(not=20upgrade)=20=20=20File=20"/usr/lib/pardus/pisi/a?= =?UTF-8?q?tomicoperations.py",=20line=20109,=20in=20install=20=20=20=20?= =?UTF-8?q?=20self.extract=5Finstall()=20=20=20File=20"/usr/lib/pardus/pis?= =?UTF-8?q?i/atomicoperations.py",=20line=20283,=20in=20extract=5Finstall?= =?UTF-8?q?=20=20=20=20=20Remove.remove=5Ffile(=20old=5Ffileinfo[path]=20)?= =?UTF-8?q?=20=20=20File=20"/usr/lib/pardus/pisi/atomicoperations.py",=20l?= =?UTF-8?q?ine=20483,=20in=20remove=5Ffile=20=20=20=20=20if=20os.path.exis?= =?UTF-8?q?ts(fpath)=20and=20pisi.util.sha1=5Ffile(fpath)=20=3D=3D=20filei?= =?UTF-8?q?nfo.hash:=20=20=20File=20"/usr/lib/pardus/pisi/util.py",=20line?= =?UTF-8?q?=20449,=20in=20sha1=5Ffile=20=20=20=20=20raise=20FileError(=5F(?= =?UTF-8?q?"I/O=20Error:=20Cannot=20calculate=20SHA1=20hash=20of=20%s")=20?= =?UTF-8?q?%=20filename)=20DEBUG:=20PISI=20API=20finalized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/atomicoperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 53f49d9d..ca7cbefa 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -479,7 +479,7 @@ class Remove(AtomicOperation): elif fileinfo.type == ctx.const.conf: # config files are precious, leave them as they are # unless they are the same as provided by package. - if os.path.exists(fpath) and pisi.util.sha1_file(fpath) == fileinfo.hash: + if (os.path.isfile(fpath) or os.path.islink(fpath)) and os.path.exists(fpath) and pisi.util.sha1_file(fpath) == fileinfo.hash: os.unlink(fpath) else: if os.path.isfile(fpath) or os.path.islink(fpath):