FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 05-30-2011, 02:51 PM
Sam Dunne
 
Default Declarative Diversions - GSoC Project Update 1

So earlier on I posted about my work on�declarative diversions�. I felt I needed to clarify a few things as a few people asked me different questions and I don't think I made the post clear enough and I also left out an important piece of information.





The new control file will be located in control.tar.gz and it's syntax will be


One diversion per line

Blank lines and lines with # are comments

Two fields per diversion seperated by whitespace (SOURCE DESTINATION)




Now people have asked be about updating and removing diversions and how that will be accomplished.�


All diversions will be listed in this control file. If a diversion isn't listed in the control file on upgrade dpkg will automatically remove the diversion because it will see it is no longer needed. The same goes for changing diversions, i.i. list them just as though they're new and it will update them.





This project will infer --add, --remove and --package and will not allow you to specify them.

The same is goes for --rename, it is being made default and not optional (for now, I am aware of some special cases).


--divert will not be specifiable and will take the default format "file.divert-$package".




Now, there are a number of things still left to do this week before a full draft is prepared.�


There is an email�here by Ian Jackson�which talks about ordering unpack in such a way to delay the the actual renaming of the file. If anyone has any suggestions for this process it would be greatly appreciated.





Another two things that need to be done is the proper handling of diversions to non-existant directories and also escaping spaces within filenames for the control file.




I should have another update tomorrow evening.


Until then,
--
Sam Dunne
 
Old 05-30-2011, 04:32 PM
Goswin von Brederlow
 
Default Declarative Diversions - GSoC Project Update 1

Sam Dunne <sam.dunne101@gmail.com> writes:

> This project will infer --add, --remove and --package and will not
> allow you to specify them.
>
> The same is goes for --rename, it is being made default and not optional (for
> now, I am aware of some special cases).
>
> --divert will not be specifiable and will take the default format
> "file.divert-$package".

What about moving a diversion from package A to B?

This should not run into the error that 2 packages are trying to divert
the same file.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ipsstaht.fsf@frosties.localnet">http://lists.debian.org/87ipsstaht.fsf@frosties.localnet
 
Old 05-30-2011, 04:52 PM
Raphael Hertzog
 
Default Declarative Diversions - GSoC Project Update 1

On Mon, 30 May 2011, Goswin von Brederlow wrote:
> Sam Dunne <sam.dunne101@gmail.com> writes:
>
> > This project will infer --add, --remove and --package and will not
> > allow you to specify them.
> >
> > The same is goes for --rename, it is being made default and not optional (for
> > now, I am aware of some special cases).
> >
> > --divert will not be specifiable and will take the default format
> > "file.divert-$package".
>
> What about moving a diversion from package A to B?

That's why we have "Conflicts" to ensure a package is removed before the
other is installed.

I mean moving a diversion (which implies moving a file) without this
precaution would fail because dpkg-trigger is run in the preinst. Thus
it's not a new problem.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110530165239.GB2397@rivendell.home.ouaza.com">ht tp://lists.debian.org/20110530165239.GB2397@rivendell.home.ouaza.com
 
Old 05-30-2011, 06:05 PM
Sam Dunne
 
Default Declarative Diversions - GSoC Project Update 1

Everyone can ignore "--divert will not be specifiable and will take the default format "file.divert-$package"."

Got my notes messed up and this is covered in "destination"*
On 30 May 2011 17:52, Raphael Hertzog <hertzog@debian.org> wrote:

On Mon, 30 May 2011, Goswin von Brederlow wrote:

> Sam Dunne <sam.dunne101@gmail.com> writes:

>

> > This project will infer --add, --remove and --package and will not

> > allow you to specify them.

> >

> > The same is goes for --rename, it is being made default and not optional (for

> > now, I am aware of some special cases).

> >

> > --divert will not be specifiable and will take the default format

> > "file.divert-$package".

>

> What about moving a diversion from package A to B?



That's why we have "Conflicts" to ensure a package is removed before the

other is installed.



I mean moving a diversion (which implies moving a file) without this

precaution would fail because dpkg-trigger is run in the preinst. Thus

it's not a new problem.



Cheers,

--

Raphaël Hertzog ◈ Debian Developer



Follow my Debian News ▶ http://RaphaelHertzog.com (English)

* * * * * * * * * * *▶ http://RaphaelHertzog.fr (Français)





--

To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/20110530165239.GB2397@rivendell.home.ouaza.com





--
Sam Dunne
BSc Computer Science, UCD Dublin.
 
Old 05-31-2011, 07:49 AM
Goswin von Brederlow
 
Default Declarative Diversions - GSoC Project Update 1

Raphael Hertzog <hertzog@debian.org> writes:

> On Mon, 30 May 2011, Goswin von Brederlow wrote:
>> Sam Dunne <sam.dunne101@gmail.com> writes:
>>
>> > This project will infer --add, --remove and --package and will not
>> > allow you to specify them.
>> >
>> > The same is goes for --rename, it is being made default and not optional (for
>> > now, I am aware of some special cases).
>> >
>> > --divert will not be specifiable and will take the default format
>> > "file.divert-$package".
>>
>> What about moving a diversion from package A to B?
>
> That's why we have "Conflicts" to ensure a package is removed before the
> other is installed.

But we only need breaks+replaces there.

> I mean moving a diversion (which implies moving a file) without this
> precaution would fail because dpkg-trigger is run in the preinst. Thus
> it's not a new problem.
>
> Cheers,

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87oc2j8g3d.fsf@frosties.localnet">http://lists.debian.org/87oc2j8g3d.fsf@frosties.localnet
 
Old 05-31-2011, 08:27 AM
sean finney
 
Default Declarative Diversions - GSoC Project Update 1

</lurk>

Hi Sam,

On Mon, May 30, 2011 at 03:51:32PM +0100, Sam Dunne wrote:
> One diversion per line
>
> Blank lines and lines with # are comments
>
> Two fields per diversion seperated by whitespace (SOURCE DESTINATION)

Does this mean it will not be possible to divert a file when the source
or destination has whitespace in it? If so I'd suggest you also have
support for some backslash-type escaping.


Sean

<lurk>

--


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110531082729.GA27650@cobija.connexer.com">http://lists.debian.org/20110531082729.GA27650@cobija.connexer.com
 
Old 05-31-2011, 09:17 AM
Raphael Hertzog
 
Default Declarative Diversions - GSoC Project Update 1

On Tue, 31 May 2011, sean finney wrote:
> Does this mean it will not be possible to divert a file when the source
> or destination has whitespace in it? If so I'd suggest you also have
> support for some backslash-type escaping.

Or to use two lines instead of one. And to support multiple entries make
the different entries separated by an empty line (so that it's possible to
add supplementary fields in the future shall that be required).

---
<source1>
<dest1>

<source2>
<dest2>
---

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110531091714.GB14985@rivendell.home.ouaza.com">h ttp://lists.debian.org/20110531091714.GB14985@rivendell.home.ouaza.com
 
Old 05-31-2011, 09:22 AM
Sam Dunne
 
Default Declarative Diversions - GSoC Project Update 1

It will have to support whitespace in filenames but I haven't decided how to escape it yet. Backslashes are a good idea but so is seperating them by line. However if I'm looking for newlines in may become awkward in the code. Either way it will have to be resolved.
If anyone else has any opinions on how to resolve the let me know, I'll see what the general consensus is and work on it like that.
~Sam

On 31 May 2011 10:17, Raphael Hertzog <hertzog@debian.org> wrote:

On Tue, 31 May 2011, sean finney wrote:

> Does this mean it will not be possible to divert a file when the source

> or destination has whitespace in it? *If so I'd suggest you also have

> support for some backslash-type escaping.



Or to use two lines instead of one. And to support multiple entries make

the different entries separated by an empty line (so that it's possible to

add supplementary fields in the future shall that be required).



---

<source1>

<dest1>



<source2>

<dest2>

---



Cheers,

--

Raphaël Hertzog ◈ Debian Developer



Follow my Debian News ▶ http://RaphaelHertzog.com (English)

* * * * * * * * * * *▶ http://RaphaelHertzog.fr (Français)





--

To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/20110531091714.GB14985@rivendell.home.ouaza.com





--
Sam Dunne
BSc Computer Science, UCD Dublin.
 
Old 05-31-2011, 10:43 AM
Tollef Fog Heen
 
Default Declarative Diversions - GSoC Project Update 1

]] Raphael Hertzog

| On Tue, 31 May 2011, sean finney wrote:
| > Does this mean it will not be possible to divert a file when the source
| > or destination has whitespace in it? If so I'd suggest you also have
| > support for some backslash-type escaping.
|
| Or to use two lines instead of one. And to support multiple entries make
| the different entries separated by an empty line (so that it's possible to
| add supplementary fields in the future shall that be required).

I'd like us to go with the standard that's used in most other similar
files: RFC2822 style, so something like:

Divert-From: /usr/share/foo
Divert-To: /usr/share/bar

Divert-From: /usr/share/baz
Divert-To: /usr/share/coo

This makes it easier to figure out what the contents of the file means
when you're tired or don't care to check the documentation.

Regards,
--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ei3fp2tt.fsf@qurzaw.varnish-software.com">http://lists.debian.org/87ei3fp2tt.fsf@qurzaw.varnish-software.com
 
Old 05-31-2011, 01:55 PM
Goswin von Brederlow
 
Default Declarative Diversions - GSoC Project Update 1

Tollef Fog Heen <tfheen@err.no> writes:

> ]] Raphael Hertzog
>
> | On Tue, 31 May 2011, sean finney wrote:
> | > Does this mean it will not be possible to divert a file when the source
> | > or destination has whitespace in it? If so I'd suggest you also have
> | > support for some backslash-type escaping.
> |
> | Or to use two lines instead of one. And to support multiple entries make
> | the different entries separated by an empty line (so that it's possible to
> | add supplementary fields in the future shall that be required).
>
> I'd like us to go with the standard that's used in most other similar
> files: RFC2822 style, so something like:
>
> Divert-From: /usr/share/foo
> Divert-To: /usr/share/bar
>
> Divert-From: /usr/share/baz
> Divert-To: /usr/share/coo
>
> This makes it easier to figure out what the contents of the file means
> when you're tired or don't care to check the documentation.
>
> Regards,

Do we even need a "Divert-To"? In most cases the new name doesn't matter
or it is enough to know that the new name will be old name +.dpkg-divert
or +.<package> choosen automatically.

With RFC2822 style it would be possible to make the Divert-To optional
without being confusing to read or parse.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87r57f6klc.fsf@frosties.localnet">http://lists.debian.org/87r57f6klc.fsf@frosties.localnet
 

Thread Tools




All times are GMT. The time now is 05:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org