yum --installroot should use /etc/yum.repos.d?











up vote
2
down vote

favorite












I have a chroot environment in a directory. I want to install some RPM packages using the repositories in that chroot environment instead of the host OS ones.



yum --installroot= will look for packages repositories only in myroot/etc/yum.repos.d or it will only/also look in /etc/yum/repos.d? RHEL 6 is having the latter behavior. If that is expected behavior, what is the best method to achieve what I need?



Thanks in advance.










share|improve this question


























    up vote
    2
    down vote

    favorite












    I have a chroot environment in a directory. I want to install some RPM packages using the repositories in that chroot environment instead of the host OS ones.



    yum --installroot= will look for packages repositories only in myroot/etc/yum.repos.d or it will only/also look in /etc/yum/repos.d? RHEL 6 is having the latter behavior. If that is expected behavior, what is the best method to achieve what I need?



    Thanks in advance.










    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I have a chroot environment in a directory. I want to install some RPM packages using the repositories in that chroot environment instead of the host OS ones.



      yum --installroot= will look for packages repositories only in myroot/etc/yum.repos.d or it will only/also look in /etc/yum/repos.d? RHEL 6 is having the latter behavior. If that is expected behavior, what is the best method to achieve what I need?



      Thanks in advance.










      share|improve this question













      I have a chroot environment in a directory. I want to install some RPM packages using the repositories in that chroot environment instead of the host OS ones.



      yum --installroot= will look for packages repositories only in myroot/etc/yum.repos.d or it will only/also look in /etc/yum/repos.d? RHEL 6 is having the latter behavior. If that is expected behavior, what is the best method to achieve what I need?



      Thanks in advance.







      yum chroot






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 2 '13 at 21:23









      Alan Evangelista

      1114




      1114






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          I you start yum from within the chroot, it will only look in myroot/etc/yum.repos.d. If you start it from the normal system, it will always look in /etc/yum.repos.d.



          So just start yum from within chroot. Of course you will first have to install yum and everything needed for it in the chroot.






          share|improve this answer




























            up vote
            0
            down vote













            For all yum dists you can define your own configuration by:



            yum -c myyum.conf --installroot=....


            and create the myyum.conf file e.g.



            [main]
            cachedir=/var/cache/yum/$basearch/$releasever
            keepcache=1
            debuglevel=1
            logfile=/yum.log
            exactarch=1
            obsoletes=1
            gpgcheck=1
            plugins=1
            installonly_limit=5
            distroverpkg=centos-release
            reposdir=./my_yum.repos.d/
            metadata_expire=90m
            http_caching=all
            color=off


            which will in this case look for the repos in ./my_yum.repos.d/






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f577057%2fyum-installroot-should-use-etc-yum-repos-d%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              I you start yum from within the chroot, it will only look in myroot/etc/yum.repos.d. If you start it from the normal system, it will always look in /etc/yum.repos.d.



              So just start yum from within chroot. Of course you will first have to install yum and everything needed for it in the chroot.






              share|improve this answer

























                up vote
                1
                down vote













                I you start yum from within the chroot, it will only look in myroot/etc/yum.repos.d. If you start it from the normal system, it will always look in /etc/yum.repos.d.



                So just start yum from within chroot. Of course you will first have to install yum and everything needed for it in the chroot.






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  I you start yum from within the chroot, it will only look in myroot/etc/yum.repos.d. If you start it from the normal system, it will always look in /etc/yum.repos.d.



                  So just start yum from within chroot. Of course you will first have to install yum and everything needed for it in the chroot.






                  share|improve this answer












                  I you start yum from within the chroot, it will only look in myroot/etc/yum.repos.d. If you start it from the normal system, it will always look in /etc/yum.repos.d.



                  So just start yum from within chroot. Of course you will first have to install yum and everything needed for it in the chroot.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 7 '13 at 14:42









                  etagenklo

                  33116




                  33116
























                      up vote
                      0
                      down vote













                      For all yum dists you can define your own configuration by:



                      yum -c myyum.conf --installroot=....


                      and create the myyum.conf file e.g.



                      [main]
                      cachedir=/var/cache/yum/$basearch/$releasever
                      keepcache=1
                      debuglevel=1
                      logfile=/yum.log
                      exactarch=1
                      obsoletes=1
                      gpgcheck=1
                      plugins=1
                      installonly_limit=5
                      distroverpkg=centos-release
                      reposdir=./my_yum.repos.d/
                      metadata_expire=90m
                      http_caching=all
                      color=off


                      which will in this case look for the repos in ./my_yum.repos.d/






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        For all yum dists you can define your own configuration by:



                        yum -c myyum.conf --installroot=....


                        and create the myyum.conf file e.g.



                        [main]
                        cachedir=/var/cache/yum/$basearch/$releasever
                        keepcache=1
                        debuglevel=1
                        logfile=/yum.log
                        exactarch=1
                        obsoletes=1
                        gpgcheck=1
                        plugins=1
                        installonly_limit=5
                        distroverpkg=centos-release
                        reposdir=./my_yum.repos.d/
                        metadata_expire=90m
                        http_caching=all
                        color=off


                        which will in this case look for the repos in ./my_yum.repos.d/






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          For all yum dists you can define your own configuration by:



                          yum -c myyum.conf --installroot=....


                          and create the myyum.conf file e.g.



                          [main]
                          cachedir=/var/cache/yum/$basearch/$releasever
                          keepcache=1
                          debuglevel=1
                          logfile=/yum.log
                          exactarch=1
                          obsoletes=1
                          gpgcheck=1
                          plugins=1
                          installonly_limit=5
                          distroverpkg=centos-release
                          reposdir=./my_yum.repos.d/
                          metadata_expire=90m
                          http_caching=all
                          color=off


                          which will in this case look for the repos in ./my_yum.repos.d/






                          share|improve this answer












                          For all yum dists you can define your own configuration by:



                          yum -c myyum.conf --installroot=....


                          and create the myyum.conf file e.g.



                          [main]
                          cachedir=/var/cache/yum/$basearch/$releasever
                          keepcache=1
                          debuglevel=1
                          logfile=/yum.log
                          exactarch=1
                          obsoletes=1
                          gpgcheck=1
                          plugins=1
                          installonly_limit=5
                          distroverpkg=centos-release
                          reposdir=./my_yum.repos.d/
                          metadata_expire=90m
                          http_caching=all
                          color=off


                          which will in this case look for the repos in ./my_yum.repos.d/







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 20 at 7:53









                          Danny Goossen

                          1211




                          1211






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f577057%2fyum-installroot-should-use-etc-yum-repos-d%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]