# File lib/cft.rb, line 237 def preserve_changes() # Figure out what was changed and squirrel that away tgt = session.source unless File::directory?(tgt) FileUtils::mkdir_p(tgt) end @changes.keys.each do |c| Cft::log("#{c} :: #{@changes[c].join(' ')}") if File::exist?(c) mkpath(c, tgt) d = File::join(tgt, c) Cft::log("cp -pr #{c} #{d}") # FileUtils::cp_r barfs when you try to copy symlinks # which might become dangling and you use :preserve system("cp -prT #{c} #{d}") end end Cft::RPM::PackageFile::genlist(session.path(:rpm_files), @changes.keys) end