bugCommon Configuration Parser - Bugs: bug #27107, check that newfile is actually...

 
 

bug #27107: check that newfile is actually newer than oldfile

Submitted by:  Anssi Hannula <anssi>
Submitted on:  Sat 25 Jul 2009 08:35:27 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Eskild Hustvedt <zero_dogg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 17 Feb 2012 08:30:55 PM UTC, comment #4:

Ping? It should be rather trivial to fix.

I can provide a patch myself if you tell me if you wish --ifnewer behavior to be changed or a new option added for this?

Anssi Hannula <anssi>
Wed 21 Oct 2009 05:57:53 PM UTC, comment #3:

Sorry for the delay. Unfortunately the fix in git is not enough for the example usage case.

A valid .rpmnew may well have older mtime, even if it was just installed (e.g. upstream 1.1 foo.conf 2004-10-12, upstream 1.2 foo.conf 2005-10-12, user edited 1.1 foo.conf 2006-10-12; foo is upgraded 1.1 -> 1.2 on 2007-10-12 => --ifnewer would abort as newfile has older mtime than oldfile).

Instead, ctime can be used to determine obsoleteness: a newly installed file will always have current ctime, even if its mtime is older.

Anssi Hannula <anssi>
Mon 05 Oct 2009 09:18:38 PM UTC, comment #2:

Closing as fixed. The fix is in git.

Eskild Hustvedt <zero_dogg>
Project AdministratorIn charge of this item.
Thu 20 Aug 2009 07:00:42 PM UTC, comment #1:

I have committed a fix, please test the latest git version of CCP (http://random.zerodogg.org/ccp/git)

Eskild Hustvedt <zero_dogg>
Project AdministratorIn charge of this item.
Sat 25 Jul 2009 08:35:27 PM UTC, original submission:

There should be an option to check that newfile is newer than oldfile.

For example with .rpmnew:

User has some old "/etc/foo.conf.rpmnew", while foo is not actually currently installed. Installing "foo" that has ccp call in %post will happily merge the contents, even if foo.conf.rpmnew wasn't created in this transaction.

I've workarounded this in my packages by checking that foo.conf.rpmnew actually has newer ctime (mtime can be older) than foo.conf, before calling ccp in %post.

Anssi Hannula <anssi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by zero_dogg (Updated the item)
  • -unavailable- added by anssi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 Oct 2009 09:18:38 PM UTCzero_doggStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 20 Aug 2009 07:00:42 PM UTCzero_doggStatusConfirmed=>Ready For Test
    Mon 27 Jul 2009 08:03:55 AM UTCzero_doggStatusNone=>Confirmed
      Assigned toNone=>zero_dogg

    Back to the top


    Powered by Savane 3.1-cleanup1