Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location of cache and pkg dirs for chain recipes #130

Open
glensc opened this issue Sep 9, 2015 · 0 comments
Open

location of cache and pkg dirs for chain recipes #130

glensc opened this issue Sep 9, 2015 · 0 comments

Comments

@glensc
Copy link
Contributor

glensc commented Sep 9, 2015

while chain_recipe supports locating chain_recipes from subdirs, i would still expect it's results be stored where main recipe resides, not aside subrecipe.

also clean command does not wipe dirs from subrecipes with current situation, then that would be solved as well.

here's the setup:

# cat recipe.rb 
class TestChain < FPM::Cookery::Recipe
        name    'test'
        version '1.0'

        source '', :with => :noop
        arch        'all'

        def build
        end

        def install
        end

        chain_package true
        chain_recipes 'recipes/fe'
        chain_recipes 'recipes/admin'
end

# cat recipes/fe.rb 
class Fe < FPM::Cookery::Recipe
        description 'Fe Test'
        name        'fe'
        version     '1.0'
        revision    '1'

        source      "https://github.com/bernd/fpm-cookery/trunk", :with => :svn
        arch        'all'

        def build
        end

        def install
        end
end

# cat recipes/admin.rb 
class Admin < FPM::Cookery::Recipe
        description 'Admin Test'
        name        'admin'
        version     '1.0'
        revision    '1'

        source      "https://github.com/bernd/fpm-cookery/trunk", :with => :svn
        arch        'all'

        def build
        end

        def install
        end
end

# ls -lR
.:
total 4
-rw-rw-r-- 1 vagrant vagrant 237 Sep  9 11:00 recipe.rb
drwxrwxr-x 1 vagrant vagrant  33 Sep  9 11:03 recipes/

./recipes:
total 8
-rw-rw-r-- 1 vagrant vagrant 251 Sep  9 10:56 admin.rb
-rw-rw-r-- 1 vagrant vagrant 242 Sep  8 12:09 fe.rb

and outcome:

# fpm-cook package -p centos
...

# find -name cache -o -name pkg -o -name '*.rpm' -o -name 'tmp-*'
./recipes/cache
./recipes/tmp-build
./recipes/pkg
./recipes/pkg/fe-1.0-1.noarch.rpm
./recipes/pkg/admin-1.0-1.noarch.rpm
./recipes/tmp-dest
./cache
./tmp-build
./tmp-dest
./pkg
./pkg/test-1.0-1.noarch.rpm

# fpm-cook clean -p centos 
===> Cleanup!

# find -name cache -o -name pkg -o -name '*.rpm' -o -name 'tmp-*'
./recipes/cache
./recipes/tmp-build
./recipes/pkg
./recipes/pkg/fe-1.0-1.noarch.rpm
./recipes/pkg/admin-1.0-1.noarch.rpm
./recipes/tmp-dest
./cache
./pkg
./pkg/test-1.0-1.noarch.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant