From fd3e30c39a5a7c623c863ea0212532339e0a0930 Mon Sep 17 00:00:00 2001 From: T.C. Hollingsworth Date: Jul 06 2013 07:29:37 +0000 Subject: only run the hack when we really need to --- diff --git a/nodejs-inherits.spec b/nodejs-inherits.spec index 074f099..b5dd6ae 100644 --- a/nodejs-inherits.spec +++ b/nodejs-inherits.spec @@ -2,7 +2,7 @@ Name: nodejs-inherits Version: 2.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tiny simple way to do classic inheritance in js License: WTFPL Group: Development/Libraries @@ -42,7 +42,9 @@ rm -rf %{buildroot} # rpm blows up if you try to replace a dir with a symlink or vice-versa %pretrans -p -os.rename('%{nodejs_sitelib}/inherits', '%{nodejs_sitelib}/inherits@2') +if posix.stat("%{nodejs_sitelib}/inherits", "type") == "directory" then + os.rename('%{nodejs_sitelib}/inherits', '%{nodejs_sitelib}/inherits@2') +end %files @@ -52,6 +54,9 @@ os.rename('%{nodejs_sitelib}/inherits', '%{nodejs_sitelib}/inherits@2') %doc README.md LICENSE %changelog +* Sat Jul 06 2013 T.C. Hollingsworth - 2.0.0-3 +- only run the hack when we really need to + * Sat Jul 06 2013 T.C. Hollingsworth - 2.0.0-2 - use lua for pretrans