Re: Request for volunteers to help track down packages that use /usr/X11R6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-08-30 at 23:40 -0400, Mike A. Harris wrote:
> What we'd like volunteers to help with:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1) A lot of existing Fedora Core, Fedora Extras and other 3rd
>     party packages currently install themselves into /usr/X11R6,
>     need to be updated to install themselves in a more
>     appropriate location under /usr, using %{_datadir} and
>     friends in their rpm specfiles.  Volunteers are needed who
>     are willing to take on the task of reporting bugs against
>     the offending packages, and preferably also attaching
>     patches to fix the rpms.

I'm attaching a quick and dirty python hack that can extract this from a
yum filelist cache.  You can run it if you like or give me the following
information and I can do it:

1) I'm scanning for inclusion of the following partial pathnames:
  /usr/X11
  /usr/bin/X11
  /usr/lib/X11
  /usr/lib64/X11

  Are any of these wrong?  Are there any more you can think of?

2) Which repositories do you want it run against?  development,
development-extras, livna-*, ?

3) Which packages should I exclude from a final report?  Anything with
xorg-x11 in front of it?  Report it all and you'll sift the xorg
packages out?

How to run the script as is:
As root enable the repositories you wish to scan in /etc/yum.repos.d/*
and disable the rest.
rm -f /var/cache/yum/*/filelists.xml.gz
yum provides /some/nonexistent/pathname/here

As normal user:
python scandir.py| sort | uniq >/var/tmp/x11-pkgs

-Toshio
#! /usr/bin/python
#
# File: scandir.py
# Author: Toshio Kuratomi <toshio@xxxxxxxxxxxxxxx>
# Date:
# Copyright: Toshio Kuratomi
# License: GPL
# Id: $Id$
'''
'''
__version__ = '0.1'
__revision__ = '$Rev$'

import os
import gzip
import re
import sys

YUMDIR='/var/cache/yum'
packageRE = re.compile(r'" name="([^"]+)" ')
       
if __name__ == '__main__':
    # look through filelist.gz in all yum directories.
    # If there is a file that installs to /usr/X11... then work on it.
    x11packages = []
    for directory in os.listdir(YUMDIR):
        if not os.path.isdir(os.path.join(YUMDIR, directory)):
            continue
        try:
            filelist = gzip.GzipFile(
                os.path.join(YUMDIR, directory, 'filelists.xml.gz'))
        except:
            continue
        fileliststring = ''.join(filelist.readlines())
        packages = fileliststring.split('<package')
        for pkg in packages:
            if (pkg.find('/usr/X11') > -1 or
                pkg.find('/usr/bin/X11') > -1 or
                pkg.find('/usr/lib/X11') > -1 or
                pkg.find('/usr/lib64/X11') > -1):

                # extract package name
                match = packageRE.search(pkg)
                # Place it into the x1packages list.
                x11packages.append(match.group(1))

    for pkg in x11packages:
        print pkg
    sys.exit(0)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux