You are not logged in.

#1 2010-01-19 05:37:19

bruenig
Member
Registered: 2007-05-20
Posts: 175

diffpac - a stand alone version of yaourt's pacdiffviewer

I created a yaourt replacement called packer. One common thing I heard from many was that they could not let go of yaourt because they loved pacdiffviewer. After inspection, it appeared that pacdiffviewer really did not depend much on yaourt at all. So I modified it to work without yaourt. What this mainly consisted of was copying and pasting the relevant tidbits of the yaourt function files into pacdiffviewer.

Because I only copied the relevant functions, there should be a slight speed increase over pacdiffviewer in yaourt, but on the whole, I did nothing to refactor it to make it faster. So really almost none of the code is mine. If it sucks and is slow, don't blame me. It works the way it was before I started modifying it.

Nonetheless, here are the relevant links:

github link
aur link

Last edited by bruenig (2010-01-19 05:58:37)

Offline

#2 2010-01-19 05:43:56

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,416
Website

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

You may want to reconsider the name.  There is a utility called pacdiff that comes with the pacman source code (packaged in pacman-contrib).

Offline

#3 2010-01-19 06:00:33

bruenig
Member
Registered: 2007-05-20
Posts: 175

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

Changed name to diffpac.

Offline

#4 2011-07-02 03:38:02

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

The "sudo diffpac --backup" option dosen't work right for me...

It should make a copy of the backup configs(*.pacnew etc) into: 'savedir=/var/lib/diffpac/backupfiles', but no diffpac dir is made under /var/lib...

With pacdiffviewer's --backup option, then the configs are saved correctly under /var/lib/yaourt/backupfiles...

Or maybe this is intentional, since 'diffpac -h' dosen't show a backup option, even though it's there in the source under 'case...' ?

This --backup option is imho what sets pacdiffviewer appart from the rest of such tools, since it gives the ability to automerge changes when having saved two versions of each *.pacnew, so I would really love to have this also in diffpac, since I preffer packer/diffpac to yaourt...

Offline

#5 2011-07-02 06:09:26

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

OK, after alot of debugging in the code, then here's a patch that fixes it:

--- /usr/bin/diffpac    2011-07-02 08:01:57.000000000 +0200
+++ ./diffpac    2011-07-02 08:04:29.653440825 +0200
@@ -294,7 +294,7 @@ is_mergeable(){
 backupfiles(){
 ##########################################################
     need_root
-    local packagelist=`grep -srl --line-regexp --include="files" '%BACKUP%' "$PACMANROOT/local"`
+    local packagelist=`grep -srl --line-regexp --include="files" '%BACKUP%' "/var/lib/pacman/local"`
     for file in ${packagelist[@]};do
         package=`echo $file | awk -F "/" '{print $(NF-1)}' `
         pkgname=`echo $package | sed 's/-[^-]*-[^-]*$//'`

Offline

#6 2013-06-04 21:42:20

UnsolvedCypher
Member
Registered: 2012-04-28
Posts: 198

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

I love the idea of this program, but I'm unsure about how exactly to use it. The options are [vsro], but does overwrite completely overwrite the old file, or does it preserve changes? Also, how do you edit the pacnew file before it is used to overwrite the old one?

Offline

#7 2013-06-04 21:44:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

Re: diffpac - a stand alone version of yaourt's pacdiffviewer

UnsolvedCypher wrote:

I love the idea of this program, but I'm unsure about how exactly to use it. The options are [vsro], but does overwrite completely overwrite the old file, or does it preserve changes? Also, how do you edit the pacnew file before it is used to overwrite the old one?

pacman not provides pacdiff, you might want to check it out.

Offline

Board footer

Powered by FluxBB