I'd rather see the path for the RPMs built using the defined value from the macros, since the ouput directory is completely dependent upon the ~/.rpmmacros file, and not hard-coded like we do with the debs.
Patches replacing this one to follow shortly. -- Jacob Helwig On Wed, 06 Oct 2010 23:09:43 -0700, Igal Koshevoy wrote: > Date: Wed, 6 Oct 2010 23:09:43 -0700 > From: Igal Koshevoy <i...@pragmaticraft.com> > To: puppet-dev@googlegroups.com > Cc: Igal Koshevoy <i...@pragmaticraft.com> > Subject: [Puppet-dev] [PATCH/puppet-dashboard 3/3] (#4513) Improve > packaging > tasks to show path to newly-created packages. > X-Mailer: git-send-email 1.7.2.3 > Message-Id: <1286431783-30247-3-git-send-email-i...@pragmaticraft.com> > > > Signed-off-by: Igal Koshevoy <i...@pragmaticraft.com> > --- > lib/tasks/package.rake | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/lib/tasks/package.rake b/lib/tasks/package.rake > index 1e58e57..c2b5e41 100644 > --- a/lib/tasks/package.rake > +++ b/lib/tasks/package.rake > @@ -10,6 +10,7 @@ namespace :package do > > begin > sh cmd > + puts "** Created package: "+ > latest_file(File.expand_path(File.join(RAILS_ROOT, 'tmp', 'packages', 'deb', > '*.deb'))) > rescue > puts <<-HERE > !! Building the .deb failed! > @@ -44,6 +45,7 @@ namespace :package do > > begin > sh cmd > + puts "** Created package: "+ > latest_file(File.expand_path(File.join('~', 'rpmbuild', 'RPMS', 'noarch', > '*.rpm'))) > rescue > puts <<-HERE > !! Building the '.rpm's failed! > @@ -109,4 +111,10 @@ $RPM_BUILD_ROOT %{buildroot} > > return build > end > + > + # Return the file with the latest mtime matching the String filename glob > (e.g. "foo/*.bar"). > + def latest_file(glob) > + require 'find' > + return FileList[glob].map{|path| [path, > File.mtime(path)]}.sort_by(&:last).map(&:first).last > + end > end > -- > 1.7.2.3 >
signature.asc
Description: Digital signature