Re: [lfs-support] Patch delete a directory

2014-01-09 Thread Fernando de Oliveira
Em 08-01-2014 09:31, akhiezer escreveu:

 Hi Fernando,
 
 If ever being added to the book - it's 
 low-maint - then probly 'good form' to drop the author a wee thanks note or 
 similar (eml-addr via foot of proj homepage). (Disclaimer: I don't have any 
 vested interest in the software, or know the author, etc.)

Started yesterday the thread add new package tree-1.6.0 in the dev
list for BLFS, if somebody want to drop opinions there...

-- 
[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-08 Thread akhiezer
 Date: Tue, 07 Jan 2014 20:52:41 -0300
 From: Fernando de Oliveira fam...@yahoo.com.br
 To: LFS Support List lfs-support@linuxfromscratch.org
 Subject: Re: [lfs-support] Patch delete a directory

 Em 07-01-2014 10:23, Fernando de Oliveira escreveu:
  Em 07-01-2014 09:39, akhiezer escreveu:
  Date: Tue, 07 Jan 2014 08:50:24 -0300
  From: Fernando de Oliveira
  To: LFS Support List
  Subject: Re: [lfs-support] Patch delete a directory
 
 .
 .
  I do not have tree in my system. It is nice having it. Did I miss it
  during some wrong install?


   - yes, that's it; latest ver 1.6.0  . Straightforward build; latest-ver 
  works ok under ~b/lfs-7.4(-ish)  . Not aware of any similarly-named utils 
  from other well-known packages.

  
  I will install soon after I finish what I am doing now

 It is very good, I missed that, helps also in examining the dirs and
 files for the book.

 Thanks again!



Hi Fernando,

You're welcome; good that it's found to be useful - maybe for others too. I'd 
kindof forgotten that it's not in blfs. If ever being added to the book - it's 
low-maint - then probly 'good form' to drop the author a wee thanks note or 
similar (eml-addr via foot of proj homepage). (Disclaimer: I don't have any 
vested interest in the software, or know the author, etc.)


(( On a related note, if you find the tree idiom useful: you do know about the 
likes of 'pstree' (from 'procps', 'psmisc', c), smbtree (from 'samba'), usw ? 
I'd expect so, but mention just in case not. ))



rgds,
akhiezer





--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-07 Thread Parmenides
From: akhiezer
Sent: Tuesday, January 07, 2014 1:31 AM
To: LFS Support List
Subject: Re: [lfs-support] Patch delete a directory

Hi akhiezer,

Thanks for your reply.

 Is writer/name an empty file, or what? Can you post:
 $ tree -apugsDF old new

Both writer and name are directories. The result of ' tree -apugsDF ' is as 
follows

old
|-- [drwxr-xr-x root root4096 Jan  7 18:32]  musician/
|   `-- [-rw-r--r-- root root  37 Jan  7 18:32]  name
`-- [drwxr-xr-x root root4096 Jan  7 18:32]  writer/
new
|-- [drwxr-xr-x root root4096 Dec 30  0:45]  musician/
|   `-- [-rw-r--r-- root root  40 Dec 30  0:23]  name
`-- [drwxr-xr-x root root4096 Dec 30  0:46]  writer/
`-- [-rw-r--r-- root root  37 Dec 30  0:50]  name

 Can you post what patch.diff contains?

diff -Nru old/musician/name new/musician/name
--- old/musician/name   2014-01-07 18:32:02.0 +
+++ new/musician/name   2013-12-30 00:23:19.0 +
@@ -1,5 +1,5 @@
+Beethoven
Strauss
Debussy
-Mozart
+Schubert
Bach
-Schumann
diff -Nru old/writer/name new/writer/name
--- old/writer/name 1970-01-01 00:00:00.0 +
+++ new/writer/name 2013-12-30 00:50:32.0 +
@@ -0,0 +1,4 @@
+Emerson
+O.Henry
+Dickenson
+Mark Twain

 Any particular reason why you don't include '-a' flag? (e.g.
 'LC_ALL=C TZ=UTC0 diff -Naur old new' per recommended format in patch
 man-page. )

I have tried '-a' option with this case, and the results don't have 
differences.

--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page 

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-07 Thread Fernando de Oliveira
Em 07-01-2014 08:14, Parmenides escreveu:
 From: akhiezer
 Sent: Tuesday, January 07, 2014 1:31 AM
 To: LFS Support List
 Subject: Re: [lfs-support] Patch delete a directory
 
 Hi akhiezer,

...

 Is writer/name an empty file, or what? Can you post:
 $ tree -apugsDF old new

Hi, akhiezer,

I do not have tree in my system. It is nice having it. Did I miss it
during some wrong install?

Found this:

http://mama.indstate.edu/users/ice/tree/

Is it what you referred to?

-- 
[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-07 Thread akhiezer
 Date: Tue, 07 Jan 2014 08:50:24 -0300
 From: Fernando de Oliveira fam...@yahoo.com.br
 To: LFS Support List lfs-support@linuxfromscratch.org
 Subject: Re: [lfs-support] Patch delete a directory

.
.
 I do not have tree in my system. It is nice having it. Did I miss it
 during some wrong install?

 Found this:

 http://mama.indstate.edu/users/ice/tree/

 Is it what you referred to?



 - yes, that's it; latest ver 1.6.0  . Straightforward build; latest-ver 
works ok under ~b/lfs-7.4(-ish)  . Not aware of any similarly-named utils 
from other well-known packages.


Some aux refs in case of use/interest:

* ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/source/a/tree/
* https://github.com/execjosh/tree



rgds,
akhiezer


 -- 
 []s,
 Fernando
 -- 



--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-07 Thread Fernando de Oliveira
Em 07-01-2014 09:39, akhiezer escreveu:
 Date: Tue, 07 Jan 2014 08:50:24 -0300
 From: Fernando de Oliveira
 To: LFS Support List
 Subject: Re: [lfs-support] Patch delete a directory

   .
   .
 I do not have tree in my system. It is nice having it. Did I miss it
 during some wrong install?

 Found this:

 http://mama.indstate.edu/users/ice/tree/

 Is it what you referred to?

 
 
  - yes, that's it; latest ver 1.6.0  . Straightforward build; latest-ver 
 works ok under ~b/lfs-7.4(-ish)  . Not aware of any similarly-named utils 
 from other well-known packages.
 
 
 Some aux refs in case of use/interest:
 
 * ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/source/a/tree/
 * https://github.com/execjosh/tree

Thanks,

I will install soon after I finish what I am doing now, and will have a
look the links you gave.


-- 
[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-07 Thread Fernando de Oliveira
Em 07-01-2014 10:23, Fernando de Oliveira escreveu:
 Em 07-01-2014 09:39, akhiezer escreveu:
 Date: Tue, 07 Jan 2014 08:50:24 -0300
 From: Fernando de Oliveira
 To: LFS Support List
 Subject: Re: [lfs-support] Patch delete a directory

  .
  .
 I do not have tree in my system. It is nice having it. Did I miss it
 during some wrong install?


  - yes, that's it; latest ver 1.6.0  . Straightforward build; latest-ver 
 works ok under ~b/lfs-7.4(-ish)  . Not aware of any similarly-named utils 
 from other well-known packages.

 
 I will install soon after I finish what I am doing now

It is very good, I missed that, helps also in examining the dirs and
files for the book.

Thanks again!

-- 
[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-06 Thread akhiezer
 From: Parmenides mobile.parmeni...@gmail.com
 To: lfs-support@linuxfromscratch.org
 Date: Tue, 7 Jan 2014 01:10:55 +0800
 Subject: [lfs-support] Patch delete a directory



 Hi,

 I am not sure whether I should ask this quesiton here. I am trying 
 'diff' and 'patch', and have encounter a problem.

 I have create two directories as follows:

 old
 |-- musician
 |   `-- name
 `-- writer

 new
 |-- musician
 |   `-- name
 `-- writer
 `-- name



Is writer/name an empty file, or what? Can you post:
$ tree -apugsDF old new 


 Then,  'diff' is used to compare the two directories and generated a diff.

 diff -Nru old new  patch.diff



Can you post what patch.diff contains?


Any particular reason why you don't include '-a' flag? (e.g.
'LC_ALL=C TZ=UTC0 diff -Naur old new' per recommended format in patch 
man-page. )


 Then, 'patch' is used to make 'old' identical to 'new'.

 patch -p1 --dir old  patch.diff

 In the following, I want to 'old' revert to its origin:

 patch -p1 -R --dir old  patch.diff

 The structruct of 'old' has turn to the following:


 old
 `-- musician
 `-- name

 It obvious that a subdirectory 'writer' has disappeared. I wonder some way 
 to keep 'writer' from being deleted. Thx.


--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] Patch delete a directory

2014-01-06 Thread akhiezer
 Date: Mon, 06 Jan 2014 17:31:39 +
 From: lf...@cruziero.com (akhiezer)
 To: LFS Support List lfs-support@linuxfromscratch.org
 Subject: Re: [lfs-support] Patch delete a directory

  From: Parmenides mobile.parmeni...@gmail.com
  To: lfs-support@linuxfromscratch.org
  Date: Tue, 7 Jan 2014 01:10:55 +0800
  Subject: [lfs-support] Patch delete a directory
 
 
 
  Hi,
 
  I am not sure whether I should ask this quesiton here. I am trying 
  'diff' and 'patch', and have encounter a problem.
 
  I have create two directories as follows:
 
  old
  |-- musician
  |   `-- name
  `-- writer
 
  new
  |-- musician
  |   `-- name
  `-- writer
  `-- name
 


 Is writer/name an empty file, or what? Can you post:
 $ tree -apugsDF old new 


  Then,  'diff' is used to compare the two directories and generated a diff.
 
  diff -Nru old new  patch.diff
 


 Can you post what patch.diff contains?


 Any particular reason why you don't include '-a' flag? (e.g.
 'LC_ALL=C TZ=UTC0 diff -Naur old new' per recommended format in patch 
 man-page. )


  Then, 'patch' is used to make 'old' identical to 'new'.
 
  patch -p1 --dir old  patch.diff
 
  In the following, I want to 'old' revert to its origin:
 
  patch -p1 -R --dir old  patch.diff
 
  The structruct of 'old' has turn to the following:
 
 
  old
  `-- musician
  `-- name
 
  It obvious that a subdirectory 'writer' has disappeared. I wonder some way 
  to keep 'writer' from being deleted. Thx.



If you're hitting patch's '-E' behaviour (
 -E  or  --remove-empty-files
Remove output files that are empty after the patches have been applied.
Normally this  option  is unnecessary,  since  patch  can  examine the 
time stamps on the header to determine whether a file should exist after 
patching.  However, if the input is not a context diff or if patch is  
conform-ing  to  POSIX, patch does not remove empty patched files unless 
this option is given.  When patch removes a file, it also attempts to 
remove any empty ancestor directories. 
),
then I s'ppose a really gross hack could be to use mktemp to create a 
temp-file inside old/writer/ dir, perhaps shovelling some dummy data 
into it (so that it's not an empty file), and remove it later (having 
captured the name/path of the temp-file from the output of mktemp earlier).


However, I'd first check for a better way - perh involving the above 
man-page stuff re time-stamps /or patch-format /or posix.



rgds,
akh







--
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page