Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Meld and pacnew files

  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 | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  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,497
    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,497
    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

    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

  8. #8
    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

  9. #9
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: Meld and pacnew files

    Could you not just use cp command?
    Code:
    cp -n directory1/* directory2/
    should merge files from directory1 into directory2 but will not replace any existing files.
    Last edited by Dennis N; May 9th, 2018 at 11:51 PM. Reason: changed command slightly

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

    Re: Meld and pacnew files

    I would like to try meld. But I am having problems with the file permissions
    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 3 123 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
  •