public
Description: A bleeding-edge package manager.
Homepage: http://roastbeef.rubyforge.org
Clone URL: git://github.com/technomancy/roast-beef.git
rearranged lib and updated doco
technomancy (author)
Fri Mar 14 20:15:17 -0700 2008
commit  d317af89d15e1771c67f5881d918f92a0a30b4fd
tree    d0ee4645e467f0ae25a5f95aca826f79c56c525f
parent  28ee5b62830a8a29536c6cd8bb60c4a194f0bde3
...
4
5
6
7
8
9
10
11
12
13
14
 
 
 
 
 
 
15
...
4
5
6
 
 
 
7
 
 
 
 
8
9
10
11
12
13
14
0
@@ -4,12 +4,11 @@ Manifest.txt
0
 README.txt
0
 Rakefile
0
 bin/roastbeef
0
-lib/apt_get.rb
0
-lib/package.rb
0
-lib/package_manager.rb
0
 lib/roastbeef.rb
0
-lib/scms/bzr_package.rb
0
-lib/scms/cvs_package.rb
0
-lib/scms/git_package.rb
0
-lib/scms/svn_package.rb
0
+lib/roastbeef/package.rb
0
+lib/roastbeef/package_manager.rb
0
+lib/roastbeef/scms/bzr_package.rb
0
+lib/roastbeef/scms/cvs_package.rb
0
+lib/roastbeef/scms/git_package.rb
0
+lib/roastbeef/scms/svn_package.rb
0
 spec/roastbeef_spec.rb
...
6
7
8
9
10
11
12
13
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
16
17
18
 
19
 
20
21
22
23
24
 
 
 
25
26
27
...
38
39
40
 
41
42
43
 
44
45
46
...
6
7
8
 
 
 
 
 
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
29
30
31
32
 
33
 
 
34
35
36
37
38
39
...
50
51
52
53
54
55
56
57
58
59
60
0
@@ -6,22 +6,34 @@
0
 
0
 uh ok so roast beef is some kind of package manager that is for
0
 bleeding-edge programs. so basically it does not have its own
0
-repositories. instead it just will download such as a package from the
0
-upstream repository and will do all the necessary steps. you know like
0
-configure compile and install or sometimes just install. it depends on
0
-the package because a lot of them are different. you get things that
0
-are as fresh as possible. i am talking about really fresh like your
0
-eggs and milk.
0
+repositories. instead it just will download source from the upstream
0
+repository and will do all the necessary steps to install . you get
0
+things that are as fresh as possible. i am talking about really fresh
0
+like your eggs and milk.
0
+
0
+roast beef saves you from having to look up the repository locations
0
+for all the stuff you want to build from source. it also abstracts
0
+away the differences in build processes. say you want the latest
0
+version of such a package as gnu emacs. so you grab the source but you
0
+know emacs is a little different from other packages and requires
0
+"make bootstrap" in between the configure and make step. with
0
+roastbeef all the complexity of such things is hidden from you. and if
0
+you have a lot of stuff built from source you can keep them all up to
0
+date with a single command.
0
+
0
+the motivations behind this are made more clear in a blog post:
0
+http://technomancy.us/106
0
 
0
 == man why you even got to do a thing
0
 
0
-* roastbeef install $PACKAGE
0
+usage:
0
 
0
+* roastbeef install package
0
 * roastbeef update
0
-
0
 * roastbeef upgrade
0
-
0
-* roastbeef remove $PACKAGE
0
+* roastbeef remove package
0
+* roastbeef show package
0
+* roastbeef search term
0
 
0
 == but say you wanted to install it
0
 
0
@@ -38,9 +50,11 @@ or once you have it installed do this
0
 
0
 * accept optional configure arguments
0
 * allow for rebuilds to be simpler commands than initial builds
0
+* user-defined source listings
0
 * any-system prereqs
0
 * manual prereqs
0
 * uh... specs/tests? In a vm?
0
+* support firefox extensions?
0
 
0
 these things i am not going to work on but will accept patches for
0
 * mac os x, gentoo, bsd, fedora support
...
3
4
5
6
7
8
9
...
13
14
15
 
16
17
18
19
20
21
 
22
23
24
...
26
27
28
 
 
 
 
 
29
...
3
4
5
 
6
7
8
...
12
13
14
15
16
17
18
19
20
 
21
22
23
24
...
26
27
28
29
30
31
32
33
34
0
@@ -3,7 +3,6 @@
0
 require 'rubygems'
0
 require 'hoe'
0
 require './lib/roastbeef.rb'
0
-# require 'spec/rake/spectask'
0
 
0
 Hoe.new('roastbeef', RoastBeef::VERSION) do |p|
0
   p.rubyforge_name = 'roastbeef'
0
@@ -13,12 +12,13 @@ Hoe.new('roastbeef', RoastBeef::VERSION) do |p|
0
   p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
0
   p.url = 'http://roastbeef.rubyforge.org'
0
   p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
0
+ p.remote_rdoc_dir = ''
0
 end
0
 
0
 desc "Code statistics"
0
 task :stats do
0
   require 'code_statistics'
0
- CodeStatistics.new(['lib'], ['spec']).to_s
0
+ CodeStatistics.new(['lib']).to_s
0
 end
0
 
0
 desc "Show todo items"
0
@@ -26,4 +26,9 @@ task :todo do
0
   system "grep -r TODO lib"
0
 end
0
 
0
+desc "Run the specs in a VM"
0
+task :spec do
0
+ # TODO: uh... launch a VM; SSH into it, checkout the project and run the specs?
0
+end
0
+
0
 # vim: syntax=Ruby
...
2
3
4
5
6
7
8
9
10
 
11
12
13
14
 
 
 
 
15
16
17
...
2
3
4
 
 
 
 
 
 
5
6
 
 
 
7
8
9
10
11
12
13
0
@@ -2,16 +2,12 @@
0
 
0
 require 'lib/roastbeef'
0
 
0
-if ARGV.empty?
0
- puts RoastBeef::USAGE
0
- exit 1
0
-end
0
-
0
-command = ARGV.shift
0
+puts(RoastBeef::USAGE) || exit(1) if ARGV.empty? or ARGV.include?('--help') or ARGV.include?('-h') or ARGV.include?('-?')
0
 
0
-if RoastBeef.respond_to?(command)
0
- RoastBeef.send(command, ARGV.first)
0
-else
0
+begin
0
+ RoastBeef.send(*ARGV)
0
+rescue NoMethodError
0
+ puts "Unrecognized command #{ARGV.first}.\n\n"
0
   puts RoastBeef::USAGE
0
   exit 1
0
 end
...
1
 
 
 
 
2
3
4
5
6
7
8
9
 
 
 
 
10
11
12
13
14
15
16
17
18
19
 
20
21
22
...
55
56
57
58
 
59
60
61
...
 
1
2
3
4
5
6
 
7
8
9
 
 
10
11
12
13
14
15
16
 
 
 
 
 
 
 
17
18
19
20
...
53
54
55
 
56
57
58
59
0
@@ -1,22 +1,20 @@
0
-$LOAD_PATH << File.dirname(__FILE__)
0
+$LOAD_PATH << File.dirname(__FILE__) + '/roastbeef'
0
+
0
+require 'yaml'
0
+require 'open-uri'
0
 
0
 require 'package_manager'
0
-require 'apt_get'
0
 require 'package'
0
 
0
 module RoastBeef
0
- VERSION = '0.0.1'
0
- USAGE = "uh ok so roast beef is some kind of package manager that uses upstream
0
+ VERSION = '0.0.2'
0
+ USAGE = "roastbeef #{VERSION}
0
+
0
+uh ok so roast beef is some kind of package manager that uses upstream
0
 repositories instead of maintaining its own. basically it helps you download
0
 configure and install the newest version of a program.
0
 
0
-usage:
0
- roastbeef install package
0
- roastbeef update
0
- roastbeef upgrade
0
- roastbeef remove package
0
- roastbeef show package
0
- roastbeef search term
0
+#{File.read(File.dirname(__FILE__) + '/../README.txt').split(/==.*$/)[2].strip}
0
 
0
 of course you can find out more things at http://roastbeef.rubyforge.org"
0
 
0
@@ -55,7 +53,7 @@ of course you can find out more things at http://roastbeef.rubyforge.org"
0
   # searches the name and description of all packages
0
   def search(term)
0
     term = Regexp.new(Regexp.escape(term)) if term.is_a? String
0
- listing.map { |name, meta| puts Package.find(name).to_s if name + meta['description'] =~ term }
0
+ Package.all.select{ |p| p.inspect =~ term }.map{ |pack| puts pack.to_s }
0
   end
0
 
0
   def show(name)
...
5
6
7
8
 
9
10
11
...
15
16
17
18
 
19
20
21
...
77
78
79
80
 
81
82
83
...
5
6
7
 
8
9
10
11
...
15
16
17
 
18
19
20
21
...
77
78
79
 
80
81
82
83
0
@@ -5,7 +5,7 @@ augment:
0
   url: http://augment.rubyforge.org
0
   repository: git://github.com/technomancy/augment.git
0
   build:
0
- - sudo rake install_gem
0
+ - rake install_gem
0
   remove:
0
   - sudo rake uninstall
0
   scm: git
0
@@ -15,7 +15,7 @@ bus-scheme:
0
   url: http://bus-scheme.rubyforge.org
0
   repository: git://github.com/technomancy/bus-scheme.git
0
   build:
0
- - sudo rake install_gem
0
+ - rake install_gem
0
   remove:
0
   - sudo rake uninstall
0
   scm: git
0
@@ -77,7 +77,7 @@ roastbeef:
0
   url: http://roastbeef.rubyforge.org
0
   repository: git://github.com/technomancy/roast-beef.git
0
   build:
0
- - sudo rake install_gem
0
+ - rake install_gem
0
   remove:
0
   - sudo rake uninstall
0
   scm: git
...
1
2
 
 
 
3
4
5
 
 
6
7
8
9
 
10
11
12
13
14
 
 
15
16
 
17
18
19
 
 
 
 
 
20
21
22
...
42
43
44
 
45
...
 
 
1
2
3
4
 
 
5
6
7
 
 
 
8
9
 
 
 
 
10
11
12
 
13
14
15
16
17
18
19
20
21
22
23
24
...
44
45
46
47
48
0
@@ -1,22 +1,24 @@
0
-$LOAD_PATH << File.dirname(__FILE__)
0
-require 'spec_helper'
0
+#!/usr/bin/env ruby
0
+require 'rubygems'
0
+require 'rspec'
0
 
0
-# TODO: we could do this by futzing with SRC_DIR and forcing configure
0
-# to install somewhere custom, but we can't do custom configures yet.
0
+$LOAD_PATH << File.dirname(__FILE__) + '../lib'
0
+require 'roastbeef'
0
 
0
-# OR: a chroot. that would be perfect.
0
-
0
-puts "These specs should run in a virtual machine since they will
0
+raise "These specs should run in a virtual machine since they will
0
 drastically alter the state of the system they run on. If you are on a
0
-VM right now (or do not mind getting your packages hosed), press
0
-Enter. Otherwise this would be a good time to hit control-C."
0
-
0
-gets
0
+VM right now (or do not mind getting your packages hosed), run this script
0
+with the argument --ok-to-hose-this-system." unless ARGV.include?('--ok-to-hose-this-system')
0
 
0
-describe RoastBeef, 'installing packages' do
0
+describe Package, 'installing packages' do
0
   it "should install cvs packages"
0
   it "should install svn packages"
0
   it "should install git packages"
0
+ it "should install bzr packages"
0
+end
0
+
0
+describe Package, ' warnings' do
0
+ it "should warn about unremovable packages"
0
   it "should warn about package breakage"
0
   it "should warn about repositories being down"
0
 end
0
@@ -42,4 +44,5 @@ end
0
 describe RoastBeef, ' performing initial setup' do
0
   it "should perform initial setup if LISTING_FILENAME or SRC_DIR doesn't exist"
0
   it "should perform initial setup if a compiler can't be found"
0
+ it "should not perform initial setup if it's run before successfully"
0
 end

Comments

    No one has commented yet.