LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-10-2004, 11:15 AM   #1
Nikon01
Member
 
Registered: Jul 2003
Distribution: Slackware 10.0
Posts: 196

Rep: Reputation: 30
how do I out what a pkg is named?


Well I'm curious because I want to try reinstalling wine and am not sure what the pkg was named. All the more reason I think I just need to compile from source now lol.

Anyways if anyone knows how I would greatly appreciate it.
 
Old 08-10-2004, 11:17 AM   #2
blueCow
Member
 
Registered: Feb 2004
Location: Florida
Distribution: FreeBSD, CentOS, Debian, Mint
Posts: 111

Rep: Reputation: 17
Most likely it is called wine-something. run pkgtool and go to remove and scroll down to W. you should see it there if you used installpkg.
 
Old 08-10-2004, 11:19 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
The package should be named something like Wine-20040716-i686-S9nodebug.tgz in pkgtools if it were installed from a .tgz package (and not compiled from source without the use of 'makeinstall')

to save you the hassle of compiling from source (unless you're determined and know what you're doing), try the one(s) from linuxpackages.net

http://www.linuxpackages.net/search_...=wine&ver=10.0
 
Old 08-10-2004, 02:06 PM   #4
Nikon01
Member
 
Registered: Jul 2003
Distribution: Slackware 10.0
Posts: 196

Original Poster
Rep: Reputation: 30
Thanks guys

btw: Compiling from source isnt a hassle as long as you use checkinstall to make sure you can uninstall it.
 
Old 08-10-2004, 02:09 PM   #5
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
here's a handy script:

edit:make a new file called "whichpkg", paste this in and make it executable!!

Code:
#!/bin/sh
#*******************************************************************************
# Script by thegeekster of the famed linuxquestions.org
# Name: whichpkg

search_pkgs() {
  name1="/${1}\>"

  find /var/log/packages/* -type f -prune | while read file
  do
    # This makes certain assumptions about where to look, such as
    # ignoring certain directories and files which are easy to figure
    # out where the files came from:
    cat $file | egrep -A5000 'FILE\ LIST:' | egrep -i "${name1}\$"\
      | egrep -v '(FILE\ LIST:|^\./$|\<install/|\<install-sh|\<install\.sh)' \
      | egrep -v '(usr/src/linux|doc/|share/$1)' \
      | while read line
    do
      [ ! -d $file ] && echo "`basename $file`:/$line"
    done
  done

  # Due to a problem of a broken pipe when trying to find any symlinks
  # associated with the file "ln", I had to find a workaround.
  name2="\<${1}\>"
  [ "$1" = "ln" ] && name2="\<ln\>\ [^-rf]"
  [ "$1" = "rm" ] && name2="\<rm\>\ [^-rf]"

  find /var/log/scripts/* -type f -prune | while read file
  do
    cat $file | egrep -i "$name2" \
      | egrep -v '(^#|:| \<rm\ -r\>|\<if\ |\<else\ |>>|\$|\<for\ .*\ in\>|doinst\.sh)' \
      | while read line
    do
      [ ! -z "`echo $line | egrep '\<ln\ -sf' |egrep '\(\ cd'`" ] \
        && echo "`basename $file`:/`echo $line \
        | awk '{ print $3\"/\"$8\"  --linked-to->  \"$7 }'`"
      [ ! -z "`echo $line | egrep '\<mv\ '`" ] \
        && echo "`basename $file`:/`echo $line | sed 's/^.*\(\<mv\ \)/\1/' \
        | awk '{ print $2\"  --renamed-to->  \"$3 }'`"
    done
  done
}

case $1 in
  "" | -h | --help )  # If no argument is given, or -h (--help) is given,
                         # as an argument then show the usage.
    cat << "__EOF__"  | less

Usage: whichpkg FILE1 [ FILE2 ... ]

Finds which Slackware package contains the file supplied on the command
line. A filename must be supplied and more than one filenam may be used
on the command line. For pattern matching, you may use the wildcards *
and ?. For example, to find the files "bzip" and "bzip2", you may use
the pattern "bzip?" to look for both files. The search is case
insensitive (upper- or lowercase is okay). You may also enclose the
search pattern in single quotes (') or double quotes (") to avoid the
shell interpeter from interfering with the search term when using the
wildcard characters.

The output was made to be as easy as possible to read and the output
for each search term is easily identifiable. Each matching line will
look something link this:

    <package_name>:<matched_path>

For symlink matches, the output will look something like this:

    <package_name>:<matched_symlink>  -- linked to->  <real_file>

If a file was renamed when installed, the output will look something
like this:

    <package_name>:<old_filename>  -- renamed to->  <new_filename>

To give you an idea, here's a sample output for the search for the
multiple terms "sh" and "bash":

$ whichpkg sh bash
------------------------------------------------------------------------
Searching for "sh"...

aaa_base-9.1.0-noarch-1:/bin/sh  --linked to->  bash

------------------------------------------------------------------------
------------------------------------------------------------------------
Searching for "bash"...

aaa_base-9.1.0-noarch-1:/bin/sh  --linked to->  bash
bash-2.05b-i486-3:/bin/bash  --renamed to->  bin/bash.old
bash-2.05b-i486-3:/bin/bash2.new  --renamed to->  bin/bash
bash-2.05b-i486-3:/usr/bin/bash  --linked to->  /bin/bash

------------------------------------------------------------------------


HOTE: The searches will take a couple of moments for each term being
      searched and some searches may take longer than others, depending
      on the keyword used. Usually it depends on how many occurrences of
      the keyword is found, which then must be analyzed and filtered.

__EOF__
		;;
  * )
    while [ ! -z "$1" ]
    do
      i="`basename \`echo \"$1\" | sed 's/\./\\./g; s/\*/.*/; s/\?/.?/g'\``"
      echo "------------------------------------------------------------------------"
      echo -e "Searching for \"${1}\"...\n"
      search_pkgs "$i" | sort
      echo -e "\n------------------------------------------------------------------------"
      shift
    done	;;
esac

Last edited by Tuttle; 08-10-2004 at 02:22 PM.
 
Old 08-10-2004, 06:25 PM   #6
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
ls /var/log/packages #thes will list all installed packages.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting from 0 - pkg by pkg Lopes Linux - Newbie 2 07-02-2005 01:42 AM
X pkg. bruse Linux - Newbie 1 05-02-2005 01:09 AM
named -u named at startup zzero Linux - Newbie 4 03-16-2004 12:08 AM
cannot find named.conf and /var/named kaushikma Red Hat 1 02-07-2004 12:49 PM
Virtual Host type, named or IP via SSL? Named VH is not possible? piratebiter Linux - Security 3 08-20-2003 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration