Fedora 7: "Add/Remove Software" from DVD

Hi,
This is my method of solving the add remove program problem in Fedora Core and Fedora 7.

After first installation

  1. create a softlink to the Fedora cdrom 's root directory inside /media directory so that /media/fedora should show the content of /media/Fedora 7 DVD drive .
  2. Now insert the DVD and mount that ( by default it will be mounted)
  3. Edit /etc/yum.conf and put the following line there


  4. reposdir=/dev/null[MyLocalRepo]
    name=local
    baseurl=file:///media/fedora
    gpgkey=file:///media/fedora/RPM-PGP-KEY-fedora ( and may include other files too)

    --------------
  5. There is a bug https://bugzilla.redhat.com/bugzill...g.cgi?id=241604 So need some modification in a .py file. So add the following two lines in to /usr/lib/python2.5/site-packages/yum/packages.py at line 485


  6. so the section becomes

    def getDiscNum(self):
    if self.basepath is None:
    return None
    (scheme, netloc, path, query, fragid) = urlparse.urlsplit(self.basepath)
    if scheme == "media":
    if len(fragid) == 0:
    return None
    return int(fragid)
    return None
    --------------------------------
    Remember not to change any indentation of the .py file. Python uses indentation for the loops
  7. Now when you restart the Add Remove program it will ask to import the PGP keys.



Thats it.. It is done. Now any time it is required to install some software from the DVD .. just put the DVD and start Add Remove Program.

(Note you must run the first yum command as root even if it is just 'yum list available', since yum needs to create a directory in /var/cach/yum for the local repo)

0 comments: