PDA

View Full Version : Making a script for package removal but DPKG-QUERY ?



kayl
03-01-2004, 09:11 PM
Most people have seen:

dpkg-query -W --showformat='\${Installed-Size} \${Package}\n'

which lists packages with their size. I'm looking for a similar command that lists packages with their description and this isn't working properly:

dpkg-query -W --showformat='${Package} ${Description}\n'

I'm want to write a script that helps you build a decent kick list for customization.

WSC-fsl
03-03-2004, 05:45 AM
This is not quite an answer to your question as much as it is a suggestion that might steer you into a direction.

When I first started remastering KNOPPIX I wanted it small. My current KNOPPIX size with KDE etc. is 460 MB. ... Moving on... I wasn't sure what to remove. So to make my original kicklist I did this:

apt-get remove x[tab][tab]

- where 'x' is a letter of the alphabet followed by 2 strikes of the 'tab' key. This should list all installed packages that start with that letter/number.

Then to see a program description I would:

dpkg -l filename

- where 'filename' is the name of the installed package you want to see a description of, pulled from the displayed list that is generated by the above apt-get command.

Hope this helps,

fsl

jaybinks
03-03-2004, 07:40 AM
how small did you get it ??
can I get a copy of your kicklist etc..
Im having so much trouble getting my knoppix to remove everything I need, I run into depend problems.

Ghandalfar
03-03-2004, 10:26 PM
Check firefox.iso in morphix sf.net downloads lists.. it's around 92Mb and it has only firefox. I'm sure you can work from there on. I'm working on even smaller version.

kayl
03-04-2004, 04:28 AM
Thanks but I found a work-around...

For those interested, the script so far goes through every installed package sorted by size descending, its version, size, what packages are dependant on it and its description. Then it asks you whether to move it to a KICK list or a KEEP list.

Given there are 1197 packages, you can save.

Still need to add "move from KICK", "move from KEEP" and "check dependencies".

I remastered KNOPPIX_V3.3-2004-02-16-EN.iso sans mozilla just to see if I could. It worked. This is my latest time eater. :?

acid_zebra
03-04-2004, 03:25 PM
I was fumbling around with these scripts as well and in the end I thought bugger this and did apt-get install synaptic

problem solved ;)

kayl
03-09-2004, 09:51 PM
:?
root@ttyp1[/]# synaptic
(synaptic:4788): Gtk-WARNING **: cannot open display:

Which is odd since I can run Gtkam and efax-gtk which would seem to implay Gtk is configured properly...

Stephen
03-09-2004, 10:17 PM
:?
root@ttyp1[/]# synaptic
(synaptic:4788): Gtk-WARNING **: cannot open display:

Which is odd since I can run Gtkam and efax-gtk which would seem to implay Gtk is configured properly...

Try adding this to your /root/.bashrc.


# Allows me to run an X program as root
export XAUTHORITY=/home/stephen/.Xauthority


You would of course change the stephen in the line to your users name then while still in the console window source /root/.bashrc to re-read the file with the new settings and you should be able to run the program.

kayl
03-10-2004, 02:21 AM
Created:

export XAUTHORITY=/home/knoppix/.Xauthority

in /root/.bashrc and source'd it.

Same output.

acid_zebra
03-10-2004, 04:06 PM
It's probably not the right thing to do, but I always do

chroot /dev/hdx/KNOPPIX (chroot into your building environment)
DISPLAY=x.x.x.x:0.0 (where x.x.x.x is the IP address of the machine I'm running the knoppix CD on)
export DISPLAY
synaptic

and it runs...

kayl
03-11-2004, 01:04 AM
Excellent.

root@ttyp0[/]# DISPLAY=127.0.0.1:0.0
root@ttyp0[/]# export DISPLAY
root@ttyp0[/]# synaptic

Seems to make things work... now I'm playing with packages.

Thanks.

pap2003
03-11-2004, 12:01 PM
Are these scripts available someplace. Can we have a look at them.
Seems insteresting enough

pap

kayl
03-13-2004, 05:23 AM
Sadly, you're better off using synaptic. :wink: