Page 1 of 2 12 LastLast
Results 1 to 10 of 23

Thread: Meld and pacnew files

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Question Meld and pacnew files

    Ref: Manjaro OS

    Hello,

    I recently undertook an update and now have a number of pacnew files.

    Evidently, I need to merge the pacnew file into the original file. Automattion seems like a good idea,

    Can someone tell me how involved is the process, and how to begin? I have the programme in my repo.

    Thanks.

    Ps. If I don't meld what are the consequences?
    Last edited by anon_private; May 9th, 2018 at 02:05 AM. Reason: Adding a detail - OS is manjaro
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Meld and pacnew files

    Quote Originally Posted by anon_private View Post
    Ps. If I don't meld what are the consequences?
    Nothing right away but in time though could get very messy.
    Time consuming way and not pretty.
    Code:
    find /etc -type f -name "*.pacnew"
    and just go through them one at a time then:
    Code:
    kdesu meld /etc/config /etc/config.pacnew
    Gosh they make things complicated...just plain Arch and I don't see such things
    Maybe this>>> fits into my knowledge of bash. Credit to Alan from Arch Forums.
    Code:
    #!/bin/bash
    # etc-update - merge *.pacnew files with original configurations with meld
    
    pacnew=$(find /etc -type f -name "*.pacnew")
    
    for i in $pacnew
    do
      kdesu meld $(basename $i .pacmew) $i &
      wait
    done
    Call it automeld or something like that so remember.
    Also In yaourt-git, you can find a new feature for automerging of .pacnew files. Just add "AutoSaveBackupFile yes" in /etc/yaourtrc to use it later with yaourt -C.
    Note: auto-merge will only work next time. When a new .pacnew arrives.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  3. #3
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: Meld and pacnew files

    Ref. OS is manjaro

    Thanks for responding.

    Are you saying that I may as well meld each pair manually? That is, meld the new into the old, then delete the new.?

    Or, is it better to let meld do the job, on a pair basis, and one pair at a time?
    Last edited by anon_private; May 9th, 2018 at 02:06 AM.
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

  4. #4
    Join Date
    Oct 2004
    Location
    33.4N -112.1W
    Beans
    2,376
    Distro
    Ubuntu Budgie

    Re: Meld and pacnew files

    Quote Originally Posted by anon_private View Post
    Are you saying that I may as well meld each pair manually? That is, meld the new into the old, then delete the new.?

    Or, is it better to let meld do the job, on a pair basis, and one pair at a time?
    Do them in pairs -- use Meld and manually edit the new into old.

    Only way to be sure. Then delete the new.

    If you never previously changed the file then you can probably just use the new one as is.

    I use dotpac to identify the .pac files and meld to edit (if necessary).

    https://aur.archlinux.org/packages/dotpac/dotpac/dotpac
    /path/to/Truth
    ٩(̾●̮̮̃̾•̃̾)۶

  5. #5
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: Meld and pacnew files

    Quote Originally Posted by Xian View Post
    Do them in pairs -- use Meld and manually edit the new into old.

    Only way to be sure. Then delete the new.

    If you never previously changed the file then you can probably just use the new one as is.

    I use dotpac to identify the .pac files and meld to edit (if necessary).

    https://aur.archlinux.org/packages/dotpac/dotpac/dotpac
    I see meld in my repo. I also see python2-meld3.

    Do I need both to use meld?

    Out of interest, is it too complex to attempt the editing manually, that is, without the help of meld
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

  6. #6
    Join Date
    Oct 2004
    Location
    33.4N -112.1W
    Beans
    2,376
    Distro
    Ubuntu Budgie

    Re: Meld and pacnew files

    Quote Originally Posted by anon_private View Post
    I see meld in my repo. I also see python2-meld3.

    Do I need both to use meld?
    Just install Meld:

    https://www.archlinux.org/packages/extra/any/meld/

    Quote Originally Posted by anon_private View Post
    Out of interest, is it too complex to attempt the editing manually, that is, without the help of meld
    It's definitely not too complex. Meld (or similar program) just makes it easy to see the diffs.
    /path/to/Truth
    ٩(̾●̮̮̃̾•̃̾)۶

  7. #7
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: Meld and pacnew files

    Quote Originally Posted by Xian View Post
    Do them in pairs -- use Meld and manually edit the new into old.

    Only way to be sure. Then delete the new.

    If you never previously changed the file then you can probably just use the new one as is.

    I use dotpac to identify the .pac files and meld to edit (if necessary).

    https://aur.archlinux.org/packages/dotpac/dotpac/dotpac
    As a I recall, when looking at the pairs (original, original.pacnew), it was the original that was the more extensive file. So, if I have never made changes to the original file then I can use it as is (delete original.pacnew).

    The files are in /etc, and, hence, cannot be saved, other than as a new file. Presumably, then deleting the original, and re-naming the new file to that of the original. Bit of a pain.

    There are some files (e.g. password) which should probably be left alone.

    I have got another update to undertake.

    No doubt more pacnew files
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

  8. #8
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,197

    Re: Meld and pacnew files

    No doubt more pacnew files
    Just wondering: What are pacnew files anyway? I have Manjaro here, but a search doesn't turn up any files containing 'pacnew'.
    Edit: Now I found some (14 - since original install in Jun 2017) searching from /. There is one for fstab for example, but looks like an empty version except comment lines at the top. Same with some others. Some have a config setting.

    Googled explanation answers my question:
    when pacman upgrades a package which includes a new config file created by the maintainer differing from the currently installed file, it saves a .pacnew file with the new configuration. pacman provides notice when these files are written.
    Glad they are kept in case there is a problem! So far there hasn't been.
    Last edited by Dennis N; May 11th, 2018 at 05:09 PM.

  9. #9
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: Meld and pacnew files

    I have installed meld from the manjaro repo. There are no help pages with the application.

    I can see how to input one file for comparison, but how do I input the second file?

    How can I ensure that the meld process proceeds in the right direction, that is, from the pacnew file to the initial file.

    What then happens to the pacnew file?

    UPDATE: Please see later post
    Last edited by anon_private; May 9th, 2018 at 11:38 PM.
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

  10. #10
    Join Date
    Mar 2010
    Location
    UK
    Beans
    481
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: Meld and pacnew files

    I am having problems with permission.

    I am looking at files in the /etc folder.

    The programme meld is owned by root.

    how an I run meld as root, or, is there a better way of using meld?
    Dell Dimension E 520 Viiv
    Pentium D 2.8 GHz. Presler Dual Core 2.8GHz, 800MHz FSB 2x2MB cache
    RAM 4 GB. Dual Channel (4x1024GB) 667MHz DDR2
    Browser: Firefox

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •