Re: Bad points for debian (was: resetting dpkg)

1999-12-31 Thread John Pearson
Stuart Ballard replied off-list:
On Wed, Dec 29, 1999 at 09:14:42PM +, Stuart Ballard wrote
> John Pearson wrote:
> > 
> > I've attached a three-line awk filter that should do what's required,
> > in the event it comes up again.
> > 
> > Run it as
> > # dpkg -l | reset-selections.awk | dpkg --set-selections
> 
> This unfortunately has a bug: dpkg -l truncates the package names. For
> example, gnome-control-c instead of gnome-control-center. Any thoughts
> on a workaround?
> 
> Thanks,
> Stuart.

Aargh!! reality strikes again.

The attached 50-line perl script should do the trick; it reads
/var/lib/dpkg/status directly.

Use as

 # reset-selections.pl > my-selections

to check for errors then, when you're happy,

 # dpkg --set-selections < my-selections

The script uses the status strings found in /usr/doc/dpkg/internals.html;
if they change then this script will also need changing.  It also applies
some (very) basic sanity checks to the status file as it goes, which is
why you should review the output first.  The example usage avoids piping
directly to dpkg --set-selections, to avoid *any*possibility* of
file-locking deadlocks (this shouldn't be an issue, but a broken perl
might make it so).


John P.
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark


reset-selections.pl
Description: Perl program


Re: Bad points for debian (was: resetting dpkg)

1999-12-29 Thread John Pearson
On Thu, Dec 23, 1999 at 02:11:31PM +0100, Egbert Bouwman wrote
> On Wed, Dec 22, 1999 at 10:43:05PM +0100, steve doerr wrote:
> > Is there a way to change dpkg package remove tags?  I ran dselect after
> > manually dpkg'ing postgresql and jdk and I somehow got almost everything
> > 
> You are one of many, myself included, who asked similar questions
> about resetting dselect or dpkg after they created chaos.
> We only want to start all over again with the selection process.
> I have never read a helpful reply. Does nobody know ?
> Or did we ask the wrong question ?
> 

I've attached a three-line awk filter that should do what's required,
in the event it comes up again.

Run it as
# dpkg -l | reset-selections.awk | dpkg --set-selections

to set the dselect selection status to more or less reflect the
current installation status quo.  If you've already removed
packages, this can't undo that.

Personally, after installation any changes I make are minor and gradual
enough that I find apt-get and apt-cache much friendlier tools than 
dselect.


John P.
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark
#!/usr/bin/awk -f
#
# Filter.  Use:
#
#  dpkg -l | $0 | dpkg --set-selections
#
# For people who accidentally deselected all their
# packages in dselect and want to reset things to
# reflect the status quo.
#
/^.n/  { print $2, "purge" }
/^.[iufh]/ { print $2, "install" }
/^.c/  { print $2, "deinstall" }



Re: Bad points for debian (was: resetting dpkg)

1999-12-25 Thread Laurent PICOULEAU
On Fri, 24 Dec, 1999 à 05:39:32PM +0100, Egbert Bouwman wrote:
> In this discussion it may be helpful to summarize my view on dselect-dpkg:
> 
> - the underlying mechanism seems to be very good (I do agree with everybody)
> - the user interface could be better
> - as a coherent tutorial the documentation is pretty bad, 
>   and the fact that nobody from the inner debian circle has written
>   something else has severely damaged the usability and reputation 
>   of the debian distribution.
> 
Did you read the dselect-beginner-guide ? You can find it on the CDROM. I
think it's a good introduction to dselect's usage

-- 
 ( >-   Laurent PICOULEAU  -< )
 /~\   [EMAIL PROTECTED]  /~\
|  \)Linux : mettez un pingouin dans votre ordinateur !(/  |
 \_|_Seuls ceux qui ne l'utilisent pas en disent du mal.   _|_/


Re: Bad points for debian (was: resetting dpkg)

1999-12-25 Thread Matt Garman
On Sat, Dec 25, 1999 at 01:56:31AM +, Mark Brown wrote:
> > I've got another question about dselect.  It seems like when I go in there
> > and choose some more packages to "install," then tell it to install, it
> > gives some kind of error about /cdrom being mounted.  I have to exit
> > dselect, umount /cdrom, then re-enter dselect, select install and off she
> > goes...
> Yes.  The dpkg methods that know how to mount media expect to do that
> for themselves.  If they find that something is already mounted where
> they want to work they will give up rather than interfere.  The solution
> is not to mount CDs or whatever unless you're actually using them -
> giving them the noauto method in fstab will stop this happening
> automatically when you start up.

Also, if you want to have your cd mounted, you can change your access
method in dselect to "mounted," and just point it to your cdrom mount
point.

MG

-- 
Matt Garman, [EMAIL PROTECTED]
"And through the window in the wall
 Come streaming in on sunlight wings
 A million bright ambassadors of morning." 
--Pink Floyd, "Echoes"


Re: Bad points for debian (was: resetting dpkg)

1999-12-25 Thread Mark Brown
On Thu, Dec 23, 1999 at 03:33:59PM -0800, Andy Thomas wrote:

> I've got another question about dselect.  It seems like when I go in there
> and choose some more packages to "install," then tell it to install, it
> gives some kind of error about /cdrom being mounted.  I have to exit
> dselect, umount /cdrom, then re-enter dselect, select install and off she
> goes...

> Is that expected?

Yes.  The dpkg methods that know how to mount media expect to do that
for themselves.  If they find that something is already mounted where
they want to work they will give up rather than interfere.  The solution
is not to mount CDs or whatever unless you're actually using them -
giving them the noauto method in fstab will stop this happening
automatically when you start up.

-- 
Mark Brown  mailto:[EMAIL PROTECTED]   (Trying to avoid grumpiness)
http://www.tardis.ed.ac.uk/~broonie/
EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/


pgpadaBrfExx7.pgp
Description: PGP signature


Re: Bad points for debian (was: resetting dpkg)

1999-12-24 Thread Andy Thomas
I've got another question about dselect.  It seems like when I go in there
and choose some more packages to "install," then tell it to install, it
gives some kind of error about /cdrom being mounted.  I have to exit
dselect, umount /cdrom, then re-enter dselect, select install and off she
goes...

Is that expected?

TIA
Andy


Re: Bad points for debian (was: resetting dpkg)

1999-12-24 Thread Egbert Bouwman
In this discussion it may be helpful to summarize my view on dselect-dpkg:

- the underlying mechanism seems to be very good (I do agree with everybody)
- the user interface could be better
- as a coherent tutorial the documentation is pretty bad, 
  and the fact that nobody from the inner debian circle has written
  something else has severely damaged the usability and reputation 
  of the debian distribution.

I think my opinion about the bad documentation is confirmed by 
Jesse Jacobsen. He says he is experienced, and did a *careful* reading 
of the dselect help. And then about the keys:
   "X" looks similar to "R", but some experimentation is in order
to confirm that -- it may quit package selection altogether.
So he is not sure.

Jesse and some other respondents gave useful hints.
But it is not the kind of documentation i am looking for.
What I do need is a non-technical description of the 
 mechanism, which makes me understand what
happens when I use all the options - in interaction.
Everything about the availability and status files; former state;
effect of keys; (absence of) difference between 'apt-get update' and
dselect update; effect of 'dpkg --set-selections' on the contents of
the status file, and a nice one:
'dpkg --forget-old-unavail' documented as 'Forget about uninstalled
unavailable packages'. Forget ?

Examples of how things can be done are some of the books from O'Reilly:
TCP/IP Networking by Craig Hunt, and Mastering Regular Expressions
by Jeffrey Friedl. I think I do understand these phenomena now.
I do not need a tutorial at the interface level ('type first this 
and then hit ...), but a tuturial at the level of the mechanism,
the underlying logic.

About resetting dselect. If someone says 'I only want ...'
he usually does not understand what he wants. I am afraid that
that is exactly my case. I only want to go back till before that 
dramatic dselect session in which it wanted to download half a
distribution (over a 28K8 modem). I should not have added 
to sources.list this unstable ftp-line, and then ask for a new
enlightenment, which needed a new libc6, which made obsolete 
half of my distribution. I only want dselect-dpkg to accept
my machine as-is now, so that I may go on.

But I talk too much about things nearly past. 
In a few months we have apt complete.

egbert 

-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991



Re: Bad points for debian (was: resetting dpkg)

1999-12-24 Thread Mark Brown
On Thu, Dec 23, 1999 at 02:11:31PM +0100, Egbert Bouwman wrote:

> You are one of many, myself included, who asked similar questions
> about resetting dselect or dpkg after they created chaos.

Does the revert command 'R' do what you want?

> We only want to start all over again with the selection process.
> I have never read a helpful reply. Does nobody know ?
> Or did we ask the wrong question ?

You could perhaps be a bit clearer about what you want - revert will
undo all the changes you've made on a given screen, but I'm not sure
that that's what you want.  I don't think there's any kind of
progressive undo.

> The debian group tries to remedy this by developing a new package, 
> apt etc, which is not yet finished. For years on end we have to work 
> now with the old interface. But I have never seen a clear, readable, 
> understandable etc story about the use of these packages.

I always found that dselect is pretty well documented by the help screens 
within it.  The documentation is certainly terse, but it does seem to be
complete.  Perhaps the terseness can cause problems for some people, I
don't know.  Other than that, a lot of people seem to panic when
confronted with a fairly bare text mode interface.

Even if you made deselect more friendly, you probably wouldn't address
the biggest problem we seem to have at the minute: the number of
packages.  None of the dselect replacements have come up with a good way
of dealing with this (the command line apt tools are probably the best
stab at it).

-- 
Mark Brown  mailto:[EMAIL PROTECTED]   (Trying to avoid grumpiness)
http://www.tardis.ed.ac.uk/~broonie/
EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/


pgphjKvE4KzbS.pgp
Description: PGP signature


Re: Bad points for debian (was: resetting dpkg)

1999-12-23 Thread Jesse Jacobsen
On 12/23/99, Egbert Bouwman addressed "Bad points for debian (was: resetting 
dpkg)":
> In the dselect man page (dd 29th november 1995) in slink you can read:
>The dselect package selection interface is confusing or even 
>alarming to the new user.
> The debian group tries to remedy this by developing a new package, 
> apt etc, which is not yet finished. For years on end we have to work 
> now with the old interface. But I have never seen a clear, readable, 
> understandable etc story about the use of these packages.
> 
> Yes, in many texts you see something like: experiment, read the help
> pages, use the ... keys (they are your friend).
> In the meantime numerous people, often very sophisticated linux users,
> have been frustrated by dselect-dpkg. Many turned to another 
> distibution exactly for this reason.

I experienced the same frustration for a while.  What ended it was a
*careful* reading of the internal dselect help.  This, combined with
my experience produced a careful respect for all the things that
dselect is showing me and is about to do at any given moment.  For
example, when you select a package and dselect enters the conflict
resolution screen, and there are 50 or so packages there, some of
which you recognize as being somewhat important for you, **now** is
the time to "go back."  If you hit Enter, the status of most of those
packages will be different than when you began.  The keys you can use
to "Quit, Exit, Overwrite," according to the help screen, are: (note
capitals!)

"
 Return  Confirm, quit (check dependencies)  
   Q Confirm, quit (override dep.s)  
 X, Esc  eXit, abandoning any changes made   
   R Revert to state before this list
   U set all to sUggested state  
   D set all to Directly requested state 
"

So the right thing to do is "R" - revert to state before this list.
If you accept the list as-is, you can almost guarantee you won't be
able to get that same package listing again.  Note that the opposite
of "Return" is "Q", and apparently "U" and "D" are opposites too,
analogous to "Return" and "Q."  "X" looks similar to "R", but some
experimentation is in order to confirm that -- it may quit package
selection altogether.  

So experiment carefully, have patience, and respect for the fact that
there are thousands of packages managed by dselect, which manages
their real-time status on an individual basis, accounting for a
complex inter-dependency scheme.  Whatever you change and accept (even
unknowingly) is *real*, and is immediately reflected in the package
status database.

You may be able to create a kind of self-protection error recovery by
using dpkg --get-selections > somefile before running dselect.  Then
if you want to revert from your dselect-ion, run dpkg --set-selections
< somefile afterwards.  YMMV.

Happy Linuxing,

Jesse



Re: Bad points for debian (was: resetting dpkg)

1999-12-23 Thread Ian Stuart
Egbert Bouwman wrote:
> 
> On Wed, Dec 22, 1999 at 10:43:05PM +0100, steve doerr wrote:
> > Is there a way to change dpkg package remove tags?  I ran dselect after
> > manually dpkg'ing postgresql and jdk and I somehow got almost everything
> >
Remember that the dependencies will kick in (though jdk & postgresql are
not dependent on _THAT_ many packages)..

> You are one of many, myself included, who asked similar questions
> about resetting dselect or dpkg after they created chaos.
> We only want to start all over again with the selection process.
> I have never read a helpful reply. Does nobody know ?
> Or did we ask the wrong question ?
This raises a number of issues..

When do you want to revert?

So long as you've not actually installed anythong, control-c bombs out
of dselect, without changing the package list.

you can use dpkg --get-selections and dpkg --set-selections to
specifically set the package list.

If you want the package-management system itself to keep a track of
changes, this is a huge task: how far back do you keep your records? do
you track user-requested packages seperately from dependency
installations? do you want to be able to revert packages, or just change
the installed/not-installed nature? what about distribution upgrades
(slink -> potato[e]), how big a requirement is the ability to be able to
revert (1, 2, .. steps)?

I happen to agree, it would be great to be able to easily revert to a
situation (say) two updates ago.

I see two main difficulties:
1) modifying dpkg to keep data files on the packages installed and
removed.
 This shouldn't be too tricky: you need files:
user_selected_install; dependency_install; user_seleced_remove.  Each
line on the file is date:package:package:package[:package]+
2) Keeping the previously installed packages (the one that is to be
replaced during a package upgrade). 
 The Debian philosophy seems to be to keep the .debs off the
workstations (based on the question "do you want to delete the
downloaded .deb files" after an upgrade) - therefor I would assume that
debian.org (and the mirrors) would have to retain all .deb files,
including those with bugs in them, so that customers can revert
 This, I think, is what will be killing the "revert" concept: it
requires just TOO MUCH disk space (a full Debian mirror needs something
like 20GB just now, so the archiving would need a huge file-system)
 :(

Hope this helps..

-- 
   --==**==--
Ian Stuart - University computing services.
-
Opinions are funny things:
 Mine are mine and mine alone
http://lucas.ucs.ed.ac.uk/


Re: Bad points for debian (was: resetting dpkg)

1999-12-23 Thread Jan Ludewig
On Thu, Dec 23, 1999 at 02:11:31PM +0100, Egbert Bouwman wrote:
> On Wed, Dec 22, 1999 at 10:43:05PM +0100, steve doerr wrote:
> > Is there a way to change dpkg package remove tags?  I ran dselect after
> > manually dpkg'ing postgresql and jdk and I somehow got almost everything
> > 
> The debian group tries to remedy this by developing a new package, 
> apt etc, which is not yet finished. For years on end we have to work 
> now with the old interface. But I have never seen a clear, readable, 
> understandable etc story about the use of these packages.
> 
> Yes, in many texts you see something like: experiment, read the help
> pages, use the ... keys (they are your friend).
> In the meantime numerous people, often very sophisticated linux users,
> have been frustrated by dselect-dpkg. Many turned to another 
> distibution exactly for this reason.
well...though you probably don't want to read this but:

a) in the manual everything is explained..the problem is that dpkg offers nearly
   as much actions as nethack does because you can do a lot
b) apt is quite usable for daily work:
apt-get install  fetches the package and all dependencies 
and installs everything.
to browse through the packet tree you can use aptitude

so you sholould wait the few month for potato and use apt, IMO there is no
real need to hack dselect just to abolish it a few month later...

Jan


Bad points for debian (was: resetting dpkg)

1999-12-23 Thread Egbert Bouwman
On Wed, Dec 22, 1999 at 10:43:05PM +0100, steve doerr wrote:
> Is there a way to change dpkg package remove tags?  I ran dselect after
> manually dpkg'ing postgresql and jdk and I somehow got almost everything
> 
You are one of many, myself included, who asked similar questions
about resetting dselect or dpkg after they created chaos.
We only want to start all over again with the selection process.
I have never read a helpful reply. Does nobody know ?
Or did we ask the wrong question ?

In the dselect man page (dd 29th november 1995) in slink you can read:
   The dselect package selection interface is confusing or even 
   alarming to the new user.
The debian group tries to remedy this by developing a new package, 
apt etc, which is not yet finished. For years on end we have to work 
now with the old interface. But I have never seen a clear, readable, 
understandable etc story about the use of these packages.

Yes, in many texts you see something like: experiment, read the help
pages, use the ... keys (they are your friend).
In the meantime numerous people, often very sophisticated linux users,
have been frustrated by dselect-dpkg. Many turned to another 
distibution exactly for this reason.

The sad point is that this program-set seems to be better than
anything else (rpm included), but that debian makes it virtually
impossible for a large number of users to verify this hypothesis.
egbert

-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991