Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian dpkg (http://www.linux-archive.org/debian-dpkg/)
-   -   dpkg's main repository branch, master, updated. 1.16.1.2-131-gc07f7fe (http://www.linux-archive.org/debian-dpkg/606487-dpkgs-main-repository-branch-master-updated-1-16-1-2-131-gc07f7fe.html)

Raphael Hertzog 12-05-2011 08:01 AM

dpkg's main repository branch, master, updated. 1.16.1.2-131-gc07f7fe
 
Hi,

On Mon, 05 Dec 2011, Guillem Jover wrote:
> + if (!S_ISREG(stat_buf.st_mode))
> + ohshit(_("files list for package '%.250s' is not a regular file"),
> + pkg->set->name);

My error message included "filelistfile" in the output. The user will want
to look up in more details what's wrong with the file and it's a good idea
to give him the filename IMO.

Any reason you decided to change this ?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111205090125.GA2810@rivendell.home.ouaza.com">ht tp://lists.debian.org/20111205090125.GA2810@rivendell.home.ouaza.com

Guillem Jover 12-22-2011 04:26 AM

dpkg's main repository branch, master, updated. 1.16.1.2-131-gc07f7fe
 
On Mon, 2011-12-05 at 10:01:25 +0100, Raphael Hertzog wrote:
> On Mon, 05 Dec 2011, Guillem Jover wrote:
> > + if (!S_ISREG(stat_buf.st_mode))
> > + ohshit(_("files list for package '%.250s' is not a regular file"),
> > + pkg->set->name);
>
> My error message included "filelistfile" in the output. The user will want
> to look up in more details what's wrong with the file and it's a good idea
> to give him the filename IMO.

I should have noted in the commit message I modified this.

In any case, IMO the user should never have the need to touch the db,
and dpkg should do as much as possible to recover itself from any bad
situation (or avoid getting into one).

> Any reason you decided to change this ?

Consistency with all other function error messages. But then the atomic
file switch will make the errors print the actual file name, something
I currently consider a small regression.

regards,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111222052610.GB18277@gaara.hadrons.org">http://lists.debian.org/20111222052610.GB18277@gaara.hadrons.org

Raphael Hertzog 12-22-2011 06:05 AM

dpkg's main repository branch, master, updated. 1.16.1.2-131-gc07f7fe
 
Hi,

On Thu, 22 Dec 2011, Guillem Jover wrote:
> On Mon, 2011-12-05 at 10:01:25 +0100, Raphael Hertzog wrote:
> > On Mon, 05 Dec 2011, Guillem Jover wrote:
> > > + if (!S_ISREG(stat_buf.st_mode))
> > > + ohshit(_("files list for package '%.250s' is not a regular file"),
> > > + pkg->set->name);
> >
> > My error message included "filelistfile" in the output. The user will want
> > to look up in more details what's wrong with the file and it's a good idea
> > to give him the filename IMO.
>
> I should have noted in the commit message I modified this.
>
> In any case, IMO the user should never have the need to touch the db,
> and dpkg should do as much as possible to recover itself from any bad
> situation (or avoid getting into one).

I agree with this. I have even have a "dpkg --recover-db" somewhere in
my TODO. But in the specific case of a .list file that's no longer a file,
we don't have any backup...

What could we do? The only possibility is to delete the corrupted .list
file and mark the package as reinst-required.

Giving out the filename doesn't imply that the user has to touch the db
by himself. It just allows him to make a precise diagnosis of his problem.
We should empower the user to take a decision, not hinder his work by
masking what's really broken. In particular given that the most common
breakages are not dpkg's fault but are random filesystem corruption (due
do dying disks/memory or similar).

> > Any reason you decided to change this ?
>
> Consistency with all other function error messages. But then the atomic
> file switch will make the errors print the actual file name, something
> I currently consider a small regression.

Honestly it's an improvement not a regression, in particular when you
consider translated messages. If I see "files list file" in russian
I won't be able to recognize the error message. But if it includes the
filename, I will have a clearer idea of where things went wrong.

It also greatly reduces the number of strings to translate. I prefer
to have a single string "cannot write %s" instead of many combinations
"cannot write foo", "cannot write bar", etc.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111222070535.GJ8584@rivendell.home.ouaza.com">ht tp://lists.debian.org/20111222070535.GJ8584@rivendell.home.ouaza.com


All times are GMT. The time now is 07:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.